OK,

Adding:

AllChem.EmbedMolecule(m1)
AllChem.UFFOptimizeMolecule(m1)

Fixed the problem. Now to work out what it all means!

From: Greg Landrum [mailto:greg.land...@gmail.com]
Sent: 24 April 2014 04:39
To: Stephen O'hagan
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] RDKit pharmacophore features

Hi Steve,

On Wed, Apr 23, 2014 at 5:41 PM, Stephen O'hagan 
<soha...@manchester.ac.uk<mailto:soha...@manchester.ac.uk>> wrote:
I’m trying to understand how the RDKit pharmacophore features work; tried this 
fragment from a previous post:
import os
from rdkit import Chem
from rdkit.Chem import ChemicalFeatures
from rdkit import Geometry
from rdkit import RDConfig
from rdkit.Chem import AllChem
from rdkit.Chem.Pharm3D import Pharmacophore, EmbedLib
m1 = Chem.MolFromSmiles('Cc1ccccc1')
FEATURE_DEF_FILE = os.path.join(RDConfig.RDDataDir,'BaseFeatures.fdef')
feat_factory = ChemicalFeatures.BuildFeatureFactory(FEATURE_DEF_FILE)
feats = feat_factory.GetFeaturesForMol(m1)
pcophore = Pharmacophore.Pharmacophore(feats)
 I get an immediate CTD on the call to Pharmacophore.Pharmacophore(feats)

 There are two bugs here:
1) in your code the molecule has no conformations generated, so trying to 
create a pharmacophore from the features associated with that molecule should 
not work
2) instead of an error message or exception you get a crash (seg fault on linux 
or the mac). The RDKit should never do that...

If you add coordinates (2D or 3D) to your molecule before constructing the 
pharmacophore, your code should work.

Best,
-greg

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to