Quoting Rajarshi Guha <rg...@indiana.edu>:
>
> On converting to SMILES via OpenBabel and viewing it in the Daylight
> depict service, it looks weird. You have a negatively charged oxygen
> with 3 bonds. Is this mean to be a TS?
>

TS? Anyway you are right; under MOE, the problem does not appears... I  
guess MOE automatically such weird things and automatically correct it.

Quoting Egon Willighagen <egon.willigha...@gmail.com>:

> Hi Vincent,
>
> On Wed, Apr 22, 2009 at 5:24 PM, Vincent Le Guilloux
> <vincent.le-guill...@univ-orleans.fr> wrote:
>> I'm currenty using CDK to read SDF files using an IteratingMDLReader,
>> and I've many errors of the same type during the execution. The
>> exception message is the following:
>> org.openscience.cdk.exception.CDKException: IAtom is not typed! O
>
> This exception means that you are trying to have the CDK do things
> which requires knowledge about the structure which can not be derived
> from the data.
>
> More practically, the CDK did not recognize the atom type of the
> oxygen... this can, for example, be the results of it being negative
> and have three neighbors...
>

The weired thing here is that the CDK does not recognizes the atom  
type while it still display the right element symbol... Obviously the  
CDK knows that it's an oxygen, maybe it could just inform that there  
is a weird thing about the valance or anything else (and ideally  
propose a correction ;) ).

The thing is that i've tested here my code on a dataset of  3000  
molecules, and I had at least a hundred of compounds for which the CDK  
complains with this same error.

I guess the structures may be corrupted in most cases, but still.

Soon I will test on other chemical libraries comming from  
official/commercial providers... We will se what it gives.

> <snip>
>
>>         // Configure the molecule
>>         AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(m);
>
> This is the place where you should check that the atom types of all
> atoms are detected, and then decide on what to do next...
>

So here I should loop over each atom again and "check the check" :)  
That makes many loop at the end :) Maybe I could loop myself only one  
time on each atom and do all checking/hydrogen adding...

Is there any method equivalent to percieveAtomTypesAndConfigureAtoms  
that we could call on a single atom for a given molecule?

>>         // Now add hydrogens
>>         CDKHydrogenAdder hAdder =   
>> CDKHydrogenAdder.getInstance(m.getBuilder());
>
> I think you can reuse the instance; there is no need to instantiate a
> new hAdder for each molecule.

And where do I guet the builder from? The first molecule for example?  
It doesn't makes any difference ?

>
>>         hAdder.addImplicitHydrogens(m);
>
> One option here, is to only add implicit hydrogens for atoms of which
> the atom type is recognized, and just ignore unrecognized atom types,
> reflecting the fact that the CDK simply does not know how many
> hydrogens to add.
>
> One could argue that it is more user friendly to have it add zero
> implicit hydrogens when unrecognized chemistry is passed, but forcing
> to have to pass clean data to it (i.e. atoms for which it is known how
> many hydrogens it can get) encourages the user to deal with unknowns
> at the right moment... being, not at the end off the pipeline in bad
> property prediction, but on input.
>
> You could use the code:
>
> for (IAtom atom : m.atoms()) {
>   hAdder.addImplicitHydrogens(m, atom);
> }
>
> Does this help?

Yes, I'm on this way. I will detect & correct things myself if  
necessary. Thanks for your help Egon & Rajarshi (and for being so  
reactive) :)

>
> Egon
>
> --
> Post-doc @ Uppsala University
> http://chem-bla-ics.blogspot.com/
>
>



-- 
Vincent Le Guilloux

Phd Student - ICOA - UMR CNRS 6005
Div. of chemoinformatic and molecular modeling.
University of Orléans
Phone: ++33 2 38 49 45 77
Fax  : ++33 2 38 41 72 81



------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Cdk-user mailing list
Cdk-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdk-user

Reply via email to