On Wed, May 23, 2012 at 2:24 PM, JP jeanpaul.ebe...@inhibox.com wrote:
This molecule with no atoms being valid is a questionable design decision
(not your fault of course, you are just implementing a spec).
I think that the smiles writer should not write an empty molecule (you could
change
Hi,
One potential improvement that may help is to use Python's warning package. If
RDKit generates warnings using this package, then user can control whether they
want the empty SMILES to return None silently or raise an exception.
Eddie
On May 24, 2012, at 11:06 PM, Greg Landrum wrote:
On
On 23/05/12 13:24, JP wrote:
The generator is going to give me an empty (third) molecule? So I
have to always dirty my code with m.GetNumAtoms() 0 in that loop.
What is the empty molecule is at the end of the file (ouch)?
I'm curious about this point in particular. I don't know the
Dear all,
The svn version of the RDKit now behaves like this:
In [2]: m = Chem.MolFromMolFile('empty.mol')
In [3]: m.GetNumAtoms()
Out[3]: 0
Notice that there are no longer error messages.
There is, however, the following wart:
In [6]: Chem.MolToSmiles(m)
Out[6]: ''
In [7]: m2 =
On 2012-04-30 13:41, Paul Emsley wrote:
On 30/04/12 01:03, Eddie Cao wrote:
Hi Andrew,
I also prefer #2. #1 is not quite sensible because many readers like
MolFromSmiles will return None on failure and it will be hard to distinguish
bad input from an empty one if we choose to do #1.
Hi Andrew,
I also prefer #2. #1 is not quite sensible because many readers like
MolFromSmiles will return None on failure and it will be hard to distinguish
bad input from an empty one if we choose to do #1. Semantically, in many RDKit
use cases, None and Empty Mol are as different as a
It looks like this discussion is still unresolved. Greg's going to have a pile
of things on his desk (eDesk?) when he gets back from holidays. :)
On Jan 30, 2012, at 1:26 PM, JP wrote:
But then I will have to add the if not clean_mol.GetNumAtoms():
before/after replacing/editing molecule
Thanks for the explanation and the helpful-as-ever code snippets Greg.
A molecule without atoms sounds a bit weird to me but it seems to be a
perfectly legal (in CTFile definition) to have a no-atom molecule.
Each record can hold one molecule (which may be blank). from this very
inspiring article
On Jan 30, 2012, at 9:24 PM, JP wrote:
A molecule without atoms sounds a bit weird to me but it seems to be a
perfectly legal (in CTFile definition) to have a no-atom molecule.
Some SMILES files readers will break if there are no atoms. For example, the
Daylight toolkit SMILES parser gives
9 matches
Mail list logo