Re: [Rdkit-discuss] Energy minimization never succeeds? :(
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Greg L. <gre...@gm...> - 2011-10-29 12:35:31
|
Hi JP,
On Fri, Oct 28, 2011 at 5:58 PM, JP <jea...@in...> wrote:
>
> Hi there folks,
> Using RDKit 2010_12_1.
> Can someone explain why almost none of my molecules are ever successfully
> minimized?
The minimizer isn't the world's best and you didn't let the
minimization run long enough (more below)
> I know I can play around with the values of maxIts, forceTol and energyTol,
> but I was trying to avoid that if possible.
> Should I throw away the structures which are not minimized? My impression,
> from examining RMS values to the original structure before and after the
> minimization step , is that some form of minimization still occurs - even if
> the Minimize() function returns 1.
That just means that it it didn't reach convergence. You can just pick
up where you left off.
> Example code:
> from rdkit import Chem
> from rdkit.Chem import AllChem
> mol =
> Chem.MolFromSmiles('Cc1c(C(C2CC2)N2CC(C3CCCN(C(=O)OC(C)(C)C)C3)c3ccccc32)cccc1')
> mol_h = AllChem.AddHs(mol)
> cids = AllChem.EmbedMultipleConfs(mol_h, numConfs=50)
> for cid in cids:
> ff = AllChem.UFFGetMoleculeForceField(mol_h, confId=cid)
> print ff.Minimize()
>
I would do something like this:
ff = AllChem.UFFGetMoleculeForceField(mol_h,confId=cids[0])
maxCycles=10
while maxCycles:
if ff.Minimize():
maxCycles -= 1
else:
break
That makes sure it doesn't run forever, but gives the minimizer more
time to find a minimum.
-greg
|