$darkmode
DENOPTIM
|
Utilities for graphs. More...
Static Public Member Functions | |
static synchronized void | ensureVertexIDConsistency (long l) throws DENOPTIMException |
Method used to ensure consistency between internal atomic integer and vertex id from imported graphs. More... | |
static synchronized void | resetUniqueVertexCounter (long l) throws DENOPTIMException |
Reset the unique vertex counter to the given value. More... | |
static synchronized long | getUniqueVertexIndex () |
Unique counter for the number of graph vertices generated. More... | |
static synchronized void | resetUniqueGraphCounter (int val) throws DENOPTIMException |
Reset the unique graph counter to the given value. More... | |
static synchronized int | getUniqueGraphIndex () |
Unique counter for the number of graphs generated. More... | |
static synchronized void | resetUniqueMoleculeCounter (int val) throws DENOPTIMException |
Reset the unique mol counter to the given value. More... | |
static synchronized int | getUniqueMoleculeIndex () |
Unique counter for the number of molecules generated. More... | |
static void | writeSDFFields (IAtomContainer iac, DGraph g) throws DENOPTIMException |
static String | getLabel (Vertex v) |
static String | getLabel (DGraph g, int vIdx) |
Static Public Attributes | |
static AtomicLong | vertexCounter = new AtomicLong(1) |
Static Private Attributes | |
static AtomicInteger | graphCounter = new AtomicInteger(1) |
static AtomicInteger | molCounter = new AtomicInteger(1) |
Utilities for graphs.
Definition at line 39 of file GraphUtils.java.
|
static |
Method used to ensure consistency between internal atomic integer and vertex id from imported graphs.
The latter can be greater than the first, thus requiring a reset of the atomic integer to a new, larger than before, value.
g |
DENOPTIMException |
Definition at line 55 of file GraphUtils.java.
References denoptim.utils.GraphUtils.getUniqueVertexIndex(), and denoptim.utils.GraphUtils.resetUniqueVertexCounter().
Referenced by denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.DGraph.insertVertex(), denoptim.graph.DGraph.removeVertexAndWeld(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), and denoptim.ga.EAUtils.setVertexCounterValue().
|
static |
Definition at line 220 of file GraphUtils.java.
References denoptim.graph.DGraph.getGraphId(), denoptim.graph.Vertex.getProperty(), denoptim.graph.DGraph.getVertexAtPosition(), and denoptim.graph.Vertex.hasProperty().
|
static |
Definition at line 210 of file GraphUtils.java.
References denoptim.graph.DGraph.getGraphId(), denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.Vertex.getProperty(), and denoptim.graph.Vertex.hasProperty().
Referenced by denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints().
|
static |
Unique counter for the number of graphs generated.
DENOPTIMException |
Definition at line 142 of file GraphUtils.java.
References denoptim.utils.GraphUtils.graphCounter.
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), denoptim.combinatorial.CombinatorialExplorerByLayer.exploreCombinationsAtGivenLevel(), denoptim.ga.EAUtils.getPopulationFromFile(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint(), and denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold().
|
static |
Unique counter for the number of molecules generated.
Definition at line 184 of file GraphUtils.java.
References denoptim.utils.GraphUtils.molCounter.
Referenced by denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.getPopulationFromFile(), denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint(), denoptim.ga.EAUtils.readCandidateFromFile(), and denoptim.combinatorial.GraphBuildingTask.sendToFitnessProvider().
|
static |
Unique counter for the number of graph vertices generated.
Definition at line 97 of file GraphUtils.java.
References denoptim.utils.GraphUtils.vertexCounter.
Referenced by denoptim.graph.DGraph.addCappingGroups(), denoptim.ga.GraphOperations.addRing(), denoptim.ga.GraphOperations.attachFragmentInClosableChain(), denoptim.ga.GraphOperationsTest.buildFragment(), denoptim.graph.EmptyVertex.EmptyVertex(), denoptim.utils.GraphUtils.ensureVertexIDConsistency(), denoptim.ga.GraphOperations.extendGraph(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.graph.TemplateTest.getAmideFragment(), denoptim.fragspace.FragmentSpaceTest.getCarbonVertex(), denoptim.graph.TemplateTest.getCH2Fragment(), denoptim.graph.TemplateTest.getOHFragment(), denoptim.fragspace.FragmentSpaceTest.getRCV(), denoptim.fragspace.FragmentSpace.getVertexFromLibrary(), denoptim.graph.DGraph.insertVertex(), denoptim.combinatorial.CombinatorialExplorerByLayer.makeCheckPoint(), denoptim.fragspace.FragmentSpace.makeRandomScaffold(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.graph.DGraph.renumberVerticesGetMap(), denoptim.graph.DGraph.replaceVertex(), denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold(), denoptim.fragspace.FragmentSpaceTest.testSymmetry(), and denoptim.graph.Vertex.Vertex().
|
static |
Reset the unique graph counter to the given value.
In order to keep the uniqueness on the index, this method accepts only reset values that are higher that the current one. Attempts to reset to lower values return an exception.
val | the new value for the counter. This value will be given to next call of the getUniqueGraphIndex method. |
DENOPTIMException | if the reset value is lower than the current value of the index. |
Definition at line 121 of file GraphUtils.java.
References denoptim.utils.GraphUtils.graphCounter.
Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.run().
|
static |
Reset the unique mol counter to the given value.
In order to keep the uniqueness on the index, this method accepts only reset values that are higher that the current one. Attempts to reset to lower values return an exception.
val | the new value for the counter. This value will be given to next call of the getUniqueMoleculeIndex method. |
DENOPTIMException | if the reset value is lower than the current value of the index. |
Definition at line 164 of file GraphUtils.java.
References denoptim.utils.GraphUtils.molCounter.
Referenced by denoptim.combinatorial.CombinatorialExplorerByLayer.run().
|
static |
Reset the unique vertex counter to the given value.
In order to keep the uniqueness on the index, this method accepts only reset values that are higher that the current one. Attempts to reset to lower values return an exception.
l | the new value for the counter. This value will be given to next call of the getUniqueVertexIndex method. |
DENOPTIMException | if the reset value is lower than the current value of the index. |
Definition at line 77 of file GraphUtils.java.
References denoptim.utils.GraphUtils.vertexCounter.
Referenced by denoptim.utils.GraphUtils.ensureVertexIDConsistency(), and denoptim.combinatorial.CombinatorialExplorerByLayer.run().
|
static |
Definition at line 195 of file GraphUtils.java.
References denoptim.constants.DENOPTIMConstants.GCODETAG, denoptim.constants.DENOPTIMConstants.GRAPHJSONTAG, denoptim.constants.DENOPTIMConstants.GRAPHTAG, and denoptim.constants.DENOPTIMConstants.PROVENANCE.
Referenced by denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), and denoptim.io.DenoptimIO.writeGraphsToSDF().
|
staticprivate |
Definition at line 42 of file GraphUtils.java.
Referenced by denoptim.utils.GraphUtils.getUniqueGraphIndex(), and denoptim.utils.GraphUtils.resetUniqueGraphCounter().
|
staticprivate |
Definition at line 43 of file GraphUtils.java.
Referenced by denoptim.utils.GraphUtils.getUniqueMoleculeIndex(), and denoptim.utils.GraphUtils.resetUniqueMoleculeCounter().
|
static |
Definition at line 41 of file GraphUtils.java.
Referenced by denoptim.utils.GraphUtils.getUniqueVertexIndex(), and denoptim.utils.GraphUtils.resetUniqueVertexCounter().