$darkmode
DENOPTIM
denoptim.fragspace.FragmentSpaceTest Class Reference

Unit test for fragment space. More...

Collaboration diagram for denoptim.fragspace.FragmentSpaceTest:
[legend]

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
 

Detailed Description

Unit test for fragment space.

Author
Marco Foscato

Definition at line 73 of file FragmentSpaceTest.java.

Member Function Documentation

◆ buildFragmentSpace()

FragmentSpaceParameters denoptim.fragspace.FragmentSpaceTest.buildFragmentSpace ( ) throws DENOPTIMException
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getCarbonVertex()

Fragment denoptim.fragspace.FragmentSpaceTest.getCarbonVertex ( ) throws DENOPTIMException
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getExpectedTemplate()

Template denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate ( DGraph  g,
Vertex  c3 
) throws DENOPTIMException
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRandomVector()

Point3d denoptim.fragspace.FragmentSpaceTest.getRandomVector ( )
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().

Here is the caller graph for this function:

◆ getRCV()

Vertex denoptim.fragspace.FragmentSpaceTest.getRCV ( ) throws DENOPTIMException
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getTestCase()

TestCase denoptim.fragspace.FragmentSpaceTest.getTestCase ( ) throws DENOPTIMException
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().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ testFusedRingAddedToFragmentLibrary()

void denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToFragmentLibrary ( ) throws Exception

◆ testFusedRingAddedToScaffoldLibrary()

◆ testFusedRingOnlyAddedOnce()

◆ testGetFragAPsCompatibleWithClass()

◆ testGetFragAPsCompatibleWithTheseAPs()

◆ testGetFragmentsCompatibleWithTheseAPs()

void denoptim.fragspace.FragmentSpaceTest.testGetFragmentsCompatibleWithTheseAPs ( ) throws Exception

◆ testGetFragsWithAPClass()

void denoptim.fragspace.FragmentSpaceTest.testGetFragsWithAPClass ( ) throws Exception

◆ testGetRCVsForAPClass()

void denoptim.fragspace.FragmentSpaceTest.testGetRCVsForAPClass ( ) throws Exception

◆ testGetRCVsWithAPClass()

◆ testSymmetry()

◆ testUseWholeMolGeometryForExtractedTemplates()

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.

Here is the call graph for this function:

Member Data Documentation

◆ APC1

◆ APC2

◆ APC3

◆ APC4

◆ APC5

APClass denoptim.fragspace.FragmentSpaceTest.APC5
staticprivate

◆ APC6

APClass denoptim.fragspace.FragmentSpaceTest.APC6
staticprivate

◆ APCC1

APClass denoptim.fragspace.FragmentSpaceTest.APCC1
staticprivate

◆ APCC2

APClass denoptim.fragspace.FragmentSpaceTest.APCC2
staticprivate

◆ APCS

APClass denoptim.fragspace.FragmentSpaceTest.APCS
staticprivate

◆ APSUBRULE

final int denoptim.fragspace.FragmentSpaceTest.APSUBRULE = 0
staticprivate

◆ BBTFRAG

◆ rng

final Random denoptim.fragspace.FragmentSpaceTest.rng = new Random()
private

◆ RULAPC1

final String denoptim.fragspace.FragmentSpaceTest.RULAPC1 = "apc-1"
staticprivate

◆ RULAPC2

final String denoptim.fragspace.FragmentSpaceTest.RULAPC2 = "apc-2"
staticprivate

◆ RULAPC3

final String denoptim.fragspace.FragmentSpaceTest.RULAPC3 = "apc-3"
staticprivate

◆ RULAPC4

final String denoptim.fragspace.FragmentSpaceTest.RULAPC4 = "apc-4"
staticprivate

◆ RULAPC5

final String denoptim.fragspace.FragmentSpaceTest.RULAPC5 = "apc-5"
staticprivate

◆ RULAPC6

final String denoptim.fragspace.FragmentSpaceTest.RULAPC6 = "apc-6"
staticprivate

◆ RULAPCC1

final String denoptim.fragspace.FragmentSpaceTest.RULAPCC1 = "cap-1"
staticprivate

◆ RULAPCC2

final String denoptim.fragspace.FragmentSpaceTest.RULAPCC2 = "cap-2"
staticprivate

◆ RULAPCS

final String denoptim.fragspace.FragmentSpaceTest.RULAPCS = "apc-S"
staticprivate

◆ SEP

final String denoptim.fragspace.FragmentSpaceTest.SEP = System.getProperty("file.separator")
staticprivate

◆ tempDir

File denoptim.fragspace.FragmentSpaceTest.tempDir
staticpackage

The documentation for this class was generated from the following file: