Dear Toby,
I checked the MMFF literature and indeed that hydrogen must be type 29;
I just submitted a pull request with the bug fix. Apparently the test
case that you presented is not covered by the validation suite and so I
missed that bug until today: thank you very much for reporting it!
Cheers,
p.
On 04/14/2014 03:42 PM, Toby Wright wrote:
Hi,
I've been using the MMFF94 forcefield and noticed an odd behaviour is
a couple of molecules.
> phenolish1 = Chem.MolFromSmiles('Oc1ncccn1')
> phenolish2 = Chem.MolFromSmiles('Oc1ncncc1')
> prop1 = AllChem.MMFFGetMoleculeProperties(Chem.AddHs(phenolish1))
> prop2 = AllChem.MMFFGetMoleculeProperties(Chem.AddHs(phenolish2))
> print prop1.GetMMFFAtomType(7) #Atom 7 is the H of the OH
21
> print prop2.GetMMFFAtomType(7) #Atom 7 is the H of the OH
29
Type 29 is a hydrogen attached to an oxygen in enols, phenols or
HO-C=N which is only sort of the case here (but perhaps pragmatically
we should consider phenol the closest option?)
Digging into the code in GraphMol/ForceFieldHelpers/MMFF/AtomTyper.cpp
we see (between lines 2092 and 2133) that we consider an atom to hit
the phenol case if we have the oxygen attached to a carbon attached
via an aromatic bond to another carbon. We have this in phenolish2 but
not in phenolish1 hence the different outputs. If we change the test
on line 2115 to:
if ((bond->getBondType() == Bond::AROMATIC) ||
((nbr3Atom->getAtomicNum() == 6) && (bond->getBondType() ==
Bond::DOUBLE))) {
then both cases above show the same behaviour, considering phenolish
things to be phenols for the sake of MMFF94 atom typing. Alternatively
we could consider phenolish things to be not phenols and implement
atom type 21 for the hydrogen in both cases. Any thoughts?
Yours,
Toby Wright
PS I'm aware that the tautomers above aren't ideal, these are
fragments snipped from more complex molecules to demonstrate the
behaviour.
--
InhibOx Ltd
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
--
==========================================================
Paolo Tosco, Ph.D.
Department of Drug Science and Technology
Via Pietro Giuria, 9 - 10125 Torino (Italy)
Tel: +39 011 670 7680 | Mob: +39 348 5537206
Fax: +39 011 670 7687 | E-mail: paolo.to...@unito.it
http://open3dqsar.org | http://open3dalign.org
==========================================================
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss