Identify bad Structures

User dfeb81947d

07-10-2005 10:14:09

Dear Support,





I would like to know how I can identify bad structure (like on the file attached).


Actually the Molecular Graphe is Connex but there is a chemical error on the Oxygen atom with its number of bond.


How can I detect those chemical problems in a structure using JChem API.





I use this code to create a Molecule object from the MolFile... and actually there are no Exception.


Code:
private static Molecule streamMol(String s) throws MolFormatException, IOException{


       return (new MolImporter(new MolInputStream(new ByteArrayInputStream(s.getBytes())))).read();


    }






Is there a method in JChem API to seek for big chemical mistake? Or do I have to create myself a method with rules to identify connectivity, bond or charge problem?





Thank you so far for your help


Warmest Regards,





Jacques





ps: I saw too methods of MolecularGraph that might help:


Code:
m.valenceCheck();



but actually there are no output...


How can I use them?

ChemAxon a3d59b832c

07-10-2005 10:24:00

Jacques,





Please check out the forum topic below.





http://www.chemaxon.com/forum/ftopic456.html





Best regards,





Szabolcs

User dfeb81947d

07-10-2005 10:27:40

thank you very much.


And I think qpropCheck() works like valenceCheck?





Can I do:


m.valenceChck();


m.qpropCheck(null);





and then loop on all the atoms?

ChemAxon a3d59b832c

07-10-2005 11:33:33

Jacques,





There is no need to call qpropCheck(), because valenceCheck() already calls that.





Best regards,





Szabolcs

User dfeb81947d

18-10-2005 07:15:28

Dear Szabolcs,





Thank you very much.


It works perfectly.





Warm Regards


Jacques