Wolfram Research

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

Interactively select the imidazole ring inside of ATP:

In[1]:=
mol = Molecule["adenosine triphosphate"]
Out[1]=

Return the atoms:

In[2]:=
atoms
Out[2]=

Verify using FindMoleculeSubstructure:

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

Resource History

License Information