Importing SDF structures and names

User 5095fcb72d

22-02-2008 17:36:53

Hi all,





I am importing an sdf file into a MYSQL database, but the names are not being transfered in. I am not sure what is different about this time.


I have done this before, and on that occasion an extra screen pops up offering me options of which fields to put where. However, this time that field connecting screen doesn't pop up.





There are only the names (at the top of each molecule) and coordinates present in my file. There are no fields at all.





If I open the same file in a smiles format, I get the option to map my names to my IDNumber column.





Any ideas on what I am doing wrong?





cheers,





Iain

ChemAxon e274e1bada

25-02-2008 18:08:02

Iain,





The described popup window appears if your import file contains data fields only. In the case of SMILES the name is just another data field, thats why it brings up the dialog.


We are considering to support treating the molecule name as a data field in the future.





Regards,


Edvard

ChemAxon a3d59b832c

26-02-2008 11:30:32

It is possible to write some Java code to do this kind of import. You will need the following classes and methods:





Import Molecule objects from files:


http://www.chemaxon.com/jchem/doc/api/chemaxon/formats/MolImporter.html





Get the molecule name:


http://www.chemaxon.com/jchem/doc/api/chemaxon/struc/Molecule.html#getName()





Inserting a Molecule object into the database:


http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/UpdateHandler.html


http://www.chemaxon.com/jchem/doc/api/chemaxon/jchem/db/UpdateHandler.html#setInputMolecule(chemaxon.struc.Molecule)





See also the relevant section of the JChem Developers guide:


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





Regards,


Szabolcs

User 5095fcb72d

01-04-2008 14:53:38

Thanks for the reply, I think it would be a very useful feature
ebuki wrote:
Iain,





The described popup window appears if your import file contains data fields only. In the case of SMILES the name is just another data field, thats why it brings up the dialog.


We are considering to support treating the molecule name as a data field in the future.





Regards,


Edvard

User 12519c1389

23-11-2012 11:51:18

Did this feature ever get added? I'm currently struggling with the same problem with Instant JChem 5.9.4.


 


Seems to work correctly in MarvinView, but it has no option to save in Excel format, which is what I need.

ChemAxon abe887c64e

23-11-2012 13:11:04

Hi Iain,


This function is implemented in JChem Manager (JChem version 5.10).


Best regards,


Krisztina

ChemAxon 2bdd02d1e5

27-11-2012 18:11:01

Importing structure name from SDF structure field never worked in IJC. It can be imported if it is stored as a new column in SDF file. However, you can still overcome this problem by using JChem Manager.


The steps would be as follows:
1. Create a new empty structure table in IJC, add a new text field for the structure name(or a number field if there are numbers stored in SDF file).
2. Run jcman.bat from jchem/bin folder in JChem package and connect to the schema.
3. Import the file you want, in the first step select the proper table, in the second step connect the Name field with Molecule name in SDF.


Please let us know if it helps?


Filip