User e779d19ce5
26-07-2012 16:06:45
HItDisplayTool seems to ignore the ALIGNMENT_OFF option when using the SIMILARITY search option. It always aligns to the query molecule. Is there any way to force similarity to not align the result molecule?
Molecule molecule = null;
String alignTo = "CN1C2=C(N=CN2)C(=O)N(C)C1=O";
HitColoringAndAlignmentOptions hco = new HitColoringAndAlignmentOptions();
hco.setAlignmentMode(HitColoringAndAlignmentOptions.ALIGNMENT_OFF);
MolHandler mh = new MolHandler(alignTo.getBytes());
Molecule query = mh.getMolecule();
MolHandler mh2 = new MolHandler(input); // input is the target Molecule object
Molecule target = mh2.getMolecule();
MolSearchOptions mso = new MolSearchOptions(SearchConstants.SIMILARITY);
HitDisplayTool hdt = new HitDisplayTool(hco, mso, null, query);
molecule = hdt.getHit(target);