|
From: Andreas M. <an...@ma...> - 2004-10-19 10:21:20
|
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
>
|