Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Interactively change bond lengths, bond angles and torsion angles
ResourceFunction["MoleculeManipulate3D"][mol] creates a dynamic 3D plot of mol with controls for changing bond lengths, bond angles, and torsion angles. |
Manipulate the 3D structure for a secondary alcohol:
In[1]:= |
Out[1]= |
Select two bonded atoms to change a bond length:
In[2]:= |
Out[2]= |
Select three atoms to change a bond angle:
In[3]:= |
Out[3]= |
Select four atoms to change a torsion angle:
In[4]:= |
Out[4]= |
It is always necessary to select the atoms in the correct order. In the following example the oxygen atom was selected first and then a hydrogen atom, and a slider is present for changing this O-H bond. It is not possible to select the third atom at this point because it is not bonded to the other hydrogen atom. To modify the H-O-H bond angle you must first clear the selection and start from one of the hydrogen atoms:
In[5]:= |
Out[5]= |
Wolfram Language 13.1 (June 2022) or above
This work is licensed under a Creative Commons Attribution 4.0 International License