Created
March 5, 2009 14:44
-
-
Save jonalv/74367 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var file = "/Sample Data/SDF/borken.sdf"; | |
iterator = cdk.createMoleculeIterator(file); | |
var i = 0; | |
js.print("\n"); | |
var numberOff = cdk.numberOfEntriesInSDF(file); | |
var molecules = cdk.createMoleculeList(); | |
while ( iterator.hasNext() ) { | |
m = iterator.next(); | |
i++; | |
js.print("Read molecule" + i + " " + m.toString() + "\n"); | |
molecules.add(m); | |
} | |
js.print("Managed to parse " + i + " molecules out of " + numberOff | |
+ " found by cdk.numberOfEntriesInSDF"); | |
cdk.createSDFile("/Virtual/moleculesThatParse.sdf", molecules); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment