From: Pascal M. <pas...@gm...> - 2010-09-30 09:50:12
|
Hi again, I progressed a bit in my code, and now I would like to print the molecule name. But the following code only prints "null"... Anybody could tell me where I am wrong? Thanks! Input smiles: tmp.smi: CCCNCC1=CC(CC2CC2)=CC=C1 molec1 CCCNCc1cccc(CC2CC2)c1 molec2 Code below. Regads, Pascal public class ex2 { public static void main(String args[]) throws Exception { GenerateFragments gf=new GenerateFragments(); boolean bol = true; IteratingSMILESReader reader = new IteratingSMILESReader(new FileInputStream("tmp.smi")); while(reader.hasNext()){ IMolecule mol = (IMolecule)reader.next(); // What is the difference of "Molecule" with "IMolecule"? System.out.println(mol.getProperty("SMIdbNAME")); // print only "null" gf.generateMurckoFragments(mol,bol,bol,3); String[] smiles=gf.getMurckoFrameworksAsSmileArray(); // still aromatic / saturated problem System.out.println(smiles[0]); } } } |