Re: [Rdkit-discuss] Count carbon atoms
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: John M <joh...@gm...> - 2015-10-08 12:38:36
|
On 8 October 2015 at 00:21, Andrew Dalke <da...@da...> wrote: > I fed it some ChEBI structures and found the molecular formula was about > 2x faster than the SMARTS match, and almost 10x faster than iterating over > the atoms. > This seems odd... surely you can't go faster that iterating over the atoms and counting element 6? To get the molecular formula or match a SMARTS you must at a minimum iterate over all atoms so by definition they must be slower. Does RDKit precompute formulas in sanitise for example hence the times aren't really reflective? Perhaps the python iter is indeed slower than a SMARTS match but that can't be true? Regards, John W May joh...@gm... |