$darkmode
DENOPTIM
|
Tool to convert string into graphs and into molecular representation. More...
Static Public Member Functions | |
static DGraph | getGraphFromString (String strGraph, FragmentSpace fragSpace) throws DENOPTIMException |
Given a formatted string-like representation of a DENOPTIM graph create the corresponding DENOPTIMGraph object. More... | |
static DGraph | getGraphFromString (String strGraph, boolean useMolInfo, FragmentSpace fragSpace) throws DENOPTIMException |
Given a formatted string-like representation of a DENOPTIM graph create the corresponding DENOPTIMGraph object. More... | |
static DefaultUndirectedGraph< Vertex, UndirectedEdge > | getJGraphFromGraph (DGraph dg) |
Converts a DGraph into a simplified JGraphT DefaultUndirectedGraph . More... | |
static DefaultUndirectedGraph< Node, NodeConnection > | getJGraphKernelFromGraph (DGraph dg) |
Converts a DGraph into a simplified JGraphT DefaultUndirectedGraph . More... | |
Tool to convert string into graphs and into molecular representation.
Definition at line 53 of file GraphConversionTool.java.
|
static |
Given a formatted string-like representation of a DENOPTIM graph create the corresponding DENOPTIMGraph
object.
strGraph | the string representation in DENOPTIM format. NOTE: this is not the serialized representation of a DENOPTIMGraph , but the string obtained by the toString method the DENOPTIMGraph . |
useMolInfo | set to true when molecular information is available for all fragments. That is, the libraries of fragments provided to the FragmentSpace correspond to the fragments implied in the string-representation of the graph. |
denoptim.exception.DENOPTIMException |
Template
. Use JSON string instead. Definition at line 100 of file GraphConversionTool.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.EmptyVertex.addAP(), denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.getNumberOfAPs(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.Vertex.BBType.parseInt(), denoptim.graph.Edge.BondType.parseStr(), denoptim.graph.AttachmentPoint.setAPClass(), and denoptim.graph.DGraph.setGraphId().
|
static |
Given a formatted string-like representation of a DENOPTIM graph create the corresponding DENOPTIMGraph
object.
This method assumes the correspondence between the graph and the loaded fragment space.
strGraph | the string representation in DENOPTIM format. NOTE: this is not the serialized representation of a DENOPTIMGraph , but the string obtained by the toString method the DENOPTIMGraph . |
denoptim.exception.DENOPTIMException |
Definition at line 72 of file GraphConversionTool.java.
References denoptim.utils.GraphConversionTool.getGraphFromString().
Referenced by denoptim.utils.GraphConversionTool.getGraphFromString(), and denoptim.io.DenoptimIO.readDENOPTIMGraphsFromTxtFile().
|
static |
Converts a DGraph
into a simplified JGraphT DefaultUndirectedGraph
.
The simplification consist of not producing a 1:1 list of vertexes and edges compared to the DGraph
. Instead,
dg | the graph to convert. |
Definition at line 347 of file GraphConversionTool.java.
References denoptim.graph.AttachmentPoint.getBondType(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.Vertex.getParent(), denoptim.graph.DGraph.getRings(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.Vertex.isRCV, and denoptim.graph.DGraph.isVertexInRing().
Referenced by denoptim.graph.DGraph.isIsomorphicTo().
|
static |
Converts a DGraph
into a simplified JGraphT DefaultUndirectedGraph
.
The simplification is even greater than for graphs produced by
getJGraphFromGraph(DGraph)
in that the content of each vertex and the identify of the attachment points are both ignored. However, in this method any free AttachmentPoint
on the given graph will be converted into a node of the JGraphT, so that the location of AttachmentPoint
s relative to the structure of the graph can be detected.
dg | the graph to convert. |
Definition at line 409 of file GraphConversionTool.java.
References denoptim.graph.DGraph.getAvailableAPs(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.Vertex.getParent(), denoptim.graph.Vertex.getProperty(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.Vertex.isRCV, denoptim.graph.DGraph.isVertexInRing(), and denoptim.graph.simplified.Node.REFTOVERTEXKERNEL.
Referenced by denoptim.graph.DGraph.isIsostructuralTo(), and denoptim.utils.GraphConversionToolTest.testGetJGraphKernelFromGraph().