Greg-

Thanks again for the quick replies!

I have written a script to automate converting compounds from a 2D SD file into a 3D, optimized SD file. With the compounds I'm testing with, I get a hangup in python that has to be killed. I'm wondering if it has anything to do with this bug you listed:

- UFF optimization not terminating when atoms are on top of each other (issue 2378119)

Here is the code I'm trying to run:

############
import Chem
from Chem import AllChem
suppl = Chem.SDMolSupplier('original65cmpds.sdf')

max = len(suppl)

for i in range(0, max):
        AllChem.EmbedMolecule(suppl[i])
        AllChem.UFFOptimizeMolecule(suppl[i])
        print i

w = Chem.SDWriter('output.sdf')
for mol in suppl: w.write(mol)
##########

Here is the file I was trying to convert:
http://homepage.mac.com/marshall.levesque/original65cmpds.sdf

Let me know if you recreate the problem and, hopefully, see the solution.

-Marshall

--
Marshall Levesque
Database Analyst
eMolecules, Inc.
2108 Balboa Avenue
Del Mar, CA, 92014, USA
[email protected]



On Mar 4, 2009, at 4:17 AM, Greg Landrum wrote:

Dear Marshall,

On Wed, Mar 4, 2009 at 8:34 AM, Marshall Levesque
<[email protected]> wrote:
Does the number "1" after I try to optimize the molecule mean that there was
an error?
#######
m =
Chem.MolFromSmiles('Clc1ccc(C=CC(=O)OC(P(=O) (OC2CC(CCC2C)C(C)C)OC2CC(CCC2C)C(C)C)c2cccnc2)c(Cl)c1')
AllChem.EmbedMolecule(m)
0
AllChem.UFFOptimizeMolecule(m)
1
#######

Nope, it just means that the optimization didn't converge. Try calling
UFFOptimizeMolecule again or calling it with a higher value for
maxIters.

I will update the docs to include this information

-greg


Reply via email to