Skip to content

Commit

Permalink
add on patches
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
asad authored and rajarshi committed May 22, 2010
1 parent 5bd8d64 commit 4bdce61
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Expand Up @@ -228,7 +228,7 @@ protected List<CDKRMap> removeRedundantMappingsForSingleAtomCase(List<CDKRMap> o
* @param graph2 second molecule. May be an IQueryAtomContainer.
* @return The mapping found projected on graph1. This is sourceAtom List of CDKRMap objects containing Ids of matching atoms.
*/
public static List<List<CDKRMap>> makeAtomsMapOfBondsMap(List<CDKRMap> rMapList, IAtomContainer graph1, IAtomContainer graph2) {
private static List<List<CDKRMap>> makeAtomsMapOfBondsMap(List<CDKRMap> rMapList, IAtomContainer graph1, IAtomContainer graph2) {
if (rMapList == null) {
return (null);
}
Expand Down Expand Up @@ -288,13 +288,13 @@ public static List<List<CDKRMap>> makeAtomsMapOfBondsMap(List<CDKRMap> rMapList,

/**
* This makes atom map of matching atoms out of atom map of matching bonds as produced by the get(Subgraph|Ismorphism)Map methods.
* @see Added by Asad since CDK one doesn't pick up the correct changes
* Added by Asad since CDK one doesn't pick up the correct changes
* @param list The list produced by the getMap method.
* @param sourceGraph first molecule. Must not be an IQueryAtomContainer.
* @param targetGraph second molecule. May be an IQueryAtomContainer.
* @return The mapping found projected on sourceGraph. This is atom List of CDKRMap objects containing Ids of matching atoms.
*/
public static List<List<CDKRMap>> makeAtomsMapOfBondsMapSingleBond(List<CDKRMap> list, IAtomContainer sourceGraph, IAtomContainer targetGraph) {
private static List<List<CDKRMap>> makeAtomsMapOfBondsMapSingleBond(List<CDKRMap> list, IAtomContainer sourceGraph, IAtomContainer targetGraph) {
if (list == null) {
return null;
}
Expand Down Expand Up @@ -438,10 +438,10 @@ protected void identifyMatchedParts(List<List<CDKRMap>> list, IAtomContainer sou
array1.add(sourceAtom);
array2.add(targetAtom);

int IndexI = source.getAtomNumber(sourceAtom);
int IndexJ = target.getAtomNumber(targetAtom);
int indexI = source.getAtomNumber(sourceAtom);
int indexJ = target.getAtomNumber(targetAtom);

atomNumbersFromContainer.put(IndexI, IndexJ);
atomNumbersFromContainer.put(indexI, indexJ);
}
/*Added the Mapping Numbers to the FinalMapping*
*/
Expand Down Expand Up @@ -481,11 +481,11 @@ protected void identifySingleAtomsMatchedParts(List<CDKRMap> list,
array1.add(sAtom);
array2.add(tAtom);

int IndexI = source.getAtomNumber(sAtom);
int IndexJ = target.getAtomNumber(tAtom);
int indexI = source.getAtomNumber(sAtom);
int indexJ = target.getAtomNumber(tAtom);


atomNumbersFromContainer.put(IndexI, IndexJ);
atomNumbersFromContainer.put(indexI, indexJ);

/*Added the Mapping Numbers to the FinalMapping*
*/
Expand Down
1 change: 1 addition & 0 deletions src/test/org/openscience/cdk/smsd/SMSDTest.java
Expand Up @@ -547,6 +547,7 @@ public void testQueryAtomCount() throws CDKException {
Assert.assertTrue(foundMatches);
}

@Test
public void testMatchCount() throws CDKException {
SMSD smsd = new SMSD(Algorithm.DEFAULT, true);
SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
Expand Down

0 comments on commit 4bdce61

Please sign in to comment.