[Rdkit-discuss] conformation search and constraints
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Rafal R. <rmr...@gm...> - 2016-04-22 16:16:25
|
Hello, I want to find: A) "global minimum" [*] for given compound(s) and B) (for the same compound) minimum with constraint(s) (e.g. frozen angle) For problem A) I tried folowing code: self.MOLEC=Chem.MolFromSmiles(SMILES) self.MOLEC=Chem.AddHs(self.MOLEC) allconf=Chem.rdDistGeom.EmbedMultipleConfs(self.MOLEC, numConfs=HowMany, enforceChirality=True, pruneRmsThresh=limitRMS) for confId in range(len(allconf)): AllChem.UFFOptimizeMolecule(self.MOLEC, maxIters=12540, confId=confId) self.ff = AllChem.UFFGetMoleculeForceField(self.MOLEC) energy_value = str (self.ff.CalcEnergy()) print (energy_value) No matter what values are used for the numConfs or pruneRmsThresh after optimization I end up in conformer(s) with the same energy. The energy value vary from one run to another. In other words EmbedMultipleConfs() generate random structure (that make sense to me) but all conformation are very similar - after optimization all fall into one structure. Is it bug or feature? :) How effectively generate set of _different_ conformation? I found two solution: a) execute presented above code multiple times b) set dihedral angle to unnatural value (using Chem.rdMolTransforms.SetDihedralDeg() function) for selected dihedral angle and then minimize structure Both works but seems to me that both are not optimal. For problem B: I want to minimize structure with frozen dihedral angle. I set the angle value using Chem.rdMolTransforms.SetDihedralDeg I could not find any possibility to freeze angle so I used rdForceField.ForceField.MMFFAddTorsionConstraint function. with very high forceConstant (relative=True minDihedralDeg=-5, maxDihedralDeg=5, forceConstant=9999999.9). The code is as follow: conformers=Chem.rdDistGeom.EmbedMultipleConfs(self.MOLEC,numConfs=confNum, enforceChirality=enforceChirality,numThreads=numThreads, pruneRmsThresh=RMSThreshold) for confId in range(len(conformers)): ff = AllChem.UFFGetMoleculeForceField(self.MOLEC, confId=confId) rdForceField.ForceField.MMFFAddTorsionConstraint( ff, idx0, idx1, idx2, idx3, True, minDihedralDeg=-5, maxDihedralDeg=5, forceConstant=9999999.9) Chem.rdMolTransforms.SetDihedralDeg(self.MOLEC.GetConformer(confId), idx0, idx1, idx2, idx3, 0.0 ) AllChem.UFFOptimizeMolecule(self.MOLEC, maxIters=12540, confId=confId) but it does not work - i end up in structure with dihedral value far from this which was set. How can I force optimization with defined value (or some range of values)? In other words what I am doing wrong? Regards, Rafal [*] Yes I aware that it is very complex task to find a true global minima but I only want to find reasonably good/stable conformer, that why I wrote "global minimum" |