Null cd_smiles entries

User 2f24778469

04-06-2010 21:59:01

While regenerating my JChemData table for 5.3.3, I came across some errors like these:


Error at molecule with cd_id: 86413

java.sql.SQLException: 0
       at chemaxon.jchem.db.
UpdateHandler.execute(UpdateHandler.java:2184)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2142)
       at chemaxon.jchem.db.Regenerator$RegenThread.run(Regenerator.java:103)
Error at molecule with cd_id: 86414
java.sql.SQLException: 0
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2184)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2142)
       at chemaxon.jchem.db.Regenerator$RegenThread.run(Regenerator.java:103)
chemaxon.formats.MolFormatException: 0
       at chemaxon.marvin.io.MRecordImporter.readStructure(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol0(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.formats.MolImporter.readMol(Unknown Source)
       at chemaxon.formats.MolImporter.read(Unknown Source)
       at chemaxon.formats.MolImporter.read(Unknown Source)
       at chemaxon.util.MolHandler.importMol(MolHandler.java:657)
       at chemaxon.util.MolHandler.setMolecule(MolHandler.java:178)
       at chemaxon.util.MolHandler.<init>(MolHandler.java:127)
       at chemaxon.jchem.db.UpdateHandler.readMolecule(UpdateHandler.java:1298)
       at chemaxon.jchem.db.UpdateHandler.init(UpdateHandler.java:1084)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2178)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2142)
       at chemaxon.jchem.db.Regenerator$RegenThread.run(Regenerator.java:103)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
       at chemaxon.marvin.util.MolImportUtil.readBrackets(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readPropertiesBlockV2(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readCtab(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readMol0(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readMol(Unknown Source)
       ... 16 more

Error at molecule with cd_id: 86415
java.sql.SQLException: 0
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2184)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2142)
       at chemaxon.jchem.db.Regenerator$RegenThread.run(Regenerator.java:103)
chemaxon.formats.MolFormatException: 0
       at chemaxon.marvin.io.MRecordImporter.readStructure(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol0(Unknown Source)
       at chemaxon.marvin.io.MRecordImporter.readMol(Unknown Source)
       at chemaxon.formats.MolImporter.readMol(Unknown Source)
       at chemaxon.formats.MolImporter.read(Unknown Source)
       at chemaxon.formats.MolImporter.read(Unknown Source)
       at chemaxon.util.MolHandler.importMol(MolHandler.java:657)
       at chemaxon.util.MolHandler.setMolecule(MolHandler.java:178)
       at chemaxon.util.MolHandler.<init>(MolHandler.java:127)
       at chemaxon.jchem.db.UpdateHandler.readMolecule(UpdateHandler.java:1298)
       at chemaxon.jchem.db.UpdateHandler.init(UpdateHandler.java:1084)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2178)
       at chemaxon.jchem.db.UpdateHandler.execute(UpdateHandler.java:2142)
       at chemaxon.jchem.db.Regenerator$RegenThread.run(Regenerator.java:103)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 0
       at chemaxon.marvin.util.MolImportUtil.readBrackets(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readPropertiesBlockV2(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readCtab(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readMol0(Unknown Source)
       at chemaxon.marvin.io.formats.mdl.MolImport.readMol(Unknown Source)
       ... 16 more

I checked the id's in question and they all had null cd_smiles fields.  Otherwise, they look pretty normal.  I've attached a few examples of those rows.  When I checked the db for more examples, I found 350 rows with null cd_smiles! 


How can I fix these rows?  Is there a way to regenerate the cd_smiles column using the cd_structure column's data?


 


Thanks.

ChemAxon 9c0afc9aaf

04-06-2010 22:43:30

 


Hi,


http://www.chemaxon.com/jchem/doc/dev/dbconcepts/index.html


Having NULL values for cd_smiles is not a problem in itself:


 


These columns store the standardized structure in a compact format, allowing efficient caching and hence fast structure searching. (If this representation of the structure is larger than the maximum length of the column or cannot be represented for any other reason, then NULL is stored and the cd_structure field is used during the search.) 

So only those rows are affected where there was actually an exception.


We could reproduce the exception with the attached structures (it is enough to try to open in MarvinSketch).


At the moment it seems to be a possible bug in our molfile import, or some problem in the molfile which was previously overlooked by our code.


(5.2.x versions seems to read it, 5.3.x versions not)


How can I fix these rows?  Is there a way to regenerate the cd_smiles column using the cd_structure column's data?

 We are always using the cd_structure column during regeneration (all other calculated columns are updated, but cd_striucture never changes).


One way is to downgrade to a previous version, but that usually requires manual intervention in the database.


Please let us know if you need instructions.


We are just before issuing a patch release, so if you can wait a couple of days we may quickly fix this and include in this patch.


In general pre-regeneration (or pre-calculation) is an excellent way to avoid any surprises and also reduce offline time due to recalculation:


https://www.chemaxon.com/jchem/doc/admin/#precalc


We'll get back to you with our findings about these structures ASAP, we are sorry for the inconvenience.


 


Best regards,


 


Szilard

ChemAxon 990acf0dec

07-06-2010 22:04:34

Hi,


We have found the source of the problem: the file you attached contains records with incorrect
SDI tags (i.e. wrong bracket coordinates). Until 5.3, Marvin could not
import the bracket coordinate info from the SDI tag (since the brackets
were not graphical objects), and generated the brackets from the sgroup
content info; on the same way as when an sgroup is drawn in MSketch.
Since 5.3 the SDI tag is imported, so
now Marvin recognized the incorrect bracket coordinates in your
file.



Anyway, now we implemented a workaround: the MOLFile import neglects the SDI tags in these cases, and generate proper coordinates.


Version 5.3.4 will include
this fix, which will be released in a couple of days.


If this is more urgent, please delete the lines starting with "SDI" from your SDFile.


Best regards,


Akos

User 2f24778469

08-06-2010 21:49:29

Thanks for the quick response.  We can wait for the fixed version.

ChemAxon 990acf0dec

17-06-2010 10:32:31

Hi,


Marvin 5.3.4 has been released; it contains the fix.


Best regards,


Akos