$darkmode
DENOPTIM
|
Unit test for fragment space. More...
Classes | |
class | TestCase |
Public Member Functions | |
void | testSymmetry () throws Exception |
void | testGetFragsWithAPClass () throws Exception |
void | testGetFragAPsCompatibleWithClass () throws Exception |
void | testGetFragAPsCompatibleWithTheseAPs () throws Exception |
void | testGetFragmentsCompatibleWithTheseAPs () throws Exception |
void | testGetRCVsForAPClass () throws Exception |
void | testGetRCVsWithAPClass () throws Exception |
void | testFusedRingAddedToFragmentLibrary () throws Exception |
Check that the following graph's fused ring gets added to the fragment library. More... | |
void | testFusedRingAddedToScaffoldLibrary () throws Exception |
Checks that a graph with a fused ring containing a scaffold vertex is added to the scaffold library. More... | |
void | testFusedRingOnlyAddedOnce () throws DENOPTIMException |
void | testUseWholeMolGeometryForExtractedTemplates () throws Exception |
Works with this graph: More... | |
Static Package Attributes | |
static File | tempDir |
Private Member Functions | |
FragmentSpaceParameters | buildFragmentSpace () throws DENOPTIMException |
TestCase | getTestCase () throws DENOPTIMException |
Template | getExpectedTemplate (DGraph g, Vertex c3) throws DENOPTIMException |
Fragment | getCarbonVertex () throws DENOPTIMException |
Vertex | getRCV () throws DENOPTIMException |
Point3d | getRandomVector () |
Private Attributes | |
final Random | rng = new Random() |
Static Private Attributes | |
static final String | SEP = System.getProperty("file.separator") |
static final int | APSUBRULE = 0 |
static final String | RULAPCS = "apc-S" |
static final String | RULAPC1 = "apc-1" |
static final String | RULAPC2 = "apc-2" |
static final String | RULAPC3 = "apc-3" |
static final String | RULAPC4 = "apc-4" |
static final String | RULAPC5 = "apc-5" |
static final String | RULAPC6 = "apc-6" |
static final String | RULAPCC1 = "cap-1" |
static final String | RULAPCC2 = "cap-2" |
static final BBType | BBTFRAG = BBType.FRAGMENT |
static APClass | APCS |
static APClass | APC1 |
static APClass | APC2 |
static APClass | APC3 |
static APClass | APC4 |
static APClass | APC5 |
static APClass | APC6 |
static APClass | APCC1 |
static APClass | APCC2 |
Unit test for fragment space.
Definition at line 73 of file FragmentSpaceTest.java.
|
private |
Definition at line 108 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAPOnAtom(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.fragspace.FragmentSpaceTest.APC1, denoptim.fragspace.FragmentSpaceTest.APC2, denoptim.fragspace.FragmentSpaceTest.APC3, denoptim.fragspace.FragmentSpaceTest.APC4, denoptim.fragspace.FragmentSpaceTest.APC5, denoptim.fragspace.FragmentSpaceTest.APC6, denoptim.fragspace.FragmentSpaceTest.APCC1, denoptim.fragspace.FragmentSpaceTest.APCC2, denoptim.fragspace.FragmentSpaceTest.APCS, denoptim.fragspace.FragmentSpaceTest.APSUBRULE, denoptim.graph.Edge.BondType.DOUBLE, denoptim.graph.APClass.make(), denoptim.graph.Fragment.projectAPsToProperties(), denoptim.fragspace.FragmentSpaceTest.RULAPC1, denoptim.fragspace.FragmentSpaceTest.RULAPC2, denoptim.fragspace.FragmentSpaceTest.RULAPC3, denoptim.fragspace.FragmentSpaceTest.RULAPC4, denoptim.fragspace.FragmentSpaceTest.RULAPC5, denoptim.fragspace.FragmentSpaceTest.RULAPC6, denoptim.fragspace.FragmentSpaceTest.RULAPCC1, denoptim.fragspace.FragmentSpaceTest.RULAPCC2, denoptim.fragspace.FragmentSpaceTest.RULAPCS, denoptim.fragspace.FragmentSpaceTest.SEP, denoptim.graph.Edge.BondType.SINGLE, denoptim.fragspace.FragmentSpaceTest.tempDir, denoptim.io.DenoptimIO.writeCompatibilityMatrix(), and denoptim.io.DenoptimIO.writeVertexesToSDF().
Referenced by denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass(), denoptim.fragspace.FragmentSpaceTest.testSymmetry(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
private |
Definition at line 751 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.fragspace.FragmentSpaceTest.APC1, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpaceTest.getRandomVector(), and denoptim.utils.GraphUtils.getUniqueVertexIndex().
Referenced by denoptim.fragspace.FragmentSpaceTest.getTestCase().
|
private |
Definition at line 735 of file FragmentSpaceTest.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.renumberGraphVertices(), denoptim.graph.Vertex.setBuildingBlockId(), and denoptim.graph.Template.setInnerGraph().
Referenced by denoptim.fragspace.FragmentSpaceTest.getTestCase().
|
private |
Definition at line 788 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.rng.
Referenced by denoptim.fragspace.FragmentSpaceTest.getCarbonVertex(), and denoptim.fragspace.FragmentSpaceTest.getRCV().
|
private |
Definition at line 770 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.fragspace.FragmentSpaceTest.APC1, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpaceTest.getRandomVector(), and denoptim.utils.GraphUtils.getUniqueVertexIndex().
Referenced by denoptim.fragspace.FragmentSpaceTest.getTestCase().
|
private |
↑ ↑ ← C1 - C2 - C3 → . / | ↓ C4 . C5 → ↓ ↓
Definition at line 699 of file FragmentSpaceTest.java.
References denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), denoptim.fragspace.FragmentSpaceTest.getCarbonVertex(), denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate(), denoptim.fragspace.FragmentSpaceTest.getRCV(), and denoptim.graph.DGraph.renumberGraphVertices().
Referenced by denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), and denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce().
void denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary | ( | ) | throws Exception |
Check that the following graph's fused ring gets added to the fragment library.
Dots are chords ↑ ↑ ← C1 - C2 - C3 → . / | ↓ C4 . C5 → ↓ ↓
Exception |
Definition at line 597 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.files.FileUtils.deleteFile(), denoptim.fragspace.FragmentSpaceTest.TestCase.expected, denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.fragspace.FragmentSpaceTest.TestCase.graph, and denoptim.graph.Template.sameAs().
void denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary | ( | ) | throws Exception |
Checks that a graph with a fused ring containing a scaffold vertex is added to the scaffold library.
Exception |
Definition at line 630 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.files.FileUtils.deleteFile(), denoptim.fragspace.FragmentSpaceTest.TestCase.expected, denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.graph.Template.getInnerGraph(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.fragspace.FragmentSpace.getScaffoldLibrary(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.graph.DGraph.getVertexList(), denoptim.fragspace.FragmentSpaceTest.TestCase.graph, denoptim.graph.Template.sameAs(), denoptim.graph.Vertex.BBType.SCAFFOLD, and denoptim.graph.Vertex.setBuildingBlockType().
void denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce | ( | ) | throws DENOPTIMException |
Definition at line 660 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.DGraph.clone(), denoptim.files.FileUtils.deleteFile(), denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), and denoptim.fragspace.FragmentSpaceTest.TestCase.graph.
void denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass | ( | ) | throws Exception |
Definition at line 323 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.APC1, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithClass(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.graph.APClass.isCPMapCompatibleWith(), denoptim.fragspace.FragmentSpace.isDefined(), and denoptim.graph.Vertex.newVertexFromLibrary().
void denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs | ( | ) | throws Exception |
Definition at line 348 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.BBTFRAG, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.fragspace.IdFragmentAndAP.getApId(), denoptim.fragspace.FragmentSpace.getFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.fragspace.IdFragmentAndAP.getVertexMolId(), denoptim.fragspace.IdFragmentAndAP.getVertexMolType(), denoptim.graph.APClass.isCPMapCompatibleWith(), denoptim.fragspace.FragmentSpace.isDefined(), and denoptim.graph.Vertex.newVertexFromLibrary().
void denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs | ( | ) | throws Exception |
Definition at line 398 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.BBTFRAG, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.fragspace.FragmentSpace.getFragmentsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), and denoptim.fragspace.FragmentSpace.isDefined().
void denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass | ( | ) | throws Exception |
Definition at line 301 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.APC2, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.fragspace.FragmentSpace.getFragsWithAPClass(), denoptim.fragspace.FragmentSpace.isDefined(), and denoptim.graph.Vertex.newVertexFromLibrary().
void denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass | ( | ) | throws Exception |
Definition at line 418 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.fragspace.FragmentSpace.getRCVsForAPClass(), denoptim.graph.APClass.make(), denoptim.graph.APClass.RCACLASSMINUS, denoptim.graph.APClass.RCACLASSPLUS, denoptim.graph.rings.RingClosingAttractor.RCALABELPERAPCLASS, denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), and denoptim.graph.Vertex.setAsRCV().
void denoptim.fragspace.FragmentSpaceTest.testGetRCVsWithAPClass | ( | ) | throws Exception |
Definition at line 512 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.fragspace.FragmentSpace.getRCVsWithAPClass(), denoptim.graph.APClass.make(), denoptim.graph.APClass.RCACLASSMINUS, denoptim.graph.APClass.RCACLASSPLUS, denoptim.graph.rings.RingClosingAttractor.RCALABELPERAPCLASS, denoptim.graph.Fragment.sameAs(), denoptim.fragspace.FragmentSpace.setAPclassBasedApproach(), and denoptim.graph.Vertex.setAsRCV().
void denoptim.fragspace.FragmentSpaceTest.testSymmetry | ( | ) | throws Exception |
Definition at line 276 of file FragmentSpaceTest.java.
References denoptim.fragspace.FragmentSpaceTest.APC4, denoptim.fragspace.FragmentSpaceTest.APC5, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.graph.Vertex.getSymmetricAPSets(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.fragspace.FragmentSpace.isDefined(), and denoptim.graph.Vertex.newVertexFromLibrary().
void denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates | ( | ) | throws Exception |
Works with this graph:
c1 | v1--v2--v3 | | | v11 | (chord) | v10 c3 | | | v4--v6--v9--v5---v7 | \ | c2 \ v12 | (chord) \ v13 \ | v8-v13 | c4
Definition at line 836 of file FragmentSpaceTest.java.
References denoptim.graph.Fragment.addAPOnAtom(), denoptim.graph.Fragment.addAtom(), denoptim.graph.Fragment.addBond(), denoptim.graph.DGraph.addEdge(), denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.fragspace.FragmentSpaceTest.APC2, denoptim.fragspace.FragmentSpaceTest.APC3, denoptim.fragspace.FragmentSpaceTest.APC4, denoptim.fragspace.FragmentSpace.appendVertexToLibrary(), denoptim.fragspace.FragmentSpaceTest.BBTFRAG, denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraph.clone(), denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.files.FileUtils.deleteFile(), denoptim.graph.Edge.BondType.DOUBLE, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.fragspace.FragmentSpace.getFragmentLibrary(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.graph.Vertex.getIAtomContainer(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedFragments(), denoptim.fragspace.FragmentSpaceParameters.getPathnameToAppendedScaffolds(), denoptim.programs.RunTimeParameters.getRandomizer(), denoptim.fragspace.FragmentSpace.getScaffoldLibrary(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.graph.APClass.make(), denoptim.graph.Fragment.projectAPsToProperties(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.fragspace.FragmentSpaceTest.SEP, denoptim.graph.Vertex.setAsRCV(), denoptim.graph.Edge.BondType.SINGLE, and denoptim.fragspace.FragmentSpaceTest.tempDir.
|
staticprivate |
Definition at line 97 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), denoptim.fragspace.FragmentSpaceTest.getCarbonVertex(), denoptim.fragspace.FragmentSpaceTest.getRCV(), and denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithClass().
|
staticprivate |
|
staticprivate |
Definition at line 99 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
staticprivate |
|
staticprivate |
Definition at line 101 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), and denoptim.fragspace.FragmentSpaceTest.testSymmetry().
|
staticprivate |
Definition at line 102 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 103 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 104 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 96 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 82 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 94 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.testGetFragAPsCompatibleWithTheseAPs(), denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
private |
Definition at line 80 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.getRandomVector().
|
staticprivate |
Definition at line 85 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 86 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 87 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 88 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 89 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 90 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 91 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 92 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 84 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace().
|
staticprivate |
Definition at line 75 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
staticpackage |
Definition at line 78 of file FragmentSpaceTest.java.
Referenced by denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().