RDKit has an implementation of the MMFF94 force field available.
It is very easy to use it.
For example, I can generate 3D structure from smiles and minimise it with simple coding.
Let’s try it.
Following code is a example using major kinase inhibitor “imatinib”.
from rdkit import Chem from rdkit.Chem import AllChem # get mol object from smiles imatinib = Chem.MolFromSmiles("Cc1ccc(cc1Nc2nccc(n2)c3cccnc3)NC(=O)c4ccc(cc4)CN5CCN(CC5)C") # add hydrogen and generate 3d conf. h_mol = Chem.AddHs(imatinib) AllChem.EmbedMolecule(h_mol) # if get 0, that's ok. mol_prop = AllChem.MMFFGetMoleculeProperties(h_mol) field = AllChem.MMFFGetMoleculeForceField(h_mol, mol_prop) field.Minimize() # Opps, I got 1, that's means fail to minimize... en = field.CalcEnergy() # In [15]: en # Out[15]: 81.9480105298988 field.Minimize(maxIts=10000) # OK I got 0. field.CalcEnergy() # In [19]: field.CalcEnergy() # Out[19]: 75.50215402805657
Finally write 3D-conf in SDF.
w = Chem.SDWriter("3d_imatinib.sdf") w.write(h_mol) w.close()
Let’s show it in Pymol.
Hmm,,,,, I need more deep calculation.