From: Joerg K. W. <we...@in...> - 2004-10-19 11:01:48
|
Hi Andreas, i assume that this is a salt and morgan is not implemented for salts, which require to renumber each fragment separately. So mol.stripSalt() will help, but this will skip the smaller salt fragment, or you must extend the actual morgan implementation. You should at first renumber the molecule and then apply the smiles conversion. Kind regards, Joerg > Hi Joerg, > > this code is derived from your advice: > > public static void main(String args[]) { > String smiles = args[0]; > JOEMol mol=new JOEMol(); > Morgan morgan = new Morgan(new BasicTieResolver()); > > JOESmilesParser.smiToMol(mol, smiles, smiles); > JOEMol tMol = (JOEMol) mol.clone(false); > morgan.calculate(tMol); > JOEMol rMol = morgan.renumber(tMol); > > } > > and it returns the following error: > > Exception in thread "main" java.lang.NullPointerException > at joelib.algo.morgan.Morgan.getBFS(Morgan.java:329) > at joelib.algo.morgan.Morgan.renumber(Morgan.java:261) > at SmilesCanonifier.main(SmilesCanonifier.java:64) > > What's wrong here? > > Greetings > Andreas > > On Mon, Oct 18, 2004 at 05:44:03PM +0200, Joerg K. Wegner wrote: > >>Hi Andreas, >> >>sorry for the late reply i was in holiday for three weeks. >> >> >>>does Joelib provide a functionality to obtain a canonified version of a >>>SMILES string? >> >>Definitely, as far as the Morgan algorithm can be used for canonization. >> >>Just set >>joelib.io.types.Smiles.canonical=false >>in joelib.properties to 'true' >> >>or copy code fragment from: >>joelib.io.types.Smiles >> > > > > ------------------------------------------------------- > This SF.net email is sponsored by: IT Product Guide on ITManagersJournal > Use IT products in your business? Tell us what you think of them. Give us > Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more > http://productguide.itmanagersjournal.com/guidepromo.tmpl > _______________________________________________ > Joelib-help mailing list > Joe...@li... > https://lists.sourceforge.net/lists/listinfo/joelib-help > -- Dipl. Chem. Joerg K. Wegner Center of Bioinformatics Tuebingen (ZBIT) Department of Computer Architecture Univ. Tuebingen, Sand 1, D-72076 Tuebingen, Germany Phone: (+49/0) 7071 29 78970 Fax: (+49/0) 7071 29 5091 E-Mail: mailto:we...@in... WWW: http://www-ra.informatik.uni-tuebingen.de -- Never mistake motion for action. (E. Hemingway) Never mistake action for meaningful action. (Hugo Kubinyi,2004) |