User 248fb9fe9c
13-08-2004 17:12:30
Hi,
I'm trying to convert a MOL file into a Smiles string. I can read it fine using:
MolImport importer = new MolImport();
MolInputStream mis = new MolInputStream(new FileInputStream("mol.txt"));
importer.initMolImport(mis, null);
Molecule molecule = importer.createMol();
So far, so good. I can call methods like getBondLength on the Molecule object and they seem to work. But now I need to export it as Smiles.
I tried toFormat("smiles"), that returns a string containing a newline only. I tried the following:
SmilesExport exporter = new SmilesExporter();
exporter.open(null);
String smiles = (String) exporter.convert(molecule);
exporter.close();
But that also returns a string with just a newline in it.
What am I doing wrong?
I'm using JDK 1.4.2 on Solaris 8, a machine that has a display (so this is not a headless problem). All I have on my classpath is marvin.jar and the marvin directory (containing the unpacked compiled chemaxon.marvin classes including the modules). No exceptions are thrown by the program.
Your help is much appreciated. Thanks, and have a good weekend ;)
I'm trying to convert a MOL file into a Smiles string. I can read it fine using:
MolImport importer = new MolImport();
MolInputStream mis = new MolInputStream(new FileInputStream("mol.txt"));
importer.initMolImport(mis, null);
Molecule molecule = importer.createMol();
So far, so good. I can call methods like getBondLength on the Molecule object and they seem to work. But now I need to export it as Smiles.
I tried toFormat("smiles"), that returns a string containing a newline only. I tried the following:
SmilesExport exporter = new SmilesExporter();
exporter.open(null);
String smiles = (String) exporter.convert(molecule);
exporter.close();
But that also returns a string with just a newline in it.
What am I doing wrong?
I'm using JDK 1.4.2 on Solaris 8, a machine that has a display (so this is not a headless problem). All I have on my classpath is marvin.jar and the marvin directory (containing the unpacked compiled chemaxon.marvin classes including the modules). No exceptions are thrown by the program.
Your help is much appreciated. Thanks, and have a good weekend ;)