Hi guys,
the following code snippet computes the atom ids of the
search-Fragment "CCC" in the molecule "CCCC". Output is as expected:
Atoms of search in molecule: ' 1 0 2 '
code goes here:
[[[
String smilesSearch = "CCC";
IMolecule search = new
SmilesParser(DefaultChemObjectBuilder.getInstance()).parseSmiles(smilesSearch);
IMolecule molecule = new
SmilesParser(DefaultChemObjectBuilder.getInstance()).parseSmiles("CCCC");
List<RMap> map =
UniversalIsomorphismTester.getSubgraphAtomsMap(molecule, search);
System.out.print("Atoms of search in molecule: ' ");
for (int i = 0; i < map.size(); i++)
{
RMap rmap = map.get(i);
System.out.print(rmap.getId1() + " ");
}
System.out.println("'");
]]]
However, if I change smilesSearch to "CC", the map is empty, and the output is:
Atoms of search in molecule: ' '
Looks like a bug to me. Does anyone know a workaround?
Cheers,
Martin
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Cdk-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/cdk-user