[Rdkit-discuss] detect dihedral angles in a conformation
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Jose M. G. <jos...@un...> - 2015-10-20 08:40:41
|
Hi RDKitters, I would like to consider parts of a conformation rigid (fixed dihedral angles) during minimization My end goal would be to generate only ring conformations starting with valid 3D molecules. I can already consider a specific dihedral angle as rigid: from rdkit import Chem from rdkit.Chem import AllChem, rdMolTransforms # create test mol s = 'COCCN1CCOCC1' m = Chem.MolFromSmiles(s) m = Chem.AddHs(m) # add 3D coordinates AllChem.EmbedMolecule(m) # freeze one dihedral angle (composed of atoms 0-3) MMFFs_MP = AllChem.MMFFGetMoleculeProperties(m, mmffVariant='MMFF94s') MMFFs_FF = AllChem.MMFFGetMoleculeForceField(m, MMFFs_MP) MMFFs_FF.MMFFAddTorsionConstraint(0, 1, 2, 3, relative=True, minDihedralDeg=0.0, maxDihedralDeg=0.0,forceConstant=99999999999999.0) c = m.GetConformer() print "before min", rdMolTransforms.GetDihedralDeg(c, 0,1,2,3) # -53.0873064656 # minimize molecule with constrained dihedral angle MMFFs_FF.Minimize(maxIts=10) print "after first min", rdMolTransforms.GetDihedralDeg(c,0,1,2,3) # -53.0873064656 MMFFs_FF.Minimize(maxIts=10) print "after second min", rdMolTransforms.GetDihedralDeg(c,0,1,2,3) # -53.0873064656 However, I have difficulties to find all dihedral angles to consider rigid... I would like to detect dihedral angles with 4 atoms where: - none is hydrogen - no more than 2 atoms are in different rings First I looked for a function to return me the list of dihedral angles and iterate over it, but could not find any. My other alternative would be to iterate over atoms to get their neighbors, and then get their neighbor' neighbors, but that looks very very slow. Any other way to do this? Thank you! Jose Manuel |