$darkmode
DENOPTIM
|
Unit test for DENOPTIMTemplate. More...
Public Member Functions | |
void | testClone () throws Exception |
void | testNestedTemplateCloning () |
void | testGetAttachmentPoints_returnsAPsWithTemplateAsOwner () throws DENOPTIMException |
void | testGetAttachmentPoints_returnsCorrectNumberOfAPs () throws DENOPTIMException |
void | testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs () throws DENOPTIMException |
void | testAddAP_after_setInnerGraph_throwsException () |
void | testGetIAtomContainer () throws Exception |
void | testGetIAtomContainer_DeepVertex () throws Exception |
Static Public Member Functions | |
static Template | getTestAmideTemplate () throws DENOPTIMException |
Builds a template object meant for tests. More... | |
Package Attributes | |
final long | SEED = 13 |
Random | rng = new Random(SEED) |
File | tempDir |
Static Package Attributes | |
static IChemObjectBuilder | chemBuilder = DefaultChemObjectBuilder.getInstance() |
Private Member Functions | |
Template | getNestedTemplate () throws DENOPTIMException |
Creating a template that contains another template with the following structure: |--------------------—| | |-----—| | | * - CH_2 - | * - OH | | | |-----—| | |--------------------—| The box containing the 'OH' represents the nested template and the outermost box represents the outermost template. More... | |
Vertex | getOHFragment () throws DENOPTIMException |
void | testSameAPClass (Template t, DGraph innerGraph) |
void | testAtLeastSameNumberOfAPs (Template t, int expNumberOfAPs) throws DENOPTIMException |
Template | getTemplateDeepTest () throws DENOPTIMException |
Static Private Member Functions | |
static Vertex | getCH2Fragment () throws DENOPTIMException |
The coordinates hard coded in this method must not be changed because they are needed to reproduce results in testGetIAtomContainer() . More... | |
static Vertex | getAmideFragment () throws DENOPTIMException |
The coordinates hard coded in this method must not be changed because they are needed to reproduce results in testGetIAtomContainer() . More... | |
Private Attributes | |
final String | NL = System.getProperty("line.separator") |
final String | SEP = System.getProperty("file.separator") |
Unit test for DENOPTIMTemplate.
Definition at line 55 of file TemplateTest.java.
|
staticprivate |
The coordinates hard coded in this method must not be changed because they are needed to reproduce results in testGetIAtomContainer()
.
DENOPTIMException |
Definition at line 238 of file TemplateTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.TemplateTest.chemBuilder, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.utils.GraphUtils.getUniqueVertexIndex(), and denoptim.graph.APClass.make().
Referenced by denoptim.graph.TemplateTest.getTestAmideTemplate().
|
staticprivate |
The coordinates hard coded in this method must not be changed because they are needed to reproduce results in testGetIAtomContainer()
.
DENOPTIMException |
Definition at line 196 of file TemplateTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.TemplateTest.chemBuilder, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.utils.GraphUtils.getUniqueVertexIndex(), and denoptim.graph.APClass.make().
Referenced by denoptim.graph.TemplateTest.getNestedTemplate(), denoptim.graph.TemplateTest.getTemplateDeepTest(), and denoptim.graph.TemplateTest.getTestAmideTemplate().
|
private |
Creating a template that contains another template with the following structure: |--------------------—| | |-----—| | | * - CH_2 - | * - OH | | | |-----—| | |--------------------—| The box containing the 'OH' represents the nested template and the outermost box represents the outermost template.
Definition at line 168 of file TemplateTest.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.Vertex.getAP(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.TemplateTest.getOHFragment(), and denoptim.graph.Template.setInnerGraph().
Referenced by denoptim.graph.TemplateTest.testNestedTemplateCloning().
|
private |
DENOPTIMException |
Definition at line 283 of file TemplateTest.java.
References denoptim.graph.Fragment.addAP(), denoptim.graph.TemplateTest.chemBuilder, denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.graph.APClass.make(), and denoptim.graph.TemplateTest.rng.
Referenced by denoptim.graph.TemplateTest.getNestedTemplate().
|
private |
Definition at line 576 of file TemplateTest.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.TemplateTest.getTestAmideTemplate(), denoptim.graph.Template.setInnerGraph(), denoptim.graph.Vertex.setVertexId(), and denoptim.graph.Vertex.BBType.UNDEFINED.
Referenced by denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex().
|
static |
Builds a template object meant for tests.
The inner graph has the following structure;
-->AP / AP<--v7<--v5<--v3<--v1-->v9-->AP
Before calling this method from outside its class, you should call TemplateTest#setUp()
to prepare the fragment space.
DENOPTIMException |
Definition at line 456 of file TemplateTest.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.TemplateTest.getAmideFragment(), denoptim.graph.Vertex.getAP(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.Template.setInnerGraph(), and denoptim.graph.Vertex.BBType.UNDEFINED.
Referenced by denoptim.graph.TemplateTest.getTemplateDeepTest(), denoptim.graph.TemplateTest.testGetIAtomContainer(), denoptim.io.DenoptimIOTest.testIOTemplate(), and denoptim.json.DENOPTIMgsonTest.testTemplateSerialization().
void denoptim.graph.TemplateTest.testAddAP_after_setInnerGraph_throwsException | ( | ) |
Definition at line 431 of file TemplateTest.java.
References denoptim.graph.Template.addRequiredAP(), denoptim.graph.APClass.make(), denoptim.graph.Vertex.BBType.NONE, and denoptim.graph.Template.setInnerGraph().
|
private |
Definition at line 415 of file TemplateTest.java.
References denoptim.graph.EmptyVertex.addAP(), and denoptim.graph.DGraph.addVertex().
Referenced by denoptim.graph.TemplateTest.testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs().
void denoptim.graph.TemplateTest.testClone | ( | ) | throws Exception |
Definition at line 70 of file TemplateTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Template.clone(), denoptim.graph.Template.freezeTemplate(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.AttachmentPoint.getAtomPositionNumber(), denoptim.graph.Vertex.getFreeAPCount(), denoptim.graph.Template.getInnerGraph(), denoptim.graph.Vertex.getProperty(), denoptim.graph.DGraph.getRingCount(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.Vertex.BBType.NONE, denoptim.graph.Vertex.setAsRCV(), denoptim.graph.Template.setInnerGraph(), and denoptim.graph.Vertex.setProperty().
void denoptim.graph.TemplateTest.testGetAttachmentPoints_returnsAPsWithTemplateAsOwner | ( | ) | throws DENOPTIMException |
Definition at line 314 of file TemplateTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Vertex.getAttachmentPoints(), and denoptim.graph.Vertex.BBType.NONE.
void denoptim.graph.TemplateTest.testGetAttachmentPoints_returnsCorrectNumberOfAPs | ( | ) | throws DENOPTIMException |
Definition at line 335 of file TemplateTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), and denoptim.graph.Vertex.BBType.NONE.
void denoptim.graph.TemplateTest.testGetIAtomContainer | ( | ) | throws Exception |
Definition at line 480 of file TemplateTest.java.
References denoptim.utils.MoleculeUtils.countAtomsOfElement(), denoptim.graph.Template.getAttachmentPoints(), denoptim.graph.Template.getIAtomContainer(), denoptim.graph.TemplateTest.getTestAmideTemplate(), denoptim.graph.TemplateTest.NL, denoptim.io.DenoptimIO.readSDFFile(), denoptim.graph.TemplateTest.SEP, denoptim.graph.TemplateTest.tempDir, and denoptim.io.DenoptimIO.writeData().
void denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex | ( | ) | throws Exception |
Definition at line 600 of file TemplateTest.java.
References denoptim.utils.MoleculeUtils.countAtomsOfElement(), denoptim.graph.Template.getAttachmentPoints(), denoptim.graph.Template.getIAtomContainer(), denoptim.graph.TemplateTest.getTemplateDeepTest(), denoptim.graph.TemplateTest.NL, denoptim.io.DenoptimIO.readSDFFile(), denoptim.graph.TemplateTest.SEP, denoptim.graph.TemplateTest.tempDir, and denoptim.io.DenoptimIO.writeData().
void denoptim.graph.TemplateTest.testNestedTemplateCloning | ( | ) |
Definition at line 144 of file TemplateTest.java.
References denoptim.graph.Template.clone(), denoptim.graph.TemplateTest.getNestedTemplate(), and denoptim.graph.Template.sameAs().
Definition at line 399 of file TemplateTest.java.
References denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.AttachmentPoint.setAPClass(), and denoptim.graph.Template.setInnerGraph().
Referenced by denoptim.graph.TemplateTest.testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs().
void denoptim.graph.TemplateTest.testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs | ( | ) | throws DENOPTIMException |
Definition at line 370 of file TemplateTest.java.
References denoptim.graph.EmptyVertex.addAP(), denoptim.graph.DGraph.addVertex(), denoptim.graph.APClass.make(), denoptim.graph.Vertex.BBType.NONE, denoptim.graph.TemplateTest.testAtLeastSameNumberOfAPs(), and denoptim.graph.TemplateTest.testSameAPClass().
|
staticpackage |
Definition at line 59 of file TemplateTest.java.
Referenced by denoptim.graph.TemplateTest.getAmideFragment(), denoptim.graph.TemplateTest.getCH2Fragment(), and denoptim.graph.TemplateTest.getOHFragment().
|
private |
Definition at line 64 of file TemplateTest.java.
Referenced by denoptim.graph.TemplateTest.testGetIAtomContainer(), and denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex().
|
package |
Definition at line 58 of file TemplateTest.java.
Referenced by denoptim.graph.TemplateTest.getOHFragment().
|
package |
Definition at line 57 of file TemplateTest.java.
|
private |
Definition at line 65 of file TemplateTest.java.
Referenced by denoptim.graph.TemplateTest.testGetIAtomContainer(), and denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex().
|
package |
Definition at line 62 of file TemplateTest.java.
Referenced by denoptim.graph.TemplateTest.testGetIAtomContainer(), and denoptim.graph.TemplateTest.testGetIAtomContainer_DeepVertex().