Hi,
How do I read sdf file in a indexed way using CDK IteratingMDLReader? Meaning: Suppose I have SDF file of 5 Molecules. I want to compare 2nd Molecule with say 1st, 3rd and 5th Molecule. Some thing like 'ListIterator' of the java.util
Is there any way pass to numerical index to next() object of IteratingMDLReader [say like mol_query = (Molecule) myiter.next(int 5)];
Code Snippet of unsuccessful attempt :(
------------------------
sdfile= new BufferedReader (new FileReader(new File("test.sdf")));
IteratingMDLReader myiter = new IteratingMDLReader(sdfile,DefaultChemObjectBuilder.getInstance
());
Molecule mol_target = null;
Molecule mol_query = null;
HydrogenAdder ha = new HydrogenAdder();
Fingerprinter fprinter = new Fingerprinter(length, depth);
while (myiter.hasNext())
{
mol_target = (Molecule)
myiter.next();
ha.addExplicitHydrogensToSatisfyValency(mol_target);
fp_target = fprinter.getFingerprint(mol_target);
for (index_query=1; myiter.hasNext(); ++index_query)
{
mol_query = (Molecule) myiter.next();
ha.addExplicitHydrogensToSatisfyValency(mol_query);
fp_query = fprinter.getFingerprint(mol_query);
//
}
}
-----------------------
Any help would be highly appreciated
Research Student,
Bioinformatics Center
University of Pune
Pune-411007
India
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ Cdk-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cdk-user

