User 7c177bab3b
16-09-2010 12:37:57
I was wondering if molimporter.read() had any support for comments in a smarts or smiles file?
The documentation states that molimporter.read() gets the next molecule. Does this mean that it skips rows in a file that don't give a valid molecule? What about blank lines?
e.g. The following smarts file seems to be read okay, giving just one query
# comment here
aNC(=O)a<tab>name
using the snippet from your TagByQuery code from an earlier post
MolImporter molimp = new MolImporter(smartsfile + "{fTAG}");
molimp.setQueryMode(true); //SMARTS
Molecule mol;
queries = new ArrayList<Molecule>();
while ((mol = molimp.read())!= null) {
queries.add(mol);
}
molimp.close();
Thanks
Stephen