Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Interactively manipulate the conformation of a flexible molecule and paste results along the way
ResourceFunction["RotateBonds3D"][mol] generates an interactive GUI that allows the user to dynamically rotate bonds in the molecule mol. |
"AnchorAtom" | Automatic | index of atom at which the spanning tree of rotatable bonds is anchored (rooted), or {anchor,azimuth} where azimuth is the index of an atom adjacent to anchor}. |
"DiagramSize" | Automatic | the effective ImageSize for the schematic diagram showing the rotatable bonds and atom indices |
IncludeHydrogens | False | controls the display of hydrogen atoms and the inclusion of rotatable bonds terminating in, for example, a methyl group |
Rotate butane about its central C-C bond and paste its gauche and anti conformations:
In[1]:= | ![]() |
Out[1]= | ![]() |
Copy each pasted Molecule and visualize the results:
In[2]:= | ![]() |
Out[2]= | ![]() |
In[3]:= | ![]() |
Out[3]= | ![]() |
Bonds in rings are excluded from consideration:
In[4]:= | ![]() |
Out[4]= | ![]() |
By default, the spanning tree of rotatable bonds is anchored at the atom with the highest ClosenessCentrality, which tends to be in the middle of the molecule:
In[5]:= | ![]() |
Out[5]= | ![]() |
Anchor the spanning tree at one end:
In[6]:= | ![]() |
Out[6]= | ![]() |
When the anchor atom was chosen automatically, the initial direction of the spanning was toward atom 4. Use the two-atom form to change the direction:
In[7]:= | ![]() |
Out[7]= | ![]() |
Specify the size for the schematic diagram:
In[8]:= | ![]() |
Out[8]= | ![]() |
By default, hydrogen atoms are not shown:
In[9]:= | ![]() |
Out[9]= | ![]() |
Displaying the hydrogen atoms also permits more bonds to be rotatable:
In[10]:= | ![]() |
Out[10]= | ![]() |
Cyclic molecules like cyclohexane have no rotatable bonds, and thus no sliders are presented in RotateBonds3D:
In[11]:= | ![]() |
Out[11]= | ![]() |
RotateBonds3D is a good way to make peptide turns. Start with a tetrapeptide:
In[12]:= | ![]() |
Out[12]= | ![]() |
Give the structure a type II β-turn. Set the torsion angles according to the values in the table (starting from the bottom of the menus):
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
In[15]:= | ![]() |
Out[15]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License