On 02/10/2015 10:33 AM, Greg Landrum wrote:
> You might want to take a look at this older thread for some additional
> hints:
> http://www.mail-archive.com/rdkit-discuss%40lists.sourceforge.net/msg00484.html

That's why programmers hate "domain" scientists: why
  num = mol.GetNumAtoms()
    if num > 500 ...

Why not 499 or 502? I guess I'll run

def _to_mol( self ) :
    assert isinstance(self._mol,rdkit.Chem.rdchem.Mol)
    m = rdkit.Chem.AddHs(self._mol)
    rc = rdkit.Chem.AllChem.EmbedMolecule(m)
    if rc < 0 :
        rc = rdkit.Chem.AllChem.EmbedMolecule(m,useRandomCoords=True)
    if rc == 0 :
        try :
            if rdkit.Chem.AllChem.UFFOptimizeMolecule(m) != 0 :
                rdkit.Chem.AllChem.UFFOptimizeMolecule(m,maxIters=1000)
         except ValueError :
            pass
    return rdkit.Chem.MolToMolBlock( m )

until the next one crashes it.

Thank you
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to