String eol=System.getProperty("line.separator");
if (object instanceof IChemModel) {
IAtomContainerSet mSet = ((IChemModel) object).getMoleculeSet();
for (IAtomContainer atc : mSet.atomContainers()) {
InChI inchi = InChITool.generateInchi(atc);
out.write(inchi.getInChI()+eol);
out.write(inchi.getAuxInfo()+eol);
out.write(inchi.getKey()+eol);
}
}
else if (object instanceof IAtomContainer) {
IAtomContainer atc = (IAtomContainer) object;
InChI inchi = InChITool.generateInchi(atc);
out.write(inchi.getInChI()+eol);
out.write(inchi.getAuxInfo()+eol);
out.write(inchi.getKey()+eol);
}
out.close();
return outFile;
}