converting to inchi with key but without AuxInfo

User d2950aa5e4

03-03-2010 06:19:39

I need to convert SDFiles to inchi, I need InchiKey as well but not the AuxInfo. I am running the following command:


molconvert -g inchi:AuxNone,key "inputfile.sdf" -o outputfile.inchi


receiving error message "key: not found"


What is wrong ?


Thanks


Jiri

ChemAxon 0a9e2a55e1

03-03-2010 12:35:21

Hi,


I have tried the following 


First made a simple sdf:


molconvert sdf -s "CCO" -o cco.sdf


Then used Your command:


molconvert -g inchi:AuxNone,key cco.sdf



>InChI=1S/C2H6O/c1-2-3/h3H,2H2,1H3


>InChIKey=LFQSCWFLJHTTHZ-UHFFFAOYSA-N



It works on my machine, please tell us the operating system, java version, and Marvin version on Your computer. Maybe you are using an old version of Marvin before we added the inchi key function. You can check this by using the molconvert without parameters, and check that both inchi and inchikey is on the list:



$ molconvert


Molecule File Converter, version 5.3.1, (C) 1999-2010 ChemAxon Ltd.


Usage: molconvert [options] outformat[:export-opts] [files...]


Converts the specified files to another format.


  Output molecule formats: mrv, cxsmiles, cxsmarts, abbrevgroup, csmol, csrxn,


    cssdf, csrdf, mol, rgf, mol:V3, rxn, rxn:V3, sdf, rdf, cml, cdx, smiles,


    smarts, inchi, inchikey, name, peptide:1, peptide:3, mol2, sybyl, pdb, xyz,


    cube, gjf.



Best Regards,


Peter

ChemAxon 7c2d26e5cf

03-03-2010 15:15:39

I guess that Jiri uses Windows and launch MolConverter with the molconvert.bat batch script. Can you confirm it?


C:\Program Files\ChemAxon>MarvinBeans\bin\molconvert.bat sdf -s "CCO" -o cco.sdf

C:\Program Files\ChemAxon>MarvinBeans\bin\molconvert.bat -g inchi:AuxNone,key cco.sdf
key: not found

Unfortunatelly, batch scripts can not accept comma (,) in command line statement.


In the batch script lanuage, comma is separator character. The batch script determines parameters like this:



Unfortunatelly, there is no way to escape comma in batch script language. It is the shortcomming of this technology.


I can recommend the following workaround:



java -classpath "C:\Program Files\ChemAxon\MarvinBeans\lib\MarvinBeans.jar" chemaxon.formats.MolConverter -g inchi:AuxNone,key cco.sdf

User d2950aa5e4

03-03-2010 19:17:47

Tamas is right, I am running the molconvert directly from the windows command line. Thanks for the suggestion but it somehow exceeds the level of my technology skills. For now I will run the command using the "inchi:key" specification and simly delete the unwanted auxiliary info from the results (talking about 5 million+ molecules, ufff).