MDFile Reader

User e34a92cce5

28-02-2005 19:58:41

Hi,


I want to read a molecule from a text file. The molecule is in the compressed sdf format. I used the following code:


MDFileReader smilemol = new MDFileReader("test.sdf");


smilemol.getMolecule();





However, I get the following runtime error. Any help??











java.lang.RuntimeException:


at chemaxon.descriptors.MolecularDescriptor.newInstance(MolecularDescriptor.java:102)


at chemaxon.descriptors.MDReader.createMDSetComponent(MDReader.java:210)


at chemaxon.descriptors.MDFileReader.createMDSet(MDFileReader.java:397)


at chemaxon.descriptors.MDFileReader.(MDFileReader.java:85)


at org.apache.jsp.examples.m_002dade.query_jsp._jspService(query_jsp.java:1165)


at org.apache.jasper.runtime.HttpJspBase.service

ChemAxon efa1591b5a

01-03-2005 08:17:20

Hi, the MDFileReader reads Molecular Descriptors from molecular structure files, ie. reads the structure, builds the descriptors and returns the descriptors but not the original molecules.





The MolImporter class provides the functionality you are looking for.





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





Regards,


Miklos