How to import empty or symbol structure to JchemBase table?

User 22c88daf92

06-12-2012 09:48:48

hello!


Sometimes we just want to import a symbol molecule with unknown structure, and we need to get the cd_id of this molecule in JchemBase table, but we find that empty structure can't be insert in the table.


How could we solve this problem? Is there any examples in java?


thanks!


 

ChemAxon abe887c64e

06-12-2012 11:22:43

By default empty structures are allowed to be imported, so we need more information for helping to solve the problem. How did you try to import empty structures, what kind of database table were you using, what is the error message ? Can you send us a stacktrace?


What do mean under symbol molecule?


Best regards,


Krisztina

ChemAxon a3d59b832c

06-12-2012 12:44:58

Symbol molecule:


 


Maybe the pseudo atom feature can be useful for you:


http://www.chemaxon.com/jchem/doc/user/query_features.html#pseudo_atoms


 


There are no special Java coding required for empty structures or pseudo atoms.


 


Best regards,


Szabolcs

ChemAxon 9c0afc9aaf

06-12-2012 16:32:24

For UpdateHandler you have to enable empty structures by calling this method (disabled by default):


http://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/jchem/db/UpdateHandler.html#setEmptyStructuresAllowed(boolean)


Use execute(true) to obtain the cd_id:


http://www.chemaxon.com/jchem/doc/dev/java/api/chemaxon/jchem/db/UpdateHandler.html#execute(boolean)


Developer's guide:


http://www.chemaxon.com/jchem/doc/dev/


Section for simple insert example:


http://www.chemaxon.com/jchem/doc/dev/modify/index.html#modify_rows