Hi JP,
On Wed, Aug 24, 2011 at 12:02 PM, JP <[email protected]> wrote:
>
> Something is not quite right with the depiction of this molecule
> (broken_mol.png); the wedge bonds shouldn't be there...
>
> I am attaching the script which generates this - is it a fault of the
> molecule definition (it looks fine in other, less stringent tools) or
> with the RDKit internal depiction code?
> I tried the savvy mol.Debug() trick - but I am none the wiser.
I'm not so good with mol2 files, so I'm not able to figure out what is
intended by just looking at the file.
The output of mol.Debug() shows:
Atoms:
0 16 S chg: 0 deg: 4 exp: 6 imp: 0 hyb: 4 arom?: 0 chi: 2
1 6 C chg: 0 deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
2 7 N chg: 0 deg: 3 exp: 3 imp: 0 hyb: 4 arom?: 0 chi: 0
3 6 C chg: 0 deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 2
<snip>
which indicates that the RDKit believes that there is stereochemistry
indicated on the S and carbon 3 (numbered from zero). So clearly the
stereochemistry at those atoms isn't being properly cleaned up, which
it would be if you were reading either a SMILES or an SDF/Mol file.
This is probably a bug, but I will have to talk to Nik (the author of
the mol2 parser) about it to be sure.
You can work around the problem by forcing the RDKit to clean up
stereochemistry specifications:
[6]>>> Chem.AssignStereochemistry(mol,cleanIt=True,force=True)
[7]>>> mol.Debug()
Atoms:
0 16 S chg: 0 deg: 4 exp: 6 imp: 0 hyb: 4 arom?: 0 chi: 0
1 6 C chg: 0 deg: 3 exp: 4 imp: 0 hyb: 3 arom?: 1 chi: 0
2 7 N chg: 0 deg: 3 exp: 3 imp: 0 hyb: 4 arom?: 0 chi: 0
3 6 C chg: 0 deg: 4 exp: 4 imp: 0 hyb: 4 arom?: 0 chi: 0
<snip>
To repeat: this is only necessary for mol2 files, you would not have
this problem with input from either SDF/Mol or smiles. I'm emphasizing
this so that you don't think you have to always call
AssignStereochemistry to get properly cleaned up molecules.
Best,
-greg
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss