Loading Structures from an SD File

User 0908c5ccdd

10-10-2007 10:10:14

In the documentation for the jchem_table_pkg.jc_insert API you state





jchem_table_pkg.jc_insert(structure IN VARCHAR2, table IN VARCHAR2, jChemPropName IN VARHCAR2, checkDuplicates IN VARHCAR2, haltOnDuplicate IN VARHCAR2, options IN VARHCAR2) = CD_ID_ARRAY





The first parameter can be either a molecular structure in any format recognized by JChem.






If I have an SD file sitting on the database server file system is it possible to somehow use the filename as the first parameter? In the past I have been inserting records using the SMILES string as this varchar2 parameter.





Many thanks in advance...

ChemAxon aa7c50abf8

10-10-2007 11:14:10

Quote:
If I have an SD file sitting on the database server file system is it possible to somehow use the filename as the first parameter?
It is not currently possible.





I seem to remember that you plan to use JChem Cartridge as part of an ASP.NET application. Why not have your application read the SDFile from the file system and pass its content as CLOB to the first parameter? (If the SDFile contains multiple records [multiple molecules], you would need to call jc_insert in a loop.)





Alternatively, your application can also call jcman to import the sdfile into the table. In this latter case, the bulk of the processing would be performed in the application server and not in JChemCartridge as in the previous example.

User 0908c5ccdd

22-10-2007 14:09:43

pkovacs wrote:
Quote:
If I have an SD file sitting on the database server file system is it possible to somehow use the filename as the first parameter?



Alternatively, your application can also call jcman to import the sdfile into the table. In this latter case, the bulk of the processing would be performed in the application server and not in JChemCartridge as in the previous example.
Hi Peter





If the SD file contains an alternate identifier is it possible to map this to a new column in the structure table? I have just used jc_man to upload a large SD File, but it only reads the structure and calculates weight, formula and SMILES.





Thanks

ChemAxon aa7c50abf8

22-10-2007 14:51:29

Please, use the the --connect option. In the following example, jcman is instructed to store the value found in the MOLNAME SDF tag in the NAME column and the value of the PH tag in the PH_VAL column:





Code:
jcman a str3d str3d.sdf.gz --connect "MOLNAME=NAME;PH=PH_VAL"



Thanks


Peter

User 0908c5ccdd

22-10-2007 15:22:42

pkovacs wrote:
Please, use the the --connect option. In the following example, jcman is instructed to store the value found in the MOLNAME SDF tag in the NAME column and the value of the PH tag in the PH_VAL column:





Code:
jcman a str3d str3d.sdf.gz --connect "MOLNAME=NAME;PH=PH_VAL"



Thanks


Peter
Thanks Peter.





One last question (hopefully!) on this, I have been trying to find the documentation for jcman, but can't seem to find it. Then I can read about the commands and parameters in more detail. Can you point me in the right direction please?

ChemAxon aa7c50abf8

22-10-2007 15:34:19

JChem Manager is described here: http://www.chemaxon.com/jchem/doc/admin. The section Installing and Starting JChemManager (http://www.chemaxon.com/jchem/doc/admin/#install) has a subsection called Command line usage where the command line options are described.





Thanks


Peter