I got the error while using the Fingerprinter
my code looks like this
/////////////////////////////////////////
try{
Fingerprinter fingerprinter = new Fingerprinter();
IChemObjectReader reader = new ReaderFactory().createReader(new
FileReader(file));
if (reader.accepts(Molecule.class)) {
ChemFile content = (ChemFile)reader.read((ChemObject)new
ChemFile());
org.openscience.cdk.interfaces.IAtomContainer[]
containers =
ChemFileManipulator.getAllAtomContainers(content);
Molecule molecule = (Molecule)reader.read(new Molecule());//
From here the exceptionhas been thrown
if (containers.length > 0) {
for (int j = 0; j < containers.length; j++) {
fingerprint = fingerprinter.getFingerprint
(containers[j]).toString();
}
}
}
}
///////////////////////////////////////////////
org.openscience.cdk.exception.CDKException: Error while parsing line 0: ->
Stream closed
at org.openscience.cdk.io.MDLReader.readMolecule(MDLReader.java:597)
at org.openscience.cdk.io.MDLReader.read(MDLReader.java:166)
The mol file i tried is this>>
acetone.MOL
10 9 0 0 0 1 V2000
-1.2625 -0.4593 0.4200 C 0 0 0 0 0
0.0445 0.2948 0.4200 C 0 0 0 0 0
0.1623 1.3894 0.9172 O 0 0 0 0 0
1.1965 -0.4259 -0.2360 C 0 0 0 0 0
-1.3518 -1.0662 -0.5085 H 0 0 0 0 0
-2.1143 0.2553 0.4692 H 0 0 0 0 0
-1.3111 -1.1367 1.3018 H 0 0 0 0 0
2.1143 0.2020 -0.1898 H 0 0 0 0 0
0.9556 -0.6375 -1.3018 H 0 0 0 0 0
1.3900 -1.3894 0.2864 H 0 0 0 0 0
1 2 1 0 0 0
1 5 1 6 0 0
1 6 1 0 0 0
1 7 1 1 0 0
2 3 2 0 0 0
2 4 1 0 0 0
4 8 1 0 0 0
4 9 1 6 0 0
4 10 1 1 0 0
M END
Kindly provide me what changes should i do,or what mistake i am doing.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user