Last active
May 15, 2016 20:07
-
-
Save johnmay/a0096ee3bc281a3af5f81d40b58b64c0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| IChemObjectBuilder bldr = SilentChemObjectBuilder.getInstance(); | |
| SmilesParser smipar = new SmilesParser(bldr); | |
| final String fname = "/data/nci_aug00.smi"; | |
| SMARTSQueryTool sqt = new SMARTSQueryTool("O=[C,N]aa[N,O;!H0]"); | |
| int num_hits = 0; | |
| try (BufferedReader brdr = new BufferedReader(new FileReader(fname))) { | |
| String line; | |
| while ((line = brdr.readLine()) != null) { | |
| IMolecule mol = smipar.parseSmiles(line); | |
| if (sqt.matches(mol)) | |
| num_hits++; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment