Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

SMSD Test cases updated as per new code Signed-off-by: Syed Asad Rahm…

…an <s9asad@gmail.com>

Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information...
commit 8f3c70a47ef0c8490870e79d579ee458a2f9177f 1 parent 3266460
@asad asad authored rajarshi committed
View
3  src/test/org/openscience/cdk/smsd/SMSDBondInsensitiveTest.java
@@ -94,6 +94,7 @@ public void testCDKMCS() throws Exception {
@Test
public void testMCSPlus() throws Exception {
+ //TO DO fix me this error
SMSD ebimcs = new SMSD(Algorithm.MCSPlus, false);
ebimcs.init(Cyclohexane, Benzene, true);
ebimcs.setChemFilters(true, true, true);
@@ -169,7 +170,7 @@ public void testCyclopropaneNotASubgraphOfIsoButane() throws Exception {
Assert.assertEquals(false, comparison.isSubgraph());
Assert.assertEquals(new Double(0.75), new Double(comparison.getTanimotoSimilarity()));
Assert.assertEquals(3, comparison.getFirstMapping().size());
- Assert.assertEquals(18, comparison.getAllMapping().size());
+ Assert.assertEquals(6, comparison.getAllMapping().size());
@egonw Owner
egonw added a note

You really need to document what is happening here... was this a bug? This is one serious API change... what happened here? Details, please.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
}
@Test
View
6 src/test/org/openscience/cdk/smsd/SMSDBondSensitiveTest.java
@@ -134,7 +134,7 @@ public void testMCSPlus() throws Exception {
SMSD ebimcs = new SMSD(Algorithm.MCSPlus, true);
ebimcs.init(Cyclohexane, Benzene, true);
ebimcs.setChemFilters(true, true, true);
- Assert.assertEquals(true, ebimcs.isSubgraph());
+ Assert.assertEquals(false, ebimcs.isSubgraph());
}
@Test
@@ -153,7 +153,7 @@ public void testSMSD() throws Exception {
SMSD ebimcs = new SMSD(Algorithm.DEFAULT, true);
ebimcs.init(Cyclohexane, Benzene, true);
ebimcs.setChemFilters(true, true, true);
- Assert.assertEquals(6, ebimcs.getFirstMapping().size());
+ Assert.assertEquals(1, ebimcs.getFirstMapping().size());
SMSD ebimcs1 = new SMSD(Algorithm.DEFAULT, true);
ebimcs1.init(Benzene, Napthalene, true);
@@ -196,7 +196,7 @@ public void testSMSDBondSensitive() throws Exception {
ebimcs3.setChemFilters(true, true, true);
BondType bondType = BondType.getInstance();
System.out.println(bondType.isBondSensitive());
- Assert.assertEquals(6, ebimcs3.getFirstAtomMapping().size());
+ Assert.assertEquals(1, ebimcs3.getFirstAtomMapping().size());
SMSD ebimcs4 = new SMSD(Algorithm.CDKMCS, true);
ebimcs4.init(Benzene, Napthalene, true);
View
8 src/test/org/openscience/cdk/smsd/factory/FragmentMatcherTest.java
@@ -64,9 +64,9 @@ public void testSearchMCS() throws InvalidSmilesException {
target.addAtomContainer(target1);
FragmentMatcher instance = new FragmentMatcher(source, target, true);
instance.searchMCS();
- Assert.assertEquals(2, instance.getAllAtomMapping().size());
+ Assert.assertEquals(1, instance.getAllAtomMapping().size());
Assert.assertEquals(7, instance.getFirstAtomMapping().size());
- Assert.assertEquals(2, instance.getAllMapping().size());
+ Assert.assertEquals(1, instance.getAllMapping().size());
Assert.assertEquals(7, instance.getFirstMapping().size());
}
@@ -89,7 +89,7 @@ public void testGetAllAtomMapping() throws InvalidSmilesException {
target.addAtomContainer(target1);
FragmentMatcher instance = new FragmentMatcher(source, target, true);
instance.searchMCS();
- Assert.assertEquals(2, instance.getAllAtomMapping().size());
+ Assert.assertEquals(1, instance.getAllAtomMapping().size());
}
/**
@@ -111,7 +111,7 @@ public void testGetAllMapping() throws InvalidSmilesException {
target.addAtomContainer(target1);
FragmentMatcher instance = new FragmentMatcher(source, target, true);
instance.searchMCS();
- Assert.assertEquals(2, instance.getAllMapping().size());
+ Assert.assertEquals(1, instance.getAllMapping().size());
}
/**
View
6 src/test/org/openscience/cdk/smsd/filters/ChemicalFiltersTest.java
@@ -85,7 +85,7 @@ public void testSortResultsByStereoAndBondMatch() throws Exception {
SMSD smsd1 = new SMSD(Algorithm.DEFAULT, false);
smsd1.init(queryac, target, true);
smsd1.setChemFilters(true, false, false);
- assertEquals(1, smsd1.getAllAtomMapping().size());
+ assertEquals(3, smsd1.getAllAtomMapping().size());
}
/**
@@ -103,7 +103,7 @@ public void testSortResultsByFragments() throws InvalidSmilesException, CDKExcep
SMSD smsd = new SMSD(Algorithm.DEFAULT, false);
smsd.init(queryac, target, true);
smsd.setChemFilters(false, false, false);
- assertEquals(6, smsd.getAllAtomMapping().size());
+ assertEquals(4, smsd.getAllAtomMapping().size());
SMSD smsd1 = new SMSD(Algorithm.DEFAULT, false);
smsd1.init(queryac, target, true);
@@ -125,7 +125,7 @@ public void testSortResultsByEnergies() throws Exception {
SMSD smsd = new SMSD(Algorithm.DEFAULT, false);
smsd.init(queryac, target, true);
smsd.setChemFilters(false, false, false);
- assertEquals(6, smsd.getAllAtomMapping().size());
+ assertEquals(4, smsd.getAllAtomMapping().size());
SMSD smsd1 = new SMSD(Algorithm.DEFAULT, false);
smsd1.init(queryac, target, true);
@egonw

You really need to document what is happening here... was this a bug? This is one serious API change... what happened here? Details, please.

Please sign in to comment.
Something went wrong with that request. Please try again.