Function Repository Resource:

SelectAtoms3D

Source Notebook

Interactively select atom indices from a 3D molecule plot

Contributed by: Wolfram Chemistry Team

ResourceFunction["SelectAtoms3D"][mol]

opens an interactive 3D dialog allowing a group of atoms to be selected in a 3D plot of mol and returns their indices.

ResourceFunction["SelectAtoms3D"][mol,{n1,n2,}]

opens an interactive dialog with the ni preselected.

Details and Options

The Wolfram Language kernel in which ResourceFunction["SelectAtoms3D"] is evaluated will block until the OK button is clicked or the window is otherwise closed.

Examples

Basic Examples (3) 

Interactively select the imidazole ring inside of ATP:

In[1]:=
mol = Molecule["adenosine triphosphate"]
Out[1]=
In[2]:=
atoms = ResourceFunction["SelectAtoms3D"][mol];

Return the atoms:

In[3]:=
atoms
Out[3]=

Verify using FindMoleculeSubstructure:

In[4]:=
Values@FindMoleculeSubstructure[mol, MoleculePattern["c1c[n]cn1"]]
Out[4]=

Version History

  • 1.0.0 – 17 May 2019

License Information