User b22f714996
08-04-2005 07:56:48
Hello...
I have a question regarding the following code snippet
I get the following output:
Number of hits1: 1
Number of hits2: 1
Number of hits3: 0
I am pretty sure, that it is a very simple and silly mistake I'm making here and I'm sorry to bother you with that... but I am very thankful for help,
Thanks a lot,
tobias
I have a question regarding the following code snippet
Code: |
MolSearch ms = new MolSearch(); MolHandler mh = new MolHandler("CC(C)NN"); mh.aromatize(); ms.setTarget(mh.getMolecule()); mh.setQueryMode(true); mh.setMolecule("N-N"); ms.setQuery(mh.getMolecule()); int[][] hits1 = ms.findAll(); if (hits1 != null) { System.out.println("Number of hits1: " + hits1.length); } else { System.out.println("Number of hits1: 0"); } mh.setMolecule("CN(C)N=C"); mh.aromatize(); ms.setQuery(mh.getMolecule()); int[][] hits2 = ms.findAll(); if (hits2 != null) { System.out.println("Number of hits2: " + hits2.length); } else { System.out.println("Number of hits2: 0"); } mh.setMolecule("CN(C)[N;H2]"); mh.aromatize(); ms.setQuery(mh.getMolecule()); int[][] hits3 = ms.findAll(); if (hits3 != null) { System.out.println("Number of hits3: " + hits3.length); } else { System.out.println("Number of hits3: 0"); } |
I get the following output:
Number of hits1: 1
Number of hits2: 1
Number of hits3: 0
I am pretty sure, that it is a very simple and silly mistake I'm making here and I'm sorry to bother you with that... but I am very thankful for help,
Thanks a lot,
tobias