$darkmode
DENOPTIM
|
Container for the list of vertices and the edges that connect them. More...
Classes | |
class | DENOPTIMGraphDeserializer |
class | DENOPTIMGraphSerializer |
We expect unique IDs for vertices. More... | |
class | EdgeFinder |
Utility to make selection of edges to a vertex tunable by a parameter. More... | |
enum | StringFormat |
Identifier for the format of string representations of a graph. More... | |
Public Member Functions | |
DGraph (List< Vertex > gVertices, List< Edge > gEdges) | |
DGraph (List< Vertex > gVertices, List< Edge > gEdges, List< Ring > gRings) | |
DGraph (List< Vertex > gVertices, List< Edge > gEdges, List< Ring > gRings, List< SymmetricVertexes > symSets) | |
DGraph (List< Vertex > gVertices, List< Edge > gEdges, List< Ring > gRings, List< ClosableChain > closableChains, List< SymmetricVertexes > symVertices) | |
DGraph () | |
void | setCandidateOwner (Candidate candidate) |
Sets the reference to the candidate item that is defined by this graph. More... | |
Candidate | getCandidateOwner () |
Returns the reference of the candidate item that is defined by this graph. More... | |
void | setGraphId (int id) |
int | getGraphId () |
void | setLocalMsg (String msg) |
String | getLocalMsg () |
boolean | hasSymmetricAP () |
boolean | hasSymmetryInvolvingVertex (Vertex v) |
int | getSymmetricSetCount () |
Returns the number of symmetric sets of vertices. More... | |
Iterator< SymmetricVertexes > | getSymSetsIterator () |
Get an iterator for the sets of symmetrically related vertices. More... | |
List< Vertex > | getSymVerticesForVertex (Vertex v) |
boolean | detectSymVertexSets () throws DENOPTIMException |
Tries to determine the set of symmetric vertices in this graph based on finding compatible Vertex es that are either using symmetric AttachmentPoint s (NB: all symmetric APs must be in use by vertexes that are compatible with each other) or that are downstream (i.e., according to edge direction) w.r.t Vertex es that are using symmetric AttachmentPoint s.The compatibility of the vertexes is determined by these criteria: More... | |
void | removeSymmetrySet (SymmetricVertexes ss) |
Removed the given symmetric set, if present. More... | |
SymmetricVertexes | getSymSetForVertex (Vertex v) |
Returns the set of vertexes symmetric to the given one. More... | |
void | setSymmetricVertexSets (List< SymmetricVertexes > symVertices) |
void | addSymmetricSetOfVertices (SymmetricVertexes symSet) throws DENOPTIMException |
Adds a symmetric set of vertices to this graph. More... | |
void | setVertexList (ArrayList< Vertex > vertices) |
void | setEdgeList (ArrayList< Edge > edges) |
void | setRings (ArrayList< Ring > rings) |
void | setCandidateClosableChains (ArrayList< ClosableChain > closableChains) |
List< ClosableChain > | getClosableChains () |
List< Vertex > | getVertexList () |
Vertex | getSourceVertex () |
Identifies and return the vertex from which the spanning tree originates. More... | |
List< Edge > | getEdgeList () |
List< Ring > | getRings () |
List< Edge > | getEdgesWithSrc (Vertex v) |
Returns the list of edges that depart from the given vertex, i.e., edges where the srcAP is owned by the given vertex. More... | |
List< Edge > | getEdgesWithTrg (Vertex v) |
Returns the list of edges that arrive from the given vertex, i.e., edges where the trgAP is owned by the given vertex. More... | |
ArrayList< Ring > | getRingsInvolvingVertex (Vertex v) |
Returns the list of rings that include the given vertex in their fundamental cycle. More... | |
ArrayList< Ring > | getRingsInvolvingVertex (Vertex[] vs) |
Returns the list of rings that include the given list of vertices in their fundamental cycle. More... | |
ArrayList< Ring > | getRingsInvolvingVertexID (int vid) |
boolean | hasRings () |
Check for rings in this graph. More... | |
boolean | hasOrEmbedsRings () |
Check for rings in this graph and in any graph that is embedded at any level in any vertex of this graph. More... | |
boolean | isVertexIDInRing (int vid) |
boolean | isVertexInRing (Vertex v) |
ArrayList< Vertex > | getRCVertices () |
Search for ring closing vertices: vertices that contain only a RingClosingAttractor More... | |
ArrayList< Vertex > | getFreeRCVertices () |
Search for unused ring closing vertices: vertices that contain only a RingClosingAttractor and are not part of any DENOPTIMRing More... | |
ArrayList< Vertex > | getUsedRCVertices () |
Search for used ring closing vertices: vertices that contain only a RingClosingAttractor and are part of a DENOPTIMRing . More... | |
void | addEdge (Edge edge) |
Adds the edge to the list of edges belonging to this graph. More... | |
void | addRing (Ring ring) |
void | addRing (Vertex vI, Vertex vJ) throws DENOPTIMException |
Adds a chord between the given vertices, thus adding a ring in this graph. More... | |
void | addRing (Vertex vI, Vertex vJ, BondType bndTyp) |
Adds a chord between the given vertices, thus adding a ring in this graph. More... | |
void | addVertex (Vertex vertex) throws DENOPTIMException |
Appends a vertex to this graph without creating any edge. More... | |
void | removeVertex (Vertex vertex) |
Remove a vertex from this graph. More... | |
boolean | removeVertexAndWeld (Vertex vertex, FragmentSpace fragSpace) throws DENOPTIMException |
Remove a given vertex belonging to this graph and re-connects the resulting graph branches as much as possible. More... | |
boolean | removeSingleVertexAndWeld (Vertex vertex, FragmentSpace fragSpace) throws DENOPTIMException |
Remove a given vertex belonging to this graph and re-connects the resulting graph branches as much as possible. More... | |
void | replaceUnusedRCVsWithCapps (FragmentSpace fragSpace) throws DENOPTIMException |
Removes unused ring-closing vertices. More... | |
boolean | replaceSubGraph (List< Vertex > subGrpVrtxs, DGraph incomingGraph, LinkedHashMap< AttachmentPoint, AttachmentPoint > apMap, FragmentSpace fragSpace) throws DENOPTIMException |
Replaced the subgraph represented by a given collection of vertices that belong to this graph. More... | |
List< List< Vertex > > | getSymmetricSubGraphs (List< Vertex > subGrpVrtxs) throws DENOPTIMException |
We assume that the subgraph is a continuously connected, directed graph. More... | |
boolean | replaceSingleSubGraph (List< Vertex > subGrpVrtxs, DGraph newSubGraph, LinkedHashMap< AttachmentPoint, AttachmentPoint > apMap) throws DENOPTIMException |
Replaced the subgraph represented by a given collection of vertices that belong to this graph. More... | |
boolean | replaceVertex (Vertex vertex, int bbId, BBType bbt, LinkedHashMap< Integer, Integer > apIdMap, FragmentSpace fragSpace) throws DENOPTIMException |
Replaced a given vertex belonging to this graph with a new vertex generated specifically for this purpose. More... | |
boolean | replaceVertex (Vertex vertex, int bbId, BBType bbt, LinkedHashMap< Integer, Integer > apIdMap, boolean symmetry, FragmentSpace fragSpace) throws DENOPTIMException |
Replaced a given vertex belonging to this graph with a new vertex generated specifically for this purpose. More... | |
boolean | insertVertex (Edge edge, int bbId, BBType bbt, LinkedHashMap< AttachmentPoint, Integer > apMap, FragmentSpace fragSpace) throws DENOPTIMException |
Inserts a given vertex in between two vertices connected by the given edge. More... | |
boolean | insertSingleVertex (Edge edge, Vertex newLink, LinkedHashMap< AttachmentPoint, AttachmentPoint > apMap) throws DENOPTIMException |
Inserts a given vertex in between two vertices connected by the given edge. More... | |
Vertex | getVertexAtPosition (int pos) |
Returns the vertex that is in the given position of the list of vertices belonging to this graph. More... | |
boolean | containsOrEmbedsVertex (Vertex v) |
Check if the specified vertex is contained in this graph as a node or in any inner graphs that may be embedded in Template -kind vertex belonging to this graph. More... | |
boolean | containsVertex (Vertex v) |
Check if this graph contains the specified vertex. More... | |
int | indexOf (Vertex v) |
Returns the index of a vertex in the list of vertices of this graph. More... | |
Vertex | getVertexWithId (long vid) |
Searches for a vertex with the given identifier. More... | |
int | indexOfVertexWithID (long vid) |
Returns the position of the first vertex that has the given ID. More... | |
void | removeEdge (Edge edge) |
Removes an edge and update the free valences of the attachment points that were originally involved in this edge. More... | |
void | removeRing (Ring ring) |
Edge | getEdgeAtPosition (int pos) |
int | getEdgeCount () |
int | getRingCount () |
int | getVertexCount () |
String | toString () |
int | getBondingAPIndex (Vertex srcVert, int dapidx, Vertex dstVert) |
ArrayList< Vertex > | getChildVertices (Vertex vertex) |
void | getChildrenTree (Vertex vertex, List< Vertex > children) |
Gets all the children of the current vertex recursively. More... | |
void | getChildrenTree (Vertex vertex, List< Vertex > children, boolean markBranches) |
Gets all the children of the current vertex recursively. More... | |
void | getChildrenTree (Vertex vertex, List< Vertex > children, AtomicInteger branchIdGenerator, List< Integer > prevBranchId) |
Gets all the children of the current vertex recursively. More... | |
void | getChildrenTree (Vertex vertex, List< Vertex > children, int numLayers, boolean stopBeforeRCVs) |
Gets all the children of the current vertex recursively. More... | |
List< Integer > | getBranchIdOfVertexAtPosition (int i) |
Returns the branch identifier. More... | |
List< Integer > | getBranchIdOfVertex (Vertex v) |
Returns the branch identifier. More... | |
String | getBranchIdOfVertexAsStr (Vertex v) |
Returns the branch identifier as a literal string. More... | |
boolean | directedPathExists (Vertex src, Vertex trg) |
Uses branch identifiers to define is two vertices are in such a relation that allows the drawing of a directed path from one to the other. More... | |
void | getChildTreeLimited (Vertex vertex, List< Vertex > children, boolean stopBeforeRCVs) |
Gets all the children of the current vertex recursively. More... | |
void | getChildTreeLimited (Vertex vertex, List< Vertex > children, Set< Vertex > limits) |
Gets all the children of the current vertex recursively until it finds one of the vertices listed as limit. More... | |
void | getChildTreeLimited (Vertex vertex, List< Vertex > children, List< Vertex > limitsInClone, boolean stopBeforeRCVs) |
Gets all the children of the current vertex recursively until it finds one of the vertices listed as limit. More... | |
Vertex | getDeepestAmongThese (List< Vertex > list) |
Identify the oldest ancestor (i.e., most great grandparent) in the given collection. More... | |
void | getParentTree (Vertex vertex, List< Vertex > parentTree) |
Traverse the graph until it identifies the source of the directed path reachable from the given vertex recursively. More... | |
Vertex | getParent (Vertex v) |
DGraph | clone () |
Returns almost "deep-copy" of this graph. More... | |
Edge | getEdgeWithParent (long l) |
Looks for an edge that points to a vertex with the given vertex id. More... | |
ArrayList< Integer > | getIndexOfEdgesWithChild (int vid) |
ArrayList< Edge > | getEdgesWithChild (int vid) |
long | getMaxVertexId () |
boolean | containsVertexID (long l) |
Checks if a number is already used as VertexIDs within the graph. More... | |
void | cleanup () |
Wipes the data in this graph. More... | |
boolean | isIsomorphicTo (DGraph other) |
Checks if this graph is "DENOPTIM-isomorphic" to the other one given. More... | |
boolean | isIsostructuralTo (DGraph other) |
Checks if this graph is "DENOPTIM-isostructural" to the other one given. More... | |
boolean | sameAs (DGraph other, StringBuilder reason) |
Compare this and another graph ignoring the vertex IDs. More... | |
boolean | containsAtoms () |
Returns true if this graph has any vertex that contains atoms. More... | |
int | getHeavyAtomsCount () |
Calculate the number of atoms from the graph representation. More... | |
ArrayList< AttachmentPoint > | getAttachmentPoints () |
Returns the list of all attachment points contained in this graph. More... | |
ArrayList< AttachmentPoint > | getAvailableAPs () |
Returns the list of available attachment points contained in this graph. More... | |
List< AttachmentPoint > | getAvailableAPsThroughout () |
Returns the list of attachment points contained in this graph that are available throughout the template barrier, i.e., are free in this graph an in any embedding graph that containing this one. More... | |
AttachmentPoint | getAPWithId (int id) |
Returns the attachment point with the given identifier, or null if no AP is found with the given identifier. More... | |
boolean | graphNeedsCappingGroups (FragmentSpace fragSpace) |
Checks the graph for unused APs that need to be capped. More... | |
void | removeCappingGroupsOn (Vertex vertex) |
Remove capping groups on the given vertex of this graph. More... | |
void | removeCappingGroups (List< Vertex > lstVerts) |
Remove capping groups that belong to this graph and are in the given list. More... | |
void | removeCappingGroupsFromChilds (List< Vertex > lstVerts) |
void | removeCappingGroups () |
Remove all capping groups on this graph. More... | |
void | addCappingGroups (FragmentSpace fragSpace) throws DENOPTIMException |
Add a capping groups on free unused attachment points. More... | |
void | addCappingGroups (List< Vertex > vertexAddedToThis, FragmentSpace fragSpace) throws DENOPTIMException |
Add a capping group on the given vertices, if needed. More... | |
DGraph | extractSubgraph (int index) throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex. More... | |
DGraph | extractSubgraph (Vertex seed) throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex. More... | |
DGraph | extractSubgraph (Vertex seed, int numLayers, boolean stopBeforeRCVs) throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex and visiting at most a given number of vertex layers, and optionally stopping the exploration of a branch before including any ring-closing vertex. More... | |
DGraph | extractSubgraph (Vertex seed, List< Vertex > limits, boolean stopBeforeRCVs) throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex and stopping the exploration at the given end vertices (i.e., limits). More... | |
DGraph | extractSubgraph (Vertex seed, boolean stopBeforeRCVs) throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex. More... | |
List< DGraph > | extractPattern (GraphPattern pattern) throws DENOPTIMException |
Extracts subgraphs that match the provided pattern. More... | |
Map< DGraph, ObjectPair > | extractPattern (GraphPattern pattern, boolean recordConnectivity) throws DENOPTIMException |
Extracts subgraphs that match the provided pattern. More... | |
DGraph | extractSubgraph (Collection< Vertex > definedOn) |
Returns a clone of the subgraph defined by the a collection of vertices belonging to this graph. More... | |
DGraph | extractSubgraph (Collection< Vertex > definedOn, Set< Edge > connectionToSubgraph, Set< Edge > connectionFromSubgraph) |
Returns a clone of the subgraph defined by the a collection of vertices belonging to this graph. More... | |
DGraph | embedPatternsInTemplates (GraphPattern pattern, FragmentSpace fragSpace) throws DENOPTIMException |
Searches for the given pattern type and generated a new graph where each set of (clones of) vertexes that define one such patterns is embedded in a single template. More... | |
DGraph | embedPatternsInTemplates (GraphPattern pattern, FragmentSpace fragSpace, ContractLevel contract) throws DENOPTIMException |
Searches for the given pattern type and generated a new graph where each set of (clones of) vertexes that define one such patterns is embedded in a single template. More... | |
boolean | removeBranchStartingAt (Vertex v, boolean symmetry) throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children. More... | |
boolean | removeBranchStartingAt (Vertex v) throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children. More... | |
boolean | removeOrphanBranchStartingAt (Vertex v) throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children. More... | |
boolean | removeChainUpToBranching (Vertex v, FragmentSpace fragSpace) throws DENOPTIMException |
Mutates the graph by removing the chain where a given vertex is located up to the first branching (i.e., to non-capping group) on either side. More... | |
void | changeSignOfVertexID () |
Change all vertex IDs to the corresponding negative value. More... | |
void | renumberGraphVertices () |
Reassign vertex IDs to all vertices of this graph. More... | |
Map< Long, Long > | renumberVerticesGetMap () |
Reassign vertex IDs to a graph. More... | |
int | getLevel (Vertex v) |
Calculates the level of a vertex in this graph. More... | |
Object[] | checkConsistency (RunTimeParameters settings) throws DENOPTIMException |
Peeks into this graph to derive a preliminary chemical representation with SMILES and InChIKey. More... | |
Object[] | checkConsistency (RunTimeParameters settings, boolean permissive) throws DENOPTIMException |
Peeks into this graph to derive a preliminary chemical representation with SMILES and InChIKey. More... | |
ArrayList< DGraph > | makeAllGraphsWithDifferentRingSets (RunTimeParameters settings) throws DENOPTIMException |
Evaluates the possibility of closing rings in this graph and generates all alternative graphs resulting by different combinations of rings. More... | |
boolean | hasForbiddenEnd (FragmentSpaceParameters fsSettings) |
Check if there are forbidden ends: free attachment points that are not suitable for capping and not allowed to stay unused. More... | |
void | appendGraphOnGraph (List< Vertex > parentVertices, List< Integer > parentAPIdx, DGraph subGraph, Vertex childVertex, int childAPIdx, BondType bndType, boolean onAllSymmAPs) throws DENOPTIMException |
Append a graph (incoming=I) onto this (receiving=R). More... | |
void | appendVertexOnAP (AttachmentPoint srcAP, AttachmentPoint trgAP) throws DENOPTIMException |
Append a vertex to this graph: adds the new vertex to the list of vertices belonging to the graph, and adds the resulting edge to the graph. More... | |
void | appendGraphOnAP (AttachmentPoint apOnThisGraph, AttachmentPoint apOnIncomingGraph, BondType bndType) throws DENOPTIMException |
Appends a graph onto this graph. More... | |
void | appendGraphOnAP (Vertex parentVertex, int parentAPIdx, DGraph subGraph, Vertex childVertex, int childAPIdx, BondType bndType, Map< Vertex, SymmetricVertexes > newSymSets) throws DENOPTIMException |
Append a subgraph (I) to this graph (R) specifying which vertex and attachment point to use for the connection. More... | |
void | appendGraphOnGraph (Vertex parentVertex, int parentAPIdx, DGraph subGraph, Vertex childVertex, int childAPIdx, BondType bndType, Map< Vertex, SymmetricVertexes > newSymSets, boolean onAllSymmAPs) throws DENOPTIMException |
Append a graph (incoming=I) onto this graph (receiving=R). More... | |
List< Long > | findVerticesIds (VertexQuery query, Logger logger) |
Search a graph for vertices that match the criteria defined in a query vertex. More... | |
ArrayList< Vertex > | findVertices (VertexQuery vrtxQuery, Logger logger) |
Filters a list of vertices according to a query. More... | |
ArrayList< Vertex > | findVertices (VertexQuery vrtxQuery, boolean purgeSym, Logger logger) |
Filters a list of vertices according to a query. More... | |
void | removeSymmetryRedundance (List< Vertex > list) |
Remove all but one of the symmetry-related partners in a list of vertices. More... | |
void | removeSymmetryRedundantIds (ArrayList< Long > list) |
Remove all but one of the symmetry-related partners in a given list of vertex IDs. More... | |
DGraph | editGraph (ArrayList< GraphEdit > edits, boolean symmetry, FragmentSpace fragSpace, Logger logger) throws DENOPTIMException |
Edit this graph according to a given list of edit tasks. More... | |
List< Vertex > | getMutableSites () |
A list of mutation sites from within this graph. More... | |
List< Vertex > | getMutableSites (List< MutationType > ignoredTypes) |
A list of mutation sites from within this graph. More... | |
String | toJson () |
Produces a string that represents this graph and that adheres to the JSON format. More... | |
boolean | hasScaffoldTypeVertex () |
Checks if this graph contains a scaffold vertex. More... | |
void | setTemplateJacket (Template template) |
Sets the reference to a template that embeds this graph, i.e., this graph's "jacket" template. More... | |
Template | getTemplateJacket () |
DGraph | getOutermostGraphOwner () |
List< Template > | getEmbeddingPath () |
Find the path that one has to traverse to reach this graph from any template-embedding structure. More... | |
void | storeCurrentVertexIDs () |
Copies the current vertexID of each vertex into a property of the vertex itself. More... | |
AttachmentPoint | getAPOnLeftVertexID (long nbrVid, long vid) |
Finds the AP that is on the first given parameter and that is used to make a connection to the second vertex, no matter the direction of the edge. More... | |
boolean | isReversible (FragmentSpace fragSpace) |
Checks is the every edge in the graph can be defined in the opposite direction according to the APClass compatibility rules. More... | |
List< AttachmentPoint > | getInterfaceAPs (List< Vertex > subGraphB) |
Searches for all AttachmentPoint s that represent the interface between a subgraph, identified by the given list of vertices, and any other vertex, i.e., either belonging to the same graph but not to the same subgraph, or belonging to an outer embedding level. More... | |
List< AttachmentPoint > | getSubgraphAPs (List< Vertex > subGraphB) |
Searches for all AttachmentPoint s that are owned by vertices in a subgraph but either available or used by vertices that do not belong to the subgraph. More... | |
Static Public Member Functions | |
static boolean | areApsUsedBySymmetricUsers (AttachmentPoint apA, AttachmentPoint apB, Set< Vertex > alreadyAssignedVrtxs) |
Checks if the Vertex s that are attached to two given AttachmentPoint s apA and apB satisfy these conditions: More... | |
static boolean | compareGraphNodes (Vertex thisV, DGraph thisG, Vertex otherV, DGraph otherG) throws DENOPTIMException |
Compares graphs by spanning vertices starting from the given vertex and following the direction of edges. More... | |
static DGraph | fromJson (String json) |
Reads a JSON string and returns an instance of this class. More... | |
static DGraph | fromJson (Reader reader) |
Reads a JSON string and returns an instance of this class. More... | |
static void | setScaffold (Vertex v) |
Update the graph so that the vertex argument is at the scaffold level i.e. More... | |
static DGraph | getEmbeddedGraphInClone (DGraph graphY, DGraph graphB, List< Template > path) |
Searches for a graphs (X) embedded at any level in a graph (Y) by knowing. More... | |
Protected Member Functions | |
void | reassignSymmetricLabels () |
Marks the vertices of this graph with a string that is consistent for all vertices that belong to symmetric sets. More... | |
void | convertSymmetricLabelsToSymmetricSets () |
Looks for any symmetric labels, creates symmetric sets that collect the same information, and removes the original symmetric labels. More... | |
int | getUniqueAPIndex () |
void | ensureUniqueApIDs () |
Package Functions | |
Map< SymmetricAPs, List< Vertex > > | findSymmetrySetsOfChildVertexes (Vertex vrtx, Set< Vertex > alreadyAssignedVrtxs) |
Package Attributes | |
List< Vertex > | gVertices |
The vertices belonging to this graph. More... | |
List< Edge > | gEdges |
The edges belonging to this graph. More... | |
List< Ring > | gRings |
The rings defined in this graph. More... | |
List< ClosableChain > | closableChains |
The potentially closable chains of vertices. More... | |
int | graphId |
String | localMsg |
A free-format string used to record simple properties in the graph. More... | |
Candidate | candidate |
Reference to the candidate entity owning this graph, or null. More... | |
Template | templateJacket |
Reference to the Template embedding this graph. More... | |
Private Member Functions | |
boolean | sameAsRings (StringBuilder reason, Map< Vertex, Vertex > vertexMap, Ring rT, Vertex vhT, Vertex vtT, Ring rO) |
Static Private Member Functions | |
static boolean | compareGraphNodes (Vertex seedOnA, DGraph gA, Vertex seedOnB, DGraph gB, Map< Vertex, Vertex > vertexMap, StringBuilder reason) throws DENOPTIMException |
Compares graphs by spanning vertices starting from the given vertex and following the direction of edges. More... | |
static void | reorderVertexList (DGraph g) |
Sets the vertex at the lowest level as the scaffold, changes the directions of edges so that the scaffold is the source, and changes the levels of the graph's other vertices to be consistent with the new scaffold. More... | |
static void | fixEdgeDirections (DGraph graph) |
Flips edges in the graph so that the scaffold is the only source vertex. More... | |
static void | fixEdgeDirections (Vertex v, Set< Long > visited) |
Recursive utility method for fixEdgeDirections(graph). More... | |
Private Attributes | |
List< SymmetricVertexes > | symVertices |
DefaultUndirectedGraph< Vertex, UndirectedEdge > | jGraph = null |
JGraph representation used to detect DENOPTIM-isomorphism. More... | |
DefaultUndirectedGraph< Node, NodeConnection > | jGraphKernel = null |
JGraph representation used to detect DENOPTIM-isostructural graphs. More... | |
AtomicInteger | apCounter = new AtomicInteger(1) |
Generator of unique AP identifiers within this graph. More... | |
Container for the list of vertices and the edges that connect them.
Definition at line 101 of file DGraph.java.
Definition at line 176 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.localMsg, and denoptim.graph.DGraph.symVertices.
Definition at line 190 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.localMsg, and denoptim.graph.DGraph.symVertices.
denoptim.graph.DGraph.DGraph | ( | List< Vertex > | gVertices, |
List< Edge > | gEdges, | ||
List< Ring > | gRings, | ||
List< SymmetricVertexes > | symSets | ||
) |
Definition at line 201 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, and denoptim.graph.DGraph.localMsg.
denoptim.graph.DGraph.DGraph | ( | List< Vertex > | gVertices, |
List< Edge > | gEdges, | ||
List< Ring > | gRings, | ||
List< ClosableChain > | closableChains, | ||
List< SymmetricVertexes > | symVertices | ||
) |
Definition at line 212 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.localMsg, and denoptim.graph.DGraph.symVertices.
denoptim.graph.DGraph.DGraph | ( | ) |
Definition at line 223 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.localMsg, and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.embedPatternsInTemplates(), and denoptim.graph.DGraph.replaceVertex().
void denoptim.graph.DGraph.addCappingGroups | ( | FragmentSpace | fragSpace | ) | throws DENOPTIMException |
Add a capping groups on free unused attachment points.
Addition of Capping groups does not update the symmetry table for a symmetric graph.
Definition at line 4169 of file DGraph.java.
References denoptim.graph.DGraph.addCappingGroups(), and denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.addCappingGroups(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), and denoptim.graph.DGraph.replaceSubGraph().
void denoptim.graph.DGraph.addCappingGroups | ( | List< Vertex > | vertexAddedToThis, |
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Add a capping group on the given vertices, if needed.
The need for such groups is manifest when an attachment point that is not used in this or any embedding lever (i.e., attachment point is AttachmentPoint#isAvailableThroughout()
) has and APClass
that demands to be capped. Addition of Capping groups does not update the symmetry table for a symmetric graph.
vertexAddedToThis | list of vertices to operate on. They must belong to this graph. |
DENOPTIMException | if the addition of capping groups cannot be performed. |
Definition at line 4192 of file DGraph.java.
References denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.BBType.CAP, denoptim.graph.Vertex.getAP(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), and denoptim.graph.Vertex.newVertexFromLibrary().
void denoptim.graph.DGraph.addEdge | ( | Edge | edge | ) |
Adds the edge to the list of edges belonging to this graph.
edge | to be included in the list of edges |
Definition at line 1021 of file DGraph.java.
References denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.Template.getTestTemplate(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraphTest.makeDisorderedGraph(), denoptim.ga.PopulationTest.makeGraphA(), denoptim.ga.PopulationTest.makeGraphB(), denoptim.ga.PopulationTest.makeGraphC(), denoptim.ga.PopulationTest.makeGraphD(), denoptim.ga.PopulationTest.makeGraphE(), denoptim.ga.PopulationTest.makeGraphF(), denoptim.graph.DGraphTest.makeTestGraph1(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA2(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.makeTestGraphDSub1(), denoptim.graph.DGraphTest.makeTestGraphDSub2(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphE(), denoptim.graph.DGraphTest.makeTestGraphE(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphG(), denoptim.graph.DGraphTest.makeTestGraphH(), denoptim.graph.DGraphTest.makeTestGraphI(), denoptim.graph.DGraphTest.makeTestGraphJ(), denoptim.graph.DGraphTest.makeTestGraphK(), denoptim.graph.DGraphTest.makeTestGraphL(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.fragspace.APMapFinderTest.testAPMapFinder(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.EdgeTest.testConnectionDeconnectionLoop(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.DGraphTest.testFromToJSON(), denoptim.graph.DGraphTest.testGetAvailableAPs_returnsListOfAvailableAPs(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.DGraphTest.testRemoveCapping(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testSameAs_DiffRings(), denoptim.graph.DGraphTest.testSameAs_DiffSymmSet(), denoptim.graph.DGraphTest.testSameAs_DiffVertex(), denoptim.graph.DGraphTest.testSameAs_DisorderRings(), denoptim.graph.DGraphTest.testSameAs_Equal(), denoptim.graph.DGraphTest.testSameAs_SameRings(), denoptim.graph.DGraphTest.testSameAs_SameSymmSet(), denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.DGraph.addRing | ( | Ring | ring | ) |
Definition at line 1030 of file DGraph.java.
References denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.gui.GUIGraphHandler.addChordOnGraph(), denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.addRing(), denoptim.ga.GraphOperationsTest.addRings(), denoptim.graph.DGraph.appendGraphOnAP(), denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.ga.PopulationTest.getPairOfTestGraphsB(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxoxo(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.graph.DGraphTest.makeIsostructuralGraphs(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.makeTestGraphDSub1(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphG(), denoptim.graph.DGraphTest.makeTestGraphH(), denoptim.graph.DGraphTest.makeTestGraphI(), denoptim.graph.DGraphTest.makeTestGraphL(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.TemplateTest.testClone(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.DGraphTest.testFromToJSON(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testSameAs_DiffRings(), denoptim.graph.DGraphTest.testSameAs_DisorderRings(), denoptim.graph.DGraphTest.testSameAs_SameRings(), denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.DGraph.addRing | ( | Vertex | vI, |
Vertex | vJ | ||
) | throws DENOPTIMException |
Adds a chord between the given vertices, thus adding a ring in this graph.
vI | one of the ring-closing vertices. |
vJ | the other of the ring-closing vertices. |
DENOPTIMException | if the two vertices do not have consistent bond types to their parents and, therefore, we cannot infer the bond type of the chord. |
Definition at line 1047 of file DGraph.java.
References denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Adds a chord between the given vertices, thus adding a ring in this graph.
vI | one of the ring-closing vertices. |
vJ | the other of the ring-closing vertices. |
bndTyp | the bond type the chord corresponds to. |
Definition at line 1075 of file DGraph.java.
References denoptim.graph.DGraph.addRing(), denoptim.graph.rings.PathSubGraph.getVertecesPath(), denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, and denoptim.graph.Ring.setBondType().
void denoptim.graph.DGraph.addSymmetricSetOfVertices | ( | SymmetricVertexes | symSet | ) | throws DENOPTIMException |
Adds a symmetric set of vertices to this graph.
symSet | the set to add |
DENOPTIMException | is the symmetric set being added contains an id that is already contained in another set already present. |
Definition at line 661 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.DGraph.detectSymVertexSets(), denoptim.ga.GraphOperations.extendGraph(), denoptim.gui.GUIGraphHandler.initialize(), denoptim.graph.DGraph.insertVertex(), denoptim.graph.DGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphC(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.makeTestGraphDSub2(), denoptim.graph.DGraphTest.makeTestGraphE(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphG(), denoptim.graph.DGraphTest.makeTestGraphK(), denoptim.graph.DGraphTest.makeTestGraphL(), denoptim.graph.DGraphTest.testClone(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.graph.DGraphTest.testFromToJSON(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testSameAs_DiffSymmSet(), denoptim.graph.DGraphTest.testSameAs_SameSymmSet(), and denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs().
void denoptim.graph.DGraph.addVertex | ( | Vertex | vertex | ) | throws DENOPTIMException |
Appends a vertex to this graph without creating any edge.
This is a good way to add the first vertex, but can be used also if you intend to add edges manually.
vertex | the vertex that will be added (no cloning). |
DENOPTIMException | in the vertex has an ID that is already present in the current list of vertices of this graph, if any. |
Definition at line 1097 of file DGraph.java.
References denoptim.graph.DGraph.containsVertexID(), denoptim.graph.DGraph.getGraphId(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.graph.DGraph.appendVertexOnAP(), denoptim.ga.EAUtils.buildGraph(), denoptim.ga.GraphOperationsTest.buildGraph(), denoptim.gui.GUIGraphHandler.createEmptyVertexAndPlaceItInGraph(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.rings.PathSubGraph.findPath(), denoptim.graph.TemplateTest.getNestedTemplate(), denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.ga.PopulationTest.getPairOfTestGraphsB(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxo(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxoxo(), denoptim.graph.TemplateTest.getTemplateDeepTest(), denoptim.graph.TemplateTest.getTestAmideTemplate(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.graph.Template.getTestTemplate(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.gui.VertexAsGraphViewPanel.loadVertexStructure(), denoptim.graph.DGraphTest.makeDeeplyEmbeddedGraph(), denoptim.graph.DGraphTest.makeDisorderedGraph(), denoptim.ga.PopulationTest.makeGraphA(), denoptim.ga.PopulationTest.makeGraphB(), denoptim.ga.PopulationTest.makeGraphC(), denoptim.ga.PopulationTest.makeGraphD(), denoptim.ga.PopulationTest.makeGraphE(), denoptim.ga.PopulationTest.makeGraphF(), denoptim.ga.EAUtils.makeGraphFromFragmentationOfMol(), denoptim.graph.DGraphTest.makeIsostructuralGraphs(), denoptim.graph.DGraphTest.makeTestGraph0(), denoptim.graph.DGraphTest.makeTestGraph1(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphA(), denoptim.graph.rings.RingSizeManagerTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphA2(), denoptim.graph.rings.PathSubGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphC(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.makeTestGraphDSub1(), denoptim.graph.DGraphTest.makeTestGraphDSub2(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphE(), denoptim.graph.DGraphTest.makeTestGraphE(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphG(), denoptim.graph.DGraphTest.makeTestGraphH(), denoptim.graph.DGraphTest.makeTestGraphI(), denoptim.graph.DGraphTest.makeTestGraphJ(), denoptim.graph.DGraphTest.makeTestGraphK(), denoptim.graph.DGraphTest.makeTestGraphL(), denoptim.graph.DGraphTest.makeTestGraphM(), denoptim.graph.DGraphTest.makeTestGraphN(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.gui.GUIGraphHandler.startGraphFromFragSpaceOrCreationOfEmptyVertex(), denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.fragspace.APMapFinderTest.testAPMapFinder(), denoptim.graph.TemplateTest.testAtLeastSameNumberOfAPs(), denoptim.graph.AttachmentPointTest.testAvailableThrougout(), denoptim.ga.EAUtilsTest.testAvoidRedundantXOver(), denoptim.graph.TemplateTest.testClone(), denoptim.graph.EdgeTest.testConnectionDeconnectionLoop(), denoptim.molecularmodeling.ThreeDimTreeBuilderTest.testConversionTo3dTree(), denoptim.graph.rings.PathClosabilityToolsTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RandomCombOfRingIteratorTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragspace.APMapFinderTest.testFindMappingCompatibileAPs(), denoptim.graph.TemplateTest.testGetAttachmentPoints_returnsAPsWithTemplateAsOwner(), denoptim.graph.TemplateTest.testGetAttachmentPoints_returnsCorrectNumberOfAPs(), denoptim.graph.DGraphTest.testGetAvailableAPs_returnsListOfAvailableAPs(), denoptim.graph.AttachmentPointTest.testGetEdbeUserThrougout(), denoptim.graph.AttachmentPointTest.testGetEmbeddedAP(), denoptim.graph.AttachmentPointTest.testGetLinkedAP(), denoptim.graph.DGraphTest.testGetMutationSites(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.AttachmentPointTest.testHasConnectedSrcAtom(), denoptim.graph.AttachmentPointTest.testHasSameSrcAtom(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.graph.AttachmentPointTest.testIsSrcInUser(), denoptim.graph.DGraphTest.testRemoveCapping(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.ga.EAUtilsTest.testSelectNonScaffoldNonCapVertex(), denoptim.graph.TemplateTest.testSetInnerGraph_throws_on_graph_incompatible_w_requiredAPs(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
void denoptim.graph.DGraph.appendGraphOnAP | ( | AttachmentPoint | apOnThisGraph, |
AttachmentPoint | apOnIncomingGraph, | ||
BondType | bndType | ||
) | throws DENOPTIMException |
Appends a graph onto this graph.
The operation is not projected by symmetry, and the incoming graph is not cloned/copied.
apOnThisGraph | where to append to on this growing graph. |
apOnIncomingGraph | where to connect this graph into the incoming one. |
bndType | the bond type of the new edge created. |
DENOPTIMException |
Definition at line 5826 of file DGraph.java.
References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.DGraph.renumberGraphVertices().
Referenced by denoptim.graph.DGraph.appendGraphOnGraph().
void denoptim.graph.DGraph.appendGraphOnAP | ( | Vertex | parentVertex, |
int | parentAPIdx, | ||
DGraph | subGraph, | ||
Vertex | childVertex, | ||
int | childAPIdx, | ||
BondType | bndType, | ||
Map< Vertex, SymmetricVertexes > | newSymSets | ||
) | throws DENOPTIMException |
Append a subgraph (I) to this graph (R) specifying which vertex and attachment point to use for the connection.
Does not project on symmetrically related vertices or attachment points. No change in symmetric sets, apart from importing those sets that are already defined in the subgraph.
parentVertex | the vertex of R on which a copy of I is to be attached. |
parentAPIdx | the attachment point on R's vertex to be used to attach I |
subGraph | the incoming graph I, or child graph. |
childVertex | the vertex of I that is to be connected to R |
childAPIdx | the index of the attachment point on the vertex of I that is to be connected to R |
bndType | the bond type between R and I |
newSymSets | of symmetric sets. This parameter is only used to keep track of the symmetric copies of I. Simply provide an empty data structure. |
Definition at line 5880 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.clone(), denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.DGraph.getVertexWithId(), and denoptim.graph.DGraph.renumberGraphVertices().
void denoptim.graph.DGraph.appendGraphOnGraph | ( | List< Vertex > | parentVertices, |
List< Integer > | parentAPIdx, | ||
DGraph | subGraph, | ||
Vertex | childVertex, | ||
int | childAPIdx, | ||
BondType | bndType, | ||
boolean | onAllSymmAPs | ||
) | throws DENOPTIMException |
Append a graph (incoming=I) onto this (receiving=R).
Can append one or more copies of the same graph. The corresponding vertex and attachment point ID for each connection are given in separated arrays.
parentVertices | the list of source vertices of R on which a copy of I is to be attached. |
parentAPIdx | the list of attachment points on R's vertices to be used to attach I |
subGraph | the incoming graph I, or child |
childVertex | the vertex of I that is to be connected to R |
childAPIdx | the index of the attachment point on the vertex of I that is to be connected to R |
bndType | the bond type between R and I |
onAllSymmAPs | set to true to require the same graph I to be attached on all available and symmetric APs on the same vertex of the AP indicated in the list. |
Definition at line 5743 of file DGraph.java.
References denoptim.graph.DGraph.appendGraphOnGraph().
Referenced by denoptim.graph.DGraph.appendGraphOnGraph(), and denoptim.graph.DGraph.editGraph().
void denoptim.graph.DGraph.appendGraphOnGraph | ( | Vertex | parentVertex, |
int | parentAPIdx, | ||
DGraph | subGraph, | ||
Vertex | childVertex, | ||
int | childAPIdx, | ||
BondType | bndType, | ||
Map< Vertex, SymmetricVertexes > | newSymSets, | ||
boolean | onAllSymmAPs | ||
) | throws DENOPTIMException |
Append a graph (incoming=I) onto this graph (receiving=R).
parentVertex | the vertex of R on which the a copy of I is to be attached. |
parentAPIdx | the attachment point on R's vertex to be used to attach I |
subGraph | the incoming graph I, or child |
childVertex | the vertex of I that is to be connected to R |
childAPIdx | the index of the attachment point on the vertex of I that is to be connected to R |
bndType | the bond type between R and I |
newSymSets | this parameter is only used to keep track of the symmetric copies of I. Simply provide an empty data structure. |
onAllSymmAPs | set to true to require the same graph I to be attached on all available and symmetric APs on the same vertex of the AP indicated in the list. |
Definition at line 6005 of file DGraph.java.
References denoptim.graph.DGraph.appendGraphOnAP().
void denoptim.graph.DGraph.appendVertexOnAP | ( | AttachmentPoint | srcAP, |
AttachmentPoint | trgAP | ||
) | throws DENOPTIMException |
Append a vertex to this graph: adds the new vertex to the list of vertices belonging to the graph, and adds the resulting edge to the graph.
Does not clone the incoming vertex. Does not project on symmetrically related vertices or attachment points. No change in symmetric sets, apart from importing those sets that are already defined in the incoming vertex.
srcAP | the attachment point on this graph (source AP). |
trgAP | the attachment point on the incoming vertex (target AP). |
DENOPTIMException |
Definition at line 5776 of file DGraph.java.
References denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Edge.BondType.ANY, and denoptim.graph.Edge.BondType.UNDEFINED.
Referenced by denoptim.graph.DGraph.addCappingGroups(), denoptim.ga.GraphOperations.addRing(), denoptim.ga.GraphOperationsTest.buildGraph(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.gui.GUIGraphHandler.extendCurrentGraph(), denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.rings.PathSubGraph.findPath(), denoptim.graph.TemplateTest.getNestedTemplate(), denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.ga.PopulationTest.getPairOfTestGraphsB(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxo(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxoxo(), denoptim.graph.TemplateTest.getTemplateDeepTest(), denoptim.graph.TemplateTest.getTestAmideTemplate(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.graph.DGraphTest.makeDeeplyEmbeddedGraph(), denoptim.graph.DGraphTest.makeIsostructuralGraphs(), denoptim.graph.rings.RingSizeManagerTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphC(), denoptim.graph.DGraphTest.makeTestGraphK(), denoptim.graph.DGraphTest.makeTestGraphM(), denoptim.graph.DGraphTest.makeTestGraphN(), denoptim.ga.EAUtilsTest.prepare(), denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.graph.AttachmentPointTest.testAvailableThrougout(), denoptim.ga.EAUtilsTest.testAvoidRedundantXOver(), denoptim.graph.TemplateTest.testClone(), denoptim.graph.rings.PathClosabilityToolsTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RandomCombOfRingIteratorTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.fragspace.APMapFinderTest.testFindMappingCompatibileAPs(), denoptim.graph.TemplateTest.testGetAttachmentPoints_returnsCorrectNumberOfAPs(), denoptim.graph.AttachmentPointTest.testGetEdbeUserThrougout(), denoptim.graph.AttachmentPointTest.testGetEmbeddedAP(), denoptim.graph.AttachmentPointTest.testGetLinkedAP(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.AttachmentPointTest.testIsSrcInUser(), and denoptim.ga.EAUtilsTest.testSelectNonScaffoldNonCapVertex().
|
static |
Checks if the Vertex
s that are attached to two given AttachmentPoint
s apA and apB satisfy these conditions:
AttachmentPoint#sameAs(AttachmentPoint)
Vertex
owner of apB is not contained in the set of already-assigned vertexes (the 3rd argument) Vertex
a attached to apA andapB must be return satisfy Vertex#sameAs(Vertex)
Fragment
, then they must Fragment#isIsomorphicTo(Vertex)
. These conditions, when satisfied for a pair of used and symmetric AttachmentPoint
s apA and apB should suffice to assign the two user Vertex
s to the same SymmetricVertexes
set.
apA | one attachment point in the pair. |
apB | the other attachment point in the pair. |
alreadyAssignedVrtxs | a set of vertexes that have been already assigned to SymmetricVertexes set. |
Definition at line 565 of file DGraph.java.
References denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Fragment.isIsomorphicTo(), denoptim.graph.AttachmentPoint.sameAs(), and denoptim.graph.Vertex.sameAs().
Referenced by denoptim.graph.DGraph.detectSymVertexSets(), and denoptim.graph.DGraph.findSymmetrySetsOfChildVertexes().
void denoptim.graph.DGraph.changeSignOfVertexID | ( | ) |
Change all vertex IDs to the corresponding negative value.
For instance if the vertex ID is 12 this method changes it into -12.
Definition at line 5252 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeCount(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getSrcVertex(), denoptim.graph.Edge.getTrgAP(), denoptim.graph.Edge.getTrgVertex(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.Vertex.setVertexId().
Object[] denoptim.graph.DGraph.checkConsistency | ( | RunTimeParameters | settings | ) | throws DENOPTIMException |
Peeks into this graph to derive a preliminary chemical representation with SMILES and InChIKey.
The chemical entity is evaluated also against the criteria defined by the given settings WARNING Although Cartesian coordinates are assigned to each atom and pseudo-atom in the molecular representation, such coordinates do NOT represent a valid 3D model. As a consequence stereochemical descriptors in the INCHI representation are not consistent with the actual arrangement of fragments.
settings | the collection of settings defining the criteria with which we evaluate the graph. |
null
is returned if any check or conversion fails. DENOPTIMException |
Definition at line 5353 of file DGraph.java.
References denoptim.graph.DGraph.checkConsistency().
Referenced by denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.checkConsistency(), and denoptim.ga.EAUtils.readCandidateFromFile().
Object[] denoptim.graph.DGraph.checkConsistency | ( | RunTimeParameters | settings, |
boolean | permissive | ||
) | throws DENOPTIMException |
Peeks into this graph to derive a preliminary chemical representation with SMILES and InChIKey.
The chemical entity is evaluated also against the criteria defined by the given settings WARNING Although Cartesian coordinates are assigned to each atom and pseudo-atom in the molecular representation, such coordinates do NOT represent a valid 3D model. As a consequence stereochemical descriptors in the INCHI representation are not consistent with the actual arrangement of fragments.
settings | the collection of settings defining the criteria with which we evaluate the graph. |
permissive | use true to ignore some of the most strict filtering criteria. This is typically done only when reading graphs from the user, thus assuming the user does intend to by-pass some filters when inspecting a graph that might not be possible to generate from the given settings, |
null
is returned if any check or conversion fails. DENOPTIMException |
Definition at line 5384 of file DGraph.java.
References denoptim.graph.rings.RingClosureParameters.allowRingClosures(), denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.programs.RunTimeParameters.ParametersType.FS_PARAMS, denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.utils.MoleculeUtils.getHeavyAtomCount(), denoptim.utils.MoleculeUtils.getInChIKeyForMolecule(), denoptim.fragspace.FragmentSpaceParameters.getMaxHeavyAtom(), denoptim.fragspace.FragmentSpaceParameters.getMaxMW(), denoptim.graph.rings.RingClosureParameters.getMaxRcaPerType(), denoptim.fragspace.FragmentSpaceParameters.getMaxRotatableBond(), denoptim.graph.rings.RingClosureParameters.getMinRcaPerType(), denoptim.graph.rings.RingClosureParameters.getMinRingClosures(), denoptim.utils.MoleculeUtils.getMolecularWeight(), denoptim.utils.MoleculeUtils.getNumberOfRotatableBonds(), denoptim.programs.RunTimeParameters.getParameters(), denoptim.graph.DGraph.getRCVertices(), denoptim.utils.MoleculeUtils.getSMILESForMolecule(), denoptim.utils.MoleculeUtils.getSymbolOrLabel(), denoptim.graph.DGraph.hasForbiddenEnd(), denoptim.programs.RunTimeParameters.ParametersType.RC_PARAMS, denoptim.graph.rings.RingClosingAttractor.RCATYPEMAP, denoptim.molecularmodeling.ThreeDimTreeBuilder.setAlignBBsIn3D(), denoptim.graph.DGraph.toString(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().
void denoptim.graph.DGraph.cleanup | ( | ) |
Wipes the data in this graph.
Definition at line 3368 of file DGraph.java.
References denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.graph.Candidate.cleanup(), denoptim.ga.EAUtils.readCandidateFromFile(), and denoptim.task.FitnessTask.runExternalFitness().
DGraph denoptim.graph.DGraph.clone | ( | ) |
Returns almost "deep-copy" of this graph.
Only the APCLass members of member of this class should remain references to the original APClasses. The vertex IDs are not changed, so you might want to renumber the graph.
Definition at line 3186 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.Ring.addVertex(), denoptim.graph.DGraph.clone(), denoptim.graph.Vertex.clone(), denoptim.graph.DGraph.closableChains, denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.gEdges, denoptim.graph.AttachmentPoint.getBondType(), denoptim.graph.Vertex.getIndexOfAP(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraph.getVertexWithId(), denoptim.graph.DGraph.graphId, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.localMsg, denoptim.graph.Ring.setBondType(), denoptim.graph.DGraph.setCandidateClosableChains(), denoptim.graph.DGraph.setGraphId(), denoptim.graph.DGraph.setLocalMsg(), denoptim.graph.DGraph.setRings(), denoptim.graph.DGraph.setSymmetricVertexSets(), and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.appendGraphOnAP(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), denoptim.graph.Candidate.clone(), denoptim.graph.DGraph.clone(), denoptim.molecularmodeling.ChemicalObjectModel.deepcopy(), denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.DGraph.extractSubgraph(), denoptim.ga.GraphOperationsTest.getExpectedSubgraphs(), denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.ga.GraphOperations.performMutation(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.combinatorial.CEBLUtils.storeAllGraphsOfLevel(), denoptim.ga.EAUtilsTest.testAvoidRedundantXOver(), denoptim.graph.DGraphTest.testClone(), denoptim.fragspace.FragmentSpaceTest.testFusedRingOnlyAddedOnce(), denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), and denoptim.fragspace.FragmentSpaceTest.testUseWholeMolGeometryForExtractedTemplates().
|
staticprivate |
Compares graphs by spanning vertices starting from the given vertex and following the direction of edges.
seedOnA | initial vertex on the first graph. |
gA | the first graph. |
seedOnB | initial vertex on the second graph. |
gB | the second graph. |
vertexMap | vertex mapping. |
reason | a string recording the reason for returning false. |
true
if the graphs are same at this node. DENOPTIMException |
Definition at line 3849 of file DGraph.java.
References denoptim.graph.DGraph.compareGraphNodes(), and denoptim.graph.Edge.getTrgVertex().
|
static |
Compares graphs by spanning vertices starting from the given vertex and following the direction of edges.
thisV | starting vertex of first graph |
thisG | first graph |
otherV | starting vertex of second graph |
otherG | second graph |
true
if the graphs are same at this node DENOPTIMException |
Definition at line 3825 of file DGraph.java.
References denoptim.graph.DGraph.compareGraphNodes().
Referenced by denoptim.graph.DGraph.compareGraphNodes(), denoptim.graph.DGraph.sameAs(), and denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem().
boolean denoptim.graph.DGraph.containsAtoms | ( | ) |
Returns true
if this graph has any vertex that contains atoms.
true
if this graph has any vertex that contains atoms. Definition at line 3935 of file DGraph.java.
References denoptim.graph.DGraph.getVertexList().
Referenced by denoptim.graph.Template.containsAtoms(), and denoptim.gui.GraphVertexMolViewerPanel.updateMolevularViewer().
boolean denoptim.graph.DGraph.containsOrEmbedsVertex | ( | Vertex | v | ) |
Check if the specified vertex is contained in this graph as a node or in any inner graphs that may be embedded in Template
-kind vertex belonging to this graph.
v | the vertex. |
true
if the vertex belongs to this graph or is anyhow embedded in it. Definition at line 2530 of file DGraph.java.
References denoptim.graph.DGraph.containsOrEmbedsVertex(), denoptim.graph.Template.getInnerGraph(), and denoptim.graph.DGraph.gVertices.
Referenced by denoptim.ga.EAUtils.buildGraph(), and denoptim.graph.DGraph.containsOrEmbedsVertex().
boolean denoptim.graph.DGraph.containsVertex | ( | Vertex | v | ) |
Check if this graph contains the specified vertex.
Does not consider inner graphs that may be embedded in Template
-kind vertex belonging to this graph.
v | the vertex. |
true
if the vertex belongs to this graph. Definition at line 2557 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraphTest.testRemoveCapping(), and denoptim.graph.DGraphTest.testReplaceVertex().
boolean denoptim.graph.DGraph.containsVertexID | ( | long | l | ) |
Checks if a number is already used as VertexIDs within the graph.
true
if the number is already used. Definition at line 3349 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.addVertex().
|
protected |
Looks for any symmetric labels, creates symmetric sets that collect the same information, and removes the original symmetric labels.
Definition at line 1600 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.hasSymmetryInvolvingVertex(), and denoptim.constants.DENOPTIMConstants.VRTSYMMSETID.
Referenced by denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets(), and denoptim.graph.DGraphTest.testReplaceSubGraph().
boolean denoptim.graph.DGraph.detectSymVertexSets | ( | ) | throws DENOPTIMException |
Tries to determine the set of symmetric vertices in this graph based on finding compatible Vertex
es that are either using symmetric AttachmentPoint
s (NB: all symmetric APs must be in use by vertexes that are compatible with each other) or that are downstream (i.e., according to edge direction) w.r.t Vertex
es that are using symmetric AttachmentPoint
s.The compatibility of the vertexes is determined by these criteria:
AttachmentPoint#sameAs(Vertex)
method. Vertex#sameAs(Vertex)
method. Effectively, this means they are instances of the same building block in the fragment space, or are graph building blocks that are not part of the fragment space, in which case the last condition applies, Fragment#isIsomorphicTo(Vertex)
method. true
if some symmetric set of vertex has been found. DENOPTIMException |
Definition at line 372 of file DGraph.java.
References denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.graph.DGraph.findSymmetrySetsOfChildVertexes(), denoptim.graph.SymmetricAPs.getAllSameAs(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.ga.EAUtils.makeGraphFromFragmentationOfMol(), and denoptim.graph.DGraphTest.testDetectSymVertexSets().
Uses branch identifiers to define is two vertices are in such a relation that allows the drawing of a directed path from one to the other.
You must run getChildrenTree(Vertex, List, AtomicInteger, List)
on any parent of either graph to generate the bran branch labeling.
src | the "from" in the directed path relation. |
trg | the "to" in the directed path relation. |
true
if the relation exists, false
is if doesn't OR if the branch labeling has not been found. Definition at line 3000 of file DGraph.java.
References denoptim.graph.DGraph.getBranchIdOfVertex().
Referenced by denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier().
DGraph denoptim.graph.DGraph.editGraph | ( | ArrayList< GraphEdit > | edits, |
boolean | symmetry, | ||
FragmentSpace | fragSpace, | ||
Logger | logger | ||
) | throws DENOPTIMException |
Edit this graph according to a given list of edit tasks.
This method assumes the vertex IDs are unique.
edits | the list of edit tasks. |
symmetry | if true the same operation is performed on vertices related by symmetry. |
fragSpace | the space of building blocks needed to perform the graph editing tasks. It may or may not be the space that generated the original version of the graph to edit. |
logger | the logger to use |
Definition at line 6453 of file DGraph.java.
References denoptim.graph.DGraph.appendGraphOnGraph(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.containsVertex(), denoptim.graph.DGraph.findVertices(), denoptim.graph.DGraph.getAPWithId(), denoptim.graph.DGraph.getAvailableAPs(), denoptim.graph.Edge.getBondType(), denoptim.graph.DGraph.getGraphId(), denoptim.graph.AttachmentPoint.getIndexInOwner(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Vertex.getParent(), denoptim.graph.Edge.getSrcAPID(), denoptim.utils.GraphEdit.getType(), denoptim.graph.DGraph.removeBranchStartingAt(), denoptim.graph.DGraph.renumberGraphVertices(), denoptim.graph.DGraph.replaceSingleSubGraph(), and denoptim.graph.DGraph.replaceVertex().
Referenced by denoptim.programs.grapheditor.GraphEditor.runProgram().
DGraph denoptim.graph.DGraph.embedPatternsInTemplates | ( | GraphPattern | pattern, |
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Searches for the given pattern type and generated a new graph where each set of (clones of) vertexes that define one such patterns is embedded in a single template.
pattern | type of pattern to embed in template. |
DENOPTIMException |
Definition at line 4616 of file DGraph.java.
References denoptim.graph.DGraph.embedPatternsInTemplates(), and denoptim.graph.Template.ContractLevel.FREE.
Referenced by denoptim.gui.GUIGraphHandler.appendGraphsFromConvertingMolecule(), denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), and denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol().
DGraph denoptim.graph.DGraph.embedPatternsInTemplates | ( | GraphPattern | pattern, |
FragmentSpace | fragSpace, | ||
ContractLevel | contract | ||
) | throws DENOPTIMException |
Searches for the given pattern type and generated a new graph where each set of (clones of) vertexes that define one such patterns is embedded in a single template.
pattern | type of pattern to embed in template. |
fragSpace | the fragment space that defines how we manipulate fragments. |
contract | the level of constraint to set for any template that embeds one of the patterns. |
DENOPTIMException |
Definition at line 4637 of file DGraph.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.ensureUniqueApIDs(), denoptim.graph.DGraph.extractPattern(), denoptim.graph.Vertex.BBType.FRAGMENT, denoptim.graph.DGraph.getAPWithId(), denoptim.graph.AttachmentPoint.getID(), denoptim.graph.Template.getOuterAPFromInnerAP(), denoptim.graph.Vertex.getProperty(), denoptim.graph.DGraph.getVertexWithId(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.hasScaffoldTypeVertex(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.Template.setContractLevel(), denoptim.graph.Template.setInnerGraph(), and denoptim.constants.DENOPTIMConstants.STOREDVID.
|
protected |
Definition at line 6669 of file DGraph.java.
References denoptim.graph.DGraph.apCounter, and denoptim.graph.DGraph.getAttachmentPoints().
Referenced by denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), and denoptim.graph.Template.toJson().
List< DGraph > denoptim.graph.DGraph.extractPattern | ( | GraphPattern | pattern | ) | throws DENOPTIMException |
Extracts subgraphs that match the provided pattern.
pattern | to match against. |
DENOPTIMException |
Definition at line 4457 of file DGraph.java.
References denoptim.graph.DGraph.extractPattern().
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.DGraph.extractPattern(), denoptim.ga.GraphOperationsTest.testExtractPattern_fusedRings(), denoptim.ga.GraphOperationsTest.testExtractPattern_returnsEmptyListIfNoRings(), and denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem().
Map< DGraph, ObjectPair > denoptim.graph.DGraph.extractPattern | ( | GraphPattern | pattern, |
boolean | recordConnectivity | ||
) | throws DENOPTIMException |
Extracts subgraphs that match the provided pattern.
This method offers the possibility to record the connections that cross the border of each subgraph.
pattern | to match against. |
recordConnectivity | if true makes this method collect the edges of this graph that cross the subgraph borders. If false the resulting map will have only keys and null values. |
AttachmentPoint
belongs to a vertex that does not belong the subgraph), second, the list of outgoing edges (i.e., the source AttachmentPoint
belongs to a vertex that does belong the subgraph). Note that the owners of the AttachmentPoint
s are NOT the Vertex
instances that are container in the map's key, but are their clones. DENOPTIMException |
Definition at line 4488 of file DGraph.java.
References denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.Ring.getVertices(), denoptim.graph.DGraph.reorderVertexList(), denoptim.graph.GraphPattern.RING, and denoptim.utils.GeneralUtils.unionOfIntersectingSets().
Returns a clone of the subgraph defined by the a collection of vertices belonging to this graph.
definedOn | Set of vertices that defined the subgraph. |
Definition at line 4539 of file DGraph.java.
References denoptim.graph.DGraph.extractSubgraph().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | Collection< Vertex > | definedOn, |
Set< Edge > | connectionToSubgraph, | ||
Set< Edge > | connectionFromSubgraph | ||
) |
Returns a clone of the subgraph defined by the a collection of vertices belonging to this graph.
It also collects which Edge
s exists between the subgraph and the rest of the graph.
definedOn | Set of vertices that defined the subgraph. |
connectionToSubgraph | container for the collection of edges that arrive at the subgraph. |
connectionFromSubgraph | container for the collection of edges that depart from the subgraph. |
Definition at line 4558 of file DGraph.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.DGraph.removeVertex().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | int | index | ) | throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex.
Only the seed vertex and all child vertices (and further successors) are considered part of the subgraph, which includes also rings and symmetric sets. All rings that include vertices not belonging to the subgraph are lost.
index | the position of the seed vertex in the list of vertices of this graph. |
Definition at line 4258 of file DGraph.java.
References denoptim.graph.DGraph.extractSubgraph(), and denoptim.graph.DGraph.getVertexAtPosition().
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.graph.DGraph.extractPattern(), denoptim.graph.DGraph.extractSubgraph(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.ga.GraphOperations.performCrossover(), denoptim.ga.GraphOperations.processPermutationOfEndPoints(), denoptim.graph.DGraphTest.testExtractSubgraph(), and denoptim.graph.DGraphTest.testExtractSubgraphFromCollection().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | Vertex | seed | ) | throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex.
Only the seed vertex and all child vertices (and further successors) are considered part of the subgraph, which includes also rings and symmetric sets. All rings that include vertices not belonging to the subgraph are lost.
seed | the vertex from which the extraction has to start. |
Definition at line 4277 of file DGraph.java.
References denoptim.graph.DGraph.extractSubgraph().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | Vertex | seed, |
boolean | stopBeforeRCVs | ||
) | throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex.
Optionally, you can ask to stop the exploration of a branch before including any ring-closing vertex. Only the seed vertex and all child vertices (and further successors) are considered part of the subgraph, which includes also rings and symmetric sets. All rings that include vertices not belonging to the subgraph are lost.
seed | the vertex from which the extraction has to start. |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 4414 of file DGraph.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.getChildTreeLimited(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.indexOf(), and denoptim.graph.DGraph.removeVertex().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | Vertex | seed, |
int | numLayers, | ||
boolean | stopBeforeRCVs | ||
) | throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex and visiting at most a given number of vertex layers, and optionally stopping the exploration of a branch before including any ring-closing vertex.
Only the seed vertex and all child vertices (and further successors) are considered part of the subgraph, which includes also rings and symmetric sets. All rings that include vertices not belonging to the subgraph are lost.
seed | the vertex from which the extraction has to start. |
numLayers | the maximum number of vertex layers after the seen vertex that we want to consider before stopping. If this value is 2, we will explore three layers: the seed, and two more layers away from it. |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 4303 of file DGraph.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.indexOf(), and denoptim.graph.DGraph.removeVertex().
DGraph denoptim.graph.DGraph.extractSubgraph | ( | Vertex | seed, |
List< Vertex > | limits, | ||
boolean | stopBeforeRCVs | ||
) | throws DENOPTIMException |
Creates a new graph that corresponds to the subgraph of this graph when exploring the spanning tree from a given seed vertex and stopping the exploration at the given end vertices (i.e., limits).
Optionally, you can ask to stop the exploration of a branch before including any ring-closing vertex. Only the seed vertex and all child vertices (and further successors) are considered part of the subgraph, which includes also rings and symmetric sets. All rings that include vertices not belonging to the subgraph are lost.
seed | the vertex from which the extraction has to start. |
limits | the vertices playing the role of subgraph end-points that stop the exploration of the graph. |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 4354 of file DGraph.java.
References denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getChildTreeLimited(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.indexOf(), and denoptim.graph.DGraph.removeVertex().
|
package |
Definition at line 460 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.areApsUsedBySymmetricUsers(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), denoptim.graph.AttachmentPoint.getOwner(), and denoptim.graph.Vertex.getSymmetricAPSets().
Referenced by denoptim.graph.DGraph.detectSymVertexSets(), and denoptim.graph.DGraphTest.testFindSymmetrySetsOfChildVertexes().
ArrayList< Vertex > denoptim.graph.DGraph.findVertices | ( | VertexQuery | vrtxQuery, |
boolean | purgeSym, | ||
Logger | logger | ||
) |
Filters a list of vertices according to a query.
vertex.
vrtxQuery | the query defining what is that we want to find. |
purgeSym | use true to remove symmetrically redundant matches. |
logger | manager of log |
Definition at line 6079 of file DGraph.java.
References denoptim.graph.DGraph.EdgeFinder.apply(), denoptim.graph.EdgeQuery.getBondType(), denoptim.graph.VertexQuery.getInEdgeQuery(), denoptim.graph.DGraph.getLevel(), denoptim.graph.VertexQuery.getOutEdgeQuery(), denoptim.graph.EdgeQuery.getSourceAPClass(), denoptim.graph.EdgeQuery.getSourceAPIdx(), denoptim.graph.EdgeQuery.getSourceVertexId(), denoptim.graph.EdgeQuery.getTargetAPClass(), denoptim.graph.EdgeQuery.getTargetAPIdx(), denoptim.graph.EdgeQuery.getTargetVertexId(), denoptim.graph.VertexQuery.getVertexBBIDQuery(), denoptim.graph.VertexQuery.getVertexBBTypeQuery(), denoptim.graph.VertexQuery.getVertexIDQuery(), denoptim.graph.VertexQuery.getVertexLevelQuery(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.VertexQuery.getVertexTypeQuery(), and denoptim.graph.DGraph.removeSymmetryRedundance().
ArrayList< Vertex > denoptim.graph.DGraph.findVertices | ( | VertexQuery | vrtxQuery, |
Logger | logger | ||
) |
Filters a list of vertices according to a query.
vertex. Always removed symmetry-redundant matches.
vrtxQuery | the query defining what is that we want to find. |
logger | manager of log |
Definition at line 6062 of file DGraph.java.
References denoptim.graph.DGraph.findVertices().
Referenced by denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.findVertices(), denoptim.graph.DGraph.findVerticesIds(), and denoptim.graph.DGraphTest.testFindVertex().
List< Long > denoptim.graph.DGraph.findVerticesIds | ( | VertexQuery | query, |
Logger | logger | ||
) |
Search a graph for vertices that match the criteria defined in a query vertex.
query | the query |
logger | manager of log |
Definition at line 6042 of file DGraph.java.
References denoptim.graph.DGraph.findVertices().
|
staticprivate |
Flips edges in the graph so that the scaffold is the only source vertex.
graph | to fix edges of. |
Definition at line 4733 of file DGraph.java.
References denoptim.graph.DGraph.fixEdgeDirections(), and denoptim.graph.DGraph.getSourceVertex().
Referenced by denoptim.graph.DGraph.fixEdgeDirections(), and denoptim.graph.DGraph.reorderVertexList().
|
staticprivate |
Recursive utility method for fixEdgeDirections(graph).
v | current vertex |
Definition at line 4745 of file DGraph.java.
References denoptim.graph.DGraph.fixEdgeDirections(), denoptim.graph.Edge.flipEdge(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getEdgeUser(), denoptim.graph.Vertex.getNumberOfAPs(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Edge.getSrcVertex(), denoptim.graph.Edge.getTrgAP(), denoptim.graph.Edge.getTrgVertex(), and denoptim.graph.Vertex.getVertexId().
|
static |
Reads a JSON string and returns an instance of this class.
json | the string to parse. |
Definition at line 6700 of file DGraph.java.
References denoptim.graph.DGraph.fromJson(), and denoptim.json.DENOPTIMgson.getReader().
|
static |
Reads a JSON string and returns an instance of this class.
json | the string to parse. |
Definition at line 6685 of file DGraph.java.
References denoptim.graph.DGraph.fromJson(), and denoptim.json.DENOPTIMgson.getReader().
Referenced by denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.DGraph.fromJson(), denoptim.graph.Template.fromJson(), denoptim.io.DenoptimIO.readDENOPTIMGraphsFromJSONFile(), denoptim.io.DenoptimIO.readGraphFromSDFileIAC(), and denoptim.graph.DGraphTest.testFromToJSON().
AttachmentPoint denoptim.graph.DGraph.getAPOnLeftVertexID | ( | long | nbrVid, |
long | vid | ||
) |
Finds the AP that is on the first given parameter and that is used to make a connection to the second vertex, no matter the direction of the edge.
If the two vertices are connected by a chord, i.e., there is a pair of RCVs in between the two vertices, we still work out the AP on the vertex on the left, even if in the graph it is actually used to bind the RCV that defines the chord and that eventually connects the vertex on the left with that on the right.
nbrVid | vertex ID of one vertex. |
vid | vertex ID of another vertex. |
AttachmentPoint
or null is the two vertex IDs are not connected in this graph. Definition at line 7005 of file DGraph.java.
References denoptim.graph.DGraph.getChildVertices(), denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getTrgAP(), and denoptim.graph.DGraph.getVertexWithId().
AttachmentPoint denoptim.graph.DGraph.getAPWithId | ( | int | id | ) |
Returns the attachment point with the given identifier, or null if no AP is found with the given identifier.
id | identifier of the attachment point to return |
Definition at line 4035 of file DGraph.java.
References denoptim.graph.DGraph.getAttachmentPoints().
Referenced by denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.embedPatternsInTemplates(), and denoptim.graph.Template.updateInnerToOuter().
ArrayList< AttachmentPoint > denoptim.graph.DGraph.getAttachmentPoints | ( | ) |
Returns the list of all attachment points contained in this graph.
Definition at line 3970 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.ensureUniqueApIDs(), denoptim.graph.DGraph.getAPWithId(), denoptim.graph.DGraph.getAvailableAPs(), denoptim.graph.DGraph.getAvailableAPsThroughout(), and denoptim.ga.EAUtilsTest.testCrowdingProbability().
ArrayList< AttachmentPoint > denoptim.graph.DGraph.getAvailableAPs | ( | ) |
Returns the list of available attachment points contained in this graph.
Definition at line 3988 of file DGraph.java.
References denoptim.graph.DGraph.getAttachmentPoints().
Referenced by denoptim.graph.DGraph.editGraph(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), denoptim.graph.Template.isValidInnerGraph(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.Template.setInnerGraph(), denoptim.graph.DGraphTest.testGetAvailableAPs_returnsListOfAvailableAPs(), and denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().
List< AttachmentPoint > denoptim.graph.DGraph.getAvailableAPsThroughout | ( | ) |
Returns the list of attachment points contained in this graph that are available throughout the template barrier, i.e., are free in this graph an in any embedding graph that containing this one.
Definition at line 4011 of file DGraph.java.
References denoptim.graph.DGraph.getAttachmentPoints().
Referenced by denoptim.ga.GraphOperations.addRing().
srcVert | |
dapidx | the AP corresponding to the source fragment |
dstVert |
Definition at line 2725 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeCount(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.Edge.getSrcAPID(), denoptim.graph.Edge.getSrcVertex(), denoptim.graph.Edge.getTrgAPID(), denoptim.graph.Edge.getTrgVertex(), and denoptim.graph.Vertex.getVertexId().
List< Integer > denoptim.graph.DGraph.getBranchIdOfVertex | ( | Vertex | v | ) |
Returns the branch identifier.
i | the position of the vertex to analyze. |
null
if the vertex does not belong to this graph or if such property is not available. In the latter case, you should run getChildrenTree(Vertex, List, AtomicInteger, List)
on any of the parent vertices. Definition at line 2958 of file DGraph.java.
References denoptim.constants.DENOPTIMConstants.GRAPHBRANCHID, and denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.directedPathExists(), denoptim.graph.DGraph.getBranchIdOfVertexAsStr(), and denoptim.graph.DGraph.getBranchIdOfVertexAtPosition().
String denoptim.graph.DGraph.getBranchIdOfVertexAsStr | ( | Vertex | v | ) |
Returns the branch identifier as a literal string.
i | the position of the vertex to analyze. |
null
if the vertex does not belong to this graph or if such property is not available. In the latter case, you should run getChildrenTree(Vertex, List, AtomicInteger, List)
on any of the parent vertices. Definition at line 2978 of file DGraph.java.
References denoptim.graph.DGraph.getBranchIdOfVertex().
Referenced by denoptim.ga.GraphOperations.locateCompatibleXOverPoints().
List< Integer > denoptim.graph.DGraph.getBranchIdOfVertexAtPosition | ( | int | i | ) |
Returns the branch identifier.
i | the position of the vertex to analyze. |
null
if such property is not available. In such case, you should run getChildrenTree(Vertex, List, AtomicInteger, List)
on any of the parent vertices. Definition at line 2941 of file DGraph.java.
References denoptim.graph.DGraph.getBranchIdOfVertex(), and denoptim.graph.DGraph.getVertexAtPosition().
Referenced by denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier().
Candidate denoptim.graph.DGraph.getCandidateOwner | ( | ) |
Returns the reference of the candidate item that is defined by this graph.
Definition at line 251 of file DGraph.java.
References denoptim.graph.DGraph.candidate.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), and denoptim.ga.EAUtils.buildCandidatesByXOver().
Gets all the children of the current vertex recursively.
This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
Definition at line 2771 of file DGraph.java.
References denoptim.graph.DGraph.getChildrenTree(), and denoptim.graph.DGraph.getChildVertices().
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getChildrenTree(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.graph.DGraph.removeOrphanBranchStartingAt(), denoptim.ga.EAUtilsTest.testBuildByXOver_SubGraph(), denoptim.graph.DGraphTest.testGetChildrenTree(), and denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier().
void denoptim.graph.DGraph.getChildrenTree | ( | Vertex | vertex, |
List< Vertex > | children, | ||
AtomicInteger | branchIdGenerator, | ||
List< Integer > | prevBranchId | ||
) |
Gets all the children of the current vertex recursively.
All vertices belonging to the children tree are labelled by a property that identifies which branches they belong to (DENOPTIMConstants.GRAPHBRANCHID
). This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
branchIdGenerator | the generator of branch identifiers |
prevBranchId | the identifier of the branch holding the given vertex belongs. |
Definition at line 2861 of file DGraph.java.
References denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getChildVertices(), and denoptim.constants.DENOPTIMConstants.GRAPHBRANCHID.
void denoptim.graph.DGraph.getChildrenTree | ( | Vertex | vertex, |
List< Vertex > | children, | ||
boolean | markBranches | ||
) |
Gets all the children of the current vertex recursively.
All vertices belonging to the children tree can be labelled by a property that identifies which branches they belong to (DENOPTIMConstants.GRAPHBRANCHID
). This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
markBranches | true to set the DENOPTIMConstants.GRAPHBRANCHID property to vertices, including the initial one. vertex belongs. |
Definition at line 2804 of file DGraph.java.
References denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getChildVertices(), denoptim.constants.DENOPTIMConstants.GRAPHBRANCHID, and denoptim.graph.Vertex.setProperty().
void denoptim.graph.DGraph.getChildrenTree | ( | Vertex | vertex, |
List< Vertex > | children, | ||
int | numLayers, | ||
boolean | stopBeforeRCVs | ||
) |
Gets all the children of the current vertex recursively.
This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
numLayers | the maximum number of vertex layers after the seen vertex that we want to consider before stopping. If this value is 2, we will explore three layers: the seed, and two more layers away from it. |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 2906 of file DGraph.java.
References denoptim.graph.DGraph.getChildrenTree(), and denoptim.graph.DGraph.getChildVertices().
void denoptim.graph.DGraph.getChildTreeLimited | ( | Vertex | vertex, |
List< Vertex > | children, | ||
boolean | stopBeforeRCVs | ||
) |
Gets all the children of the current vertex recursively.
This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 3028 of file DGraph.java.
References denoptim.graph.DGraph.getChildTreeLimited(), and denoptim.graph.DGraph.getChildVertices().
Referenced by denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getChildTreeLimited(), denoptim.graph.DGraph.getSymmetricSubGraphs(), denoptim.ga.GraphOperations.processPermutationOfEndPoints(), and denoptim.programs.genetweeker.GeneOpsRunner.runXOver().
void denoptim.graph.DGraph.getChildTreeLimited | ( | Vertex | vertex, |
List< Vertex > | children, | ||
List< Vertex > | limitsInClone, | ||
boolean | stopBeforeRCVs | ||
) |
Gets all the children of the current vertex recursively until it finds one of the vertices listed as limit.
This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
limitsInClone | the list of vertices where exploration should stop. |
stopBeforeRCVs | set true to make the exploration of each branch stop before including ring closing vertices. |
Definition at line 3092 of file DGraph.java.
References denoptim.graph.DGraph.getChildTreeLimited(), and denoptim.graph.DGraph.getChildVertices().
void denoptim.graph.DGraph.getChildTreeLimited | ( | Vertex | vertex, |
List< Vertex > | children, | ||
Set< Vertex > | limits | ||
) |
Gets all the children of the current vertex recursively until it finds one of the vertices listed as limit.
This method does not cross template boundaries, thus all children belong to the same graph.
vertex | the vertex whose children are to be located |
children | list containing the references to all the children |
limits | the list of vertices where exploration should stop. |
Definition at line 3060 of file DGraph.java.
References denoptim.graph.DGraph.getChildTreeLimited(), and denoptim.graph.DGraph.getChildVertices().
vertex | the vertex for which the first level of child vertices need to be found. |
Definition at line 2757 of file DGraph.java.
References denoptim.graph.Vertex.getChilddren().
Referenced by denoptim.graph.DGraph.getAPOnLeftVertexID(), denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getChildTreeLimited(), denoptim.graph.DGraph.removeCappingGroupsFromChilds(), and denoptim.graph.DGraph.removeCappingGroupsOn().
List< ClosableChain > denoptim.graph.DGraph.getClosableChains | ( | ) |
Definition at line 712 of file DGraph.java.
References denoptim.graph.DGraph.closableChains.
Identify the oldest ancestor (i.e., most great grandparent) in the given collection.
In case of two vertices being at the same level, this returns the first.
Definition at line 3123 of file DGraph.java.
References denoptim.graph.DGraph.getParentTree().
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites().
Edge denoptim.graph.DGraph.getEdgeAtPosition | ( | int | pos | ) |
Definition at line 2649 of file DGraph.java.
References denoptim.graph.DGraph.gEdges.
Referenced by denoptim.graph.DGraph.getEdgesWithChild(), denoptim.graph.DGraph.getIndexOfEdgesWithChild(), denoptim.graph.AttachmentPointTest.testGetEmbeddedAP(), denoptim.fragspace.GraphLinkFinderTest.testLinkFromEdge(), denoptim.fragspace.GraphLinkFinderTest.testLinkFromEdgeNoMatch(), and denoptim.fragspace.GraphLinkFinderTest.testLinkFromEdgeOneMatch().
int denoptim.graph.DGraph.getEdgeCount | ( | ) |
Definition at line 2658 of file DGraph.java.
References denoptim.graph.DGraph.gEdges.
Referenced by denoptim.graph.DGraph.changeSignOfVertexID(), denoptim.graph.DGraph.getBondingAPIndex(), denoptim.graph.DGraph.getEdgesWithChild(), denoptim.graph.DGraph.getIndexOfEdgesWithChild(), denoptim.graph.DGraph.sameAs(), denoptim.ga.EAUtilsTest.testBuildByXOver_SubGraph(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_ScaffoldingPolicy(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), and denoptim.graph.DGraphTest.testRemoveVertex().
List< Edge > denoptim.graph.DGraph.getEdgeList | ( | ) |
Definition at line 764 of file DGraph.java.
References denoptim.graph.DGraph.gEdges.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.graph.DGraph.changeSignOfVertexID(), denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getBondingAPIndex(), denoptim.graph.DGraph.getEdgesWithSrc(), denoptim.graph.DGraph.getEdgesWithTrg(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), and denoptim.graph.DGraph.getSourceVertex().
ArrayList< Edge > denoptim.graph.DGraph.getEdgesWithChild | ( | int | vid | ) |
vid |
Definition at line 3314 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeAtPosition(), denoptim.graph.DGraph.getEdgeCount(), and denoptim.graph.Edge.getSrcVertex().
Returns the list of edges that depart from the given vertex, i.e., edges where the srcAP is owned by the given vertex.
v | the given vertex. |
Definition at line 784 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeList().
Referenced by denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg().
Returns the list of edges that arrive from the given vertex, i.e., edges where the trgAP is owned by the given vertex.
v | the given vertex. |
Definition at line 805 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeList().
Referenced by denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg().
Edge denoptim.graph.DGraph.getEdgeWithParent | ( | long | l | ) |
Looks for an edge that points to a vertex with the given vertex id.
l |
Definition at line 3273 of file DGraph.java.
References denoptim.graph.Vertex.getEdgeToParent(), and denoptim.graph.DGraph.getVertexWithId().
Referenced by denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph().
|
static |
Searches for a graphs (X) embedded at any level in a graph (Y) by knowing.
graphY | where we want to find the analogous of graphA . |
graphB | the graph graphB where path points to graphA . |
path | the embedding path of graphA in graphB . |
graphY
, i.e., graphX
. Definition at line 7085 of file DGraph.java.
References denoptim.graph.Template.getInnerGraph(), denoptim.graph.DGraph.getVertexAtPosition(), and denoptim.graph.DGraph.indexOf().
Referenced by denoptim.ga.XoverSite.projectToClonedGraphs(), and denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone().
List< Template > denoptim.graph.DGraph.getEmbeddingPath | ( | ) |
Find the path that one has to traverse to reach this graph from any template-embedding structure.
In practice, for a graph that is embedded a template jacket T1
, which is part of another graph which is itself embedded in a template T2
, which is again part of another graph, and so on it returns the references to the embedding templates stating from the outermost to the template that embeds this graph (Outermost reference come first in the resulting list). Instead a graph that is not embedded returns an empty path.
Definition at line 6965 of file DGraph.java.
References denoptim.graph.DGraph.getEmbeddingPath(), denoptim.graph.Vertex.getGraphOwner(), and denoptim.graph.DGraph.templateJacket.
Referenced by denoptim.graph.DGraph.getEmbeddingPath(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.graph.DGraphTest.testGetEmbeddedGraphInClone(), and denoptim.graph.DGraphTest.testGetEmbeddingPath().
ArrayList< Vertex > denoptim.graph.DGraph.getFreeRCVertices | ( | ) |
Search for unused ring closing vertices: vertices that contain only a RingClosingAttractor
and are not part of any DENOPTIMRing
Definition at line 984 of file DGraph.java.
References denoptim.graph.DGraph.getRCVertices(), and denoptim.graph.DGraph.isVertexInRing().
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.graph.DGraph.getUsedRCVertices(), and denoptim.graph.rings.RingSizeManager.initialize().
int denoptim.graph.DGraph.getGraphId | ( | ) |
Definition at line 265 of file DGraph.java.
References denoptim.graph.DGraph.graphId.
Referenced by denoptim.fragspace.FragmentSpace.addFusedRingsToFragmentLibrary(), denoptim.graph.DGraph.addVertex(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.graph.DGraph.editGraph(), denoptim.graph.Candidate.getFitnessProviderOutputRepresentation(), denoptim.utils.GraphUtils.getLabel(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.ga.EAUtils.outputPopulationDetails(), and denoptim.ga.GraphOperations.performMutation().
int denoptim.graph.DGraph.getHeavyAtomsCount | ( | ) |
Calculate the number of atoms from the graph representation.
Definition at line 3953 of file DGraph.java.
References denoptim.graph.DGraph.getVertexList().
Referenced by denoptim.graph.Template.getHeavyAtomsCount(), and denoptim.ga.EAUtils.getMolSizeProbability().
ArrayList< Integer > denoptim.graph.DGraph.getIndexOfEdgesWithChild | ( | int | vid | ) |
vid |
Definition at line 3291 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeAtPosition(), denoptim.graph.DGraph.getEdgeCount(), and denoptim.graph.Edge.getSrcVertex().
List< AttachmentPoint > denoptim.graph.DGraph.getInterfaceAPs | ( | List< Vertex > | subGraphB | ) |
Searches for all AttachmentPoint
s that represent the interface between a subgraph, identified by the given list of vertices, and any other vertex, i.e., either belonging to the same graph but not to the same subgraph, or belonging to an outer embedding level.
subGraphB | list of vertices belonging to the subgraph. |
Definition at line 7113 of file DGraph.java.
Referenced by denoptim.fragspace.APMapFinder.APMapFinder(), denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.graph.DGraphTest.testGetInterfaceAPs(), and denoptim.ga.XoverSite.XoverSite().
int denoptim.graph.DGraph.getLevel | ( | Vertex | v | ) |
Calculates the level of a vertex in this graph.
v | the vertex for which we want the level. |
Definition at line 5326 of file DGraph.java.
References denoptim.graph.DGraph.getParentTree().
Referenced by denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph(), denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.DGraph.findVertices(), denoptim.graph.DGraph.removeChainUpToBranching(), and denoptim.graph.DGraphTest.testGetLevel().
String denoptim.graph.DGraph.getLocalMsg | ( | ) |
Definition at line 279 of file DGraph.java.
References denoptim.graph.DGraph.localMsg.
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.graph.Candidate.getFitnessProviderOutputRepresentation(), and denoptim.ga.GraphOperations.performMutation().
long denoptim.graph.DGraph.getMaxVertexId | ( | ) |
Definition at line 3334 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.gui.GUIGraphHandler.extendCurrentGraph(), 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().
List< Vertex > denoptim.graph.DGraph.getMutableSites | ( | ) |
A list of mutation sites from within this graph.
Definition at line 6622 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.ga.EAUtils.buildGraph(), and denoptim.graph.DGraphTest.testGetMutationSites().
List< Vertex > denoptim.graph.DGraph.getMutableSites | ( | List< MutationType > | ignoredTypes | ) |
A list of mutation sites from within this graph.
ignoredTypes | a collection of mutation types to ignore. vertices that allow only ignored types of mutation will not be considered mutation sites. |
Definition at line 6642 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
DGraph denoptim.graph.DGraph.getOutermostGraphOwner | ( | ) |
Definition at line 6943 of file DGraph.java.
References denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.DGraph.getOutermostGraphOwner(), and denoptim.graph.DGraph.templateJacket.
Referenced by denoptim.ga.EAUtils.buildCandidatesByXOver(), and denoptim.graph.DGraph.getOutermostGraphOwner().
Definition at line 3168 of file DGraph.java.
References denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.AttachmentPoint.getOwner(), and denoptim.graph.Edge.getSrcAP().
Referenced by denoptim.graph.DGraph.getParentTree().
Traverse the graph until it identifies the source of the directed path reachable from the given vertex recursively.
vertex | the child vertex from which we start traversing the graph. |
parentTree | list containing the references to all the parents recursively visited so far. |
Definition at line 3149 of file DGraph.java.
References denoptim.graph.DGraph.getParent(), and denoptim.graph.DGraph.getParentTree().
Referenced by denoptim.graph.DGraph.getDeepestAmongThese(), denoptim.graph.DGraph.getLevel(), denoptim.graph.DGraph.getParentTree(), denoptim.graph.DGraph.getSourceVertex(), and denoptim.graph.rings.PathSubGraph.PathSubGraph().
ArrayList< Vertex > denoptim.graph.DGraph.getRCVertices | ( | ) |
Search for ring closing vertices: vertices that contain only a RingClosingAttractor
Definition at line 962 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.checkConsistency(), denoptim.graph.DGraph.getFreeRCVertices(), denoptim.graph.DGraph.getUsedRCVertices(), denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), denoptim.graph.rings.PathClosabilityToolsTest.testEvaluateConstitutionalClosability(), denoptim.graph.rings.RingSizeManagerTest.testEvaluateRCVPair(), and denoptim.graph.DGraphTest.testRemoveUnusedRCVs().
int denoptim.graph.DGraph.getRingCount | ( | ) |
Definition at line 2665 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
Referenced by denoptim.graph.DGraph.sameAs(), denoptim.ga.GraphOperationsTest.testAddRing(), denoptim.graph.TemplateTest.testClone(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem(), denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_ScaffoldingPolicy(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().
List< Ring > denoptim.graph.DGraph.getRings | ( | ) |
Definition at line 771 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), denoptim.graph.DGraph.sameAs(), denoptim.graph.TemplateTest.testClone(), denoptim.ga.GraphOperationsTest.testExtractPattern_returnsEmptyListIfNoRings(), and denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().
Returns the list of rings that include the given vertex in their fundamental cycle.
v | the vertex to search for. |
Definition at line 826 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), and denoptim.graph.DGraph.sameAs().
Returns the list of rings that include the given list of vertices in their fundamental cycle.
vs | the collection of vertices to search for. |
Definition at line 847 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
ArrayList< Ring > denoptim.graph.DGraph.getRingsInvolvingVertexID | ( | int | vid | ) |
Definition at line 871 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
Vertex denoptim.graph.DGraph.getSourceVertex | ( | ) |
Identifies and return the vertex from which the spanning tree originates.
This is typically the first vertex in the list, but it is possible to programmatically build graphs that do not follow this convention. Therefore, here we test if the first vertex is a seed (i.e., it only has departing edges) and, if not, we search for the closest seed. WARNING: the graph is assumed to be an healthy spanning tree, in that it has only one seed that is reachable from any vertex by a inverse directed path. The result null
for disconnected graphs or otherwise unhealthy spanning trees.
Definition at line 740 of file DGraph.java.
References denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.getParentTree(), denoptim.graph.DGraph.getVertexAtPosition(), and denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.fixEdgeDirections(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.reorderVertexList(), denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem(), denoptim.graph.DGraphTest.testGetSourceVertex(), and denoptim.graph.DGraphTest.testReplaceSubGraph().
List< AttachmentPoint > denoptim.graph.DGraph.getSubgraphAPs | ( | List< Vertex > | subGraphB | ) |
Searches for all AttachmentPoint
s that are owned by vertices in a subgraph but either available or used by vertices that do not belong to the subgraph.
subGraphB | list of vertices belonging to the subgraph. |
Definition at line 7148 of file DGraph.java.
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.ga.GraphOperations.performCrossover(), and denoptim.graph.DGraphTest.testGetSubgraphAPs().
int denoptim.graph.DGraph.getSymmetricSetCount | ( | ) |
Returns the number of symmetric sets of vertices.
Definition at line 313 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.sameAs(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets(), denoptim.graph.DGraphTest.testDetectSymVertexSets(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_symmetry(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testReplaceVertex().
List< List< Vertex > > denoptim.graph.DGraph.getSymmetricSubGraphs | ( | List< Vertex > | subGrpVrtxs | ) | throws DENOPTIMException |
We assume that the subgraph is a continuously connected, directed graph.
By contract, the source of the symmetric subgraph's spanning tree is always the first vertex in each returned list. Also, note that symmetry does not pertain capping groups, so capping groups are not expected to be among the vertices in the given list and will not be present in the resulting subgraphs.
subGrpVrtxs |
DENOPTIMException | if capping groups are present in the list. |
Definition at line 1816 of file DGraph.java.
References denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraph.getChildTreeLimited(), and denoptim.graph.DGraph.getSymVerticesForVertex().
Referenced by denoptim.graph.DGraph.replaceSubGraph(), and denoptim.graph.DGraphTest.testGetSymmetricSubGraphs().
SymmetricVertexes denoptim.graph.DGraph.getSymSetForVertex | ( | Vertex | v | ) |
Returns the set of vertexes symmetric to the given one.
v | the vertex for which we seek the symmetric vertexes. |
Definition at line 633 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.ga.GraphOperations.deleteChain(), denoptim.ga.GraphOperations.deleteFragment(), denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.DGraph.isIsomorphicTo(), denoptim.graph.DGraph.isIsostructuralTo(), denoptim.graph.DGraph.removeBranchStartingAt(), denoptim.graph.DGraph.sameAs(), denoptim.graph.DGraphTest.testDetectSymVertexSets(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_symmetry(), and denoptim.graph.DGraphTest.testReplaceVertex().
Iterator< SymmetricVertexes > denoptim.graph.DGraph.getSymSetsIterator | ( | ) |
Get an iterator for the sets of symmetrically related vertices.
Definition at line 324 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.graph.DGraph.reassignSymmetricLabels(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeSymmetryRedundance(), denoptim.graph.DGraph.sameAs(), denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), and denoptim.graph.DGraphTest.testReplaceVertex().
v | the vertex for which we want the list of symmetric vertices. |
Definition at line 335 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.Template.getSymmetricAPSets(), denoptim.graph.DGraph.getSymmetricSubGraphs(), denoptim.graph.DGraph.insertVertex(), denoptim.graph.DGraph.removeVertexAndWeld(), denoptim.graph.DGraph.replaceVertex(), and denoptim.ga.GraphOperationsTest.testExtendGraph().
Template denoptim.graph.DGraph.getTemplateJacket | ( | ) |
Definition at line 6932 of file DGraph.java.
References denoptim.graph.DGraph.templateJacket.
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), and denoptim.ga.GraphOperations.performMutation().
|
protected |
Definition at line 4051 of file DGraph.java.
References denoptim.graph.DGraph.apCounter.
Referenced by denoptim.graph.Vertex.getUniqueAPIndex().
ArrayList< Vertex > denoptim.graph.DGraph.getUsedRCVertices | ( | ) |
Search for used ring closing vertices: vertices that contain only a RingClosingAttractor
and are part of a DENOPTIMRing
.
Definition at line 1007 of file DGraph.java.
References denoptim.graph.DGraph.getFreeRCVertices(), and denoptim.graph.DGraph.getRCVertices().
Referenced by denoptim.ga.EAUtils.getCrowdedness().
Vertex denoptim.graph.DGraph.getVertexAtPosition | ( | int | pos | ) |
Returns the vertex that is in the given position of the list of vertices belonging to this graph.
pos | the position in the list. |
Definition at line 2514 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getBranchIdOfVertexAtPosition(), denoptim.graph.DGraph.getEmbeddedGraphInClone(), denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate(), denoptim.utils.GraphUtils.getLabel(), denoptim.graph.DGraph.getSourceVertex(), denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer(), denoptim.ga.EAUtilsTest.prepare(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.graph.DGraph.sameAs(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FixedStructure(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_Free(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FreeBackwards(), denoptim.ga.EAUtilsTest.testBuildGraphFromTemplateScaffold(), denoptim.ga.PopulationTest.testClone(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.TemplateTest.testClone(), denoptim.graph.DGraphTest.testConvertSymmetricLabelsToSymmetricSets(), denoptim.ga.EAUtilsTest.testCrowdingProbability(), denoptim.graph.DGraphTest.testDetectSymVertexSets(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.graph.DGraphTest.testExtractSubgraphFromCollection(), denoptim.graph.DGraphTest.testFindSymmetrySetsOfChildVertexes(), denoptim.graph.DGraphTest.testFindVertex(), denoptim.graph.DGraphTest.testGetChildrenTree(), denoptim.graph.DGraphTest.testGetChildrenTreeWithBranchIdentifier(), denoptim.graph.DGraphTest.testGetEdgesWithSrcOrTrg(), denoptim.graph.DGraphTest.testGetInterfaceAPs(), denoptim.utils.GraphConversionToolTest.testGetJGraphKernelFromGraph(), denoptim.graph.DGraphTest.testGetLevel(), denoptim.graph.DGraphTest.testGetSourceVertex(), denoptim.graph.DGraphTest.testGetSubgraphAPs(), denoptim.graph.DGraphTest.testGetSymmetricSubGraphs(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.fragspace.GraphLinkFinderTest.testLinkFromVertex(), denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints(), denoptim.graph.rings.PathSubGraphTest.testMakePathSubGraph(), denoptim.ga.XoverSiteTest.testProjectToClonedGraphs(), denoptim.graph.DGraphTest.testReplaceSubGraph(), denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate(), denoptim.graph.DGraphTest.testReplaceVertex(), denoptim.graph.DGraphTest.testReplaceVertex_inRing(), denoptim.graph.TemplateTest.testSameAPClass(), denoptim.graph.DGraphTest.testSymmetricSetLabels(), and denoptim.ga.PopulationTest.testXOverCompatibility().
int denoptim.graph.DGraph.getVertexCount | ( | ) |
Definition at line 2672 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.ga.EAUtils.buildGraph(), denoptim.graph.DGraph.changeSignOfVertexID(), denoptim.ga.GraphOperations.deleteChain(), denoptim.ga.GraphOperations.deleteFragment(), denoptim.graph.Vertex.getMutationTypes(), denoptim.gui.GraphVertexMolViewerPanel.loadDnGraphToViewer(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.graph.DGraph.renumberVerticesGetMap(), denoptim.graph.DGraph.sameAs(), denoptim.ga.EAUtilsTest.testBuildByXOver_SubGraph(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.TemplateTest.testClone(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), denoptim.ga.GraphOperationsTest.testExtendGraph(), denoptim.ga.GraphOperationsTest.testExtractPattern_singleRingSystem(), denoptim.graph.DGraphTest.testExtractSubgraphFromCollection(), denoptim.graph.DGraphTest.testGetLevel(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_ScaffoldingPolicy(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_Symmetry(), denoptim.graph.DGraphTest.testRemoveCapping(), denoptim.graph.DGraphTest.testRemoveUnusedRCVs(), denoptim.graph.DGraphTest.testRemoveVertex(), denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate(), and denoptim.ga.PopulationTest.testXOverCompatibility().
List< Vertex > denoptim.graph.DGraph.getVertexList | ( | ) |
Definition at line 719 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.graph.DGraph.changeSignOfVertexID(), denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph(), denoptim.graph.DGraph.containsAtoms(), denoptim.gui.GraphViewerPanel.convertDnGraphToGSGraph(), denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.DGraph.detectSymVertexSets(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.findVertices(), denoptim.ga.EAUtils.foundForbiddenEnd(), denoptim.fragspace.FragsCombinationIterator.FragsCombinationIterator(), denoptim.ga.GraphOperationsTest.getExpectedSubgraphs(), denoptim.graph.DGraph.getHeavyAtomsCount(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), denoptim.graph.DGraph.graphNeedsCappingGroups(), denoptim.graph.DGraph.hasForbiddenEnd(), denoptim.graph.DGraph.hasScaffoldTypeVertex(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.renumberVerticesGetMap(), denoptim.ga.EAUtils.selectNonScaffoldNonCapVertex(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FixedStructure(), denoptim.ga.EAUtilsTest.testBuildByXOver_SubGraph(), denoptim.graph.DGraphTest.testEmbedPatternsInTemplates(), denoptim.graph.DGraphTest.testFindVertex(), denoptim.fragspace.FragmentSpaceTest.testFusedRingAddedToScaffoldLibrary(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_linearities(), denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_ScaffoldingPolicy(), denoptim.graph.DGraphTest.testReplaceVertex(), and denoptim.graph.DGraphTest.testSymmetricSetLabels().
Vertex denoptim.graph.DGraph.getVertexWithId | ( | long | vid | ) |
Searches for a vertex with the given identifier.
vid | the identifier |
Definition at line 2582 of file DGraph.java.
References denoptim.graph.DGraph.gVertices, and denoptim.graph.DGraph.indexOfVertexWithID().
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.combinatorial.GraphBuildingTask.call(), denoptim.graph.DGraph.clone(), denoptim.ga.GraphOperations.deleteChain(), denoptim.ga.GraphOperations.deleteFragment(), denoptim.graph.DGraph.DENOPTIMGraphDeserializer.deserialize(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.ga.GraphOperations.extendGraph(), denoptim.graph.DGraph.getAPOnLeftVertexID(), denoptim.graph.DGraph.getEdgeWithParent(), denoptim.programs.genetweeker.GeneOpsRunner.getEmbeddedVertex(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.fragspace.FragsCombinationIterator.next(), denoptim.ga.GraphOperations.performCrossover(), denoptim.ga.GraphOperations.rebuildBranch(), denoptim.graph.DGraph.removeCappingGroups(), denoptim.graph.DGraph.removeOrphanBranchStartingAt(), denoptim.graph.DGraph.removeSymmetryRedundantIds(), denoptim.graph.DGraphTest.testExtractSubgraphFromCollection(), and denoptim.ga.EAUtilsTest.testMakeGraphFromFragmentationOfMol_symmetry().
boolean denoptim.graph.DGraph.graphNeedsCappingGroups | ( | FragmentSpace | fragSpace | ) |
Checks the graph for unused APs that need to be capped.
true
if the graph has at least one AP that needs to be capped Definition at line 4064 of file DGraph.java.
References denoptim.fragspace.FragmentSpace.getAPClassOfCappingVertex(), and denoptim.graph.DGraph.getVertexList().
Referenced by denoptim.combinatorial.GraphBuildingTask.call().
boolean denoptim.graph.DGraph.hasForbiddenEnd | ( | FragmentSpaceParameters | fsSettings | ) |
Check if there are forbidden ends: free attachment points that are not suitable for capping and not allowed to stay unused.
true
if a forbidden end is found Definition at line 5686 of file DGraph.java.
References denoptim.fragspace.FragmentSpace.getForbiddenEndList(), denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.programs.RunTimeParameters.getLogger(), denoptim.graph.DGraph.getVertexList(), and denoptim.graph.APClass.toString().
Referenced by denoptim.graph.DGraph.checkConsistency().
boolean denoptim.graph.DGraph.hasOrEmbedsRings | ( | ) |
Check for rings in this graph and in any graph that is embedded at any level in any vertex of this graph.
Does not consider any graph that embeds this graph.
true
if there are rings in this graph or in embedded graphs. Definition at line 906 of file DGraph.java.
References denoptim.graph.Template.getInnerGraph(), denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, and denoptim.graph.DGraph.hasOrEmbedsRings().
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.molecularmodeling.ChemicalObjectModel.ChemicalObjectModel(), and denoptim.graph.DGraph.hasOrEmbedsRings().
boolean denoptim.graph.DGraph.hasRings | ( | ) |
Check for rings in this graph.
Does not cross the template-barrier, i.e., ignores any ring that is embedded at any level in any vertex of this graph, neither in any graph that embeds this graph.
true
if there are rings in this graph. Definition at line 892 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
boolean denoptim.graph.DGraph.hasScaffoldTypeVertex | ( | ) |
Checks if this graph contains a scaffold vertex.
Definition at line 6909 of file DGraph.java.
References denoptim.graph.DGraph.getVertexList(), and denoptim.graph.Vertex.BBType.SCAFFOLD.
Referenced by denoptim.graph.DGraph.embedPatternsInTemplates().
boolean denoptim.graph.DGraph.hasSymmetricAP | ( | ) |
Definition at line 286 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.fragspace.FragsCombinationIterator.next().
boolean denoptim.graph.DGraph.hasSymmetryInvolvingVertex | ( | Vertex | v | ) |
Definition at line 293 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.ga.GraphOperations.deleteChain(), denoptim.ga.GraphOperations.deleteFragment(), denoptim.ga.GraphOperations.extendGraph(), denoptim.ga.GraphOperations.rebuildBranch(), and denoptim.graph.DGraph.removeBranchStartingAt().
int denoptim.graph.DGraph.indexOf | ( | Vertex | v | ) |
Returns the index of a vertex in the list of vertices of this graph.
v | the vertex to search |
Definition at line 2569 of file DGraph.java.
References denoptim.graph.DGraph.gVertices.
Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getEmbeddedGraphInClone(), denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.ga.GraphOperations.performMutation(), and denoptim.ga.GraphOperationsTest.testLocateCompatibleXOverPoints().
int denoptim.graph.DGraph.indexOfVertexWithID | ( | long | vid | ) |
Returns the position of the first vertex that has the given ID.
vid | the vertedID of the vertex we are looking for. |
Definition at line 2598 of file DGraph.java.
References denoptim.graph.Vertex.getVertexId(), and denoptim.graph.DGraph.gVertices.
Referenced by denoptim.graph.DGraph.getVertexWithId().
boolean denoptim.graph.DGraph.insertSingleVertex | ( | Edge | edge, |
Vertex | newLink, | ||
LinkedHashMap< AttachmentPoint, AttachmentPoint > | apMap | ||
) | throws DENOPTIMException |
Inserts a given vertex in between two vertices connected by the given edge.
This method reproduces the change of vertex on all symmetric sites.
edge | the edge where to insert the new vertex. |
newLink | the new vertex to be inserted. |
apMap | the mapping of attachment points needed to install the new vertex and connect it to the rest of the graph. The syntax of this map must be:
|
true
if the substitution is successful. DENOPTIMException |
Definition at line 2440 of file DGraph.java.
References denoptim.graph.DGraph.addEdge(), denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.containsVertex(), denoptim.graph.DGraph.gEdges, denoptim.graph.AttachmentPoint.getBondType(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.isVertexInRing(), denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, denoptim.graph.DGraph.removeEdge(), and denoptim.graph.DGraph.templateJacket.
Referenced by denoptim.graph.DGraph.insertVertex().
boolean denoptim.graph.DGraph.insertVertex | ( | Edge | edge, |
int | bbId, | ||
BBType | bbt, | ||
LinkedHashMap< AttachmentPoint, Integer > | apMap, | ||
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Inserts a given vertex in between two vertices connected by the given edge.
This method reproduces the change of vertex on all symmetric sites.
edge | the edge where to insert the new vertex. |
bbId | the building block Id of the building blocks that will be inserted. |
bbt | the type of building block to be inserted. |
apMap | the mapping of attachment points needed to install the new building block and connect it to the rest of the graph. The syntax of this map must be:
|
true
if the substitution is successful. DENOPTIMException |
Definition at line 2360 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.utils.GraphUtils.ensureVertexIDConsistency(), denoptim.graph.DGraph.gEdges, denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getMaxVertexId(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.DGraph.getSymVerticesForVertex(), denoptim.graph.Edge.getTrgAP(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.graph.DGraph.insertSingleVertex(), and denoptim.graph.Vertex.newVertexFromLibrary().
Referenced by denoptim.ga.GraphOperations.extendLink().
boolean denoptim.graph.DGraph.isIsomorphicTo | ( | DGraph | other | ) |
Checks if this graph is "DENOPTIM-isomorphic" to the other one given.
"DENOPTIM-isomorphic" is a DENOPTIM-specific definition of
graph isomorphism that differs from the most common meaning of isomorphism in graph theory. In general, graph are considered undirected when evaluating DENOPTIM-isomorphism. Next, since a graph is effectively a spanning tree (ST_i={{vertices}, {acyclic edges}}) with a set of fundamental cycles (FC_i={C_1, C_2,...C_n}), any graph G={ST_i,FC_i} that contains one or more cycles can be represented in multiple ways, G={ST_j,FC_j} or G={ST_k,FC_k}, that differ by the position of the chord/s and by the corresponding pair of ring-closing vertices between which each chord is defined. The DENOPTIM-isomorphism for two graph G1 and G2 is given by the common graph theory isomorphism between two undirected graphs U1 and U2 build respectively from G1 and G2 with the convention defined in GraphConversionTool#getJGraphFromGraph(DGraph)
. Finally,
Vertex#sameAs()
BondType
and the identity of the attachment points connected thereby. This latter point has an important implication: two apparently equal graphs (same vertices that are connected to each other forming the same vertex-chains) can be non-isomorphic when the APs used to connect two vertices are not the same. Chemically, this means the stereochemistry around one or both vertices, is different in the two graphs. Therefore two otherwise equal-looking graphs can very well be, de facto, not isomorphic. This method makes use of the Vento-Foggia VF2 algorithm (see DOI:10.1109/TPAMI.2004.75) as provided by JGraphT library in VF2GraphIsomorphismInspector
.
Detection of isomorphism can be very slow for pathological cases and for graphs with large symmetric systems! TODO: consider adding a runtime limit or a further simplification/speed-up exploiting symmetry. The symmetry, however, does not help detecting isomorphism between a graph with symmetric branches and its isomorphic analog that is fully asymmetric.
other | the graph to be compared with this. |
true
is this graph is isomorphic to the other. Definition at line 3453 of file DGraph.java.
References denoptim.graph.simplified.UndirectedEdge.compare(), denoptim.graph.Vertex.getBuildingBlockId(), denoptim.graph.Vertex.getGraphOwner(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.jGraph, and denoptim.graph.Vertex.sameAs().
Referenced by denoptim.ga.GraphOperations.locateCompatibleXOverPoints(), denoptim.ga.GraphOperations.processPermutationOfEndPoints(), denoptim.programs.graphlisthandler.GraphListsHandler.runProgram(), denoptim.programs.isomorphism.Isomorphism.runProgram(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FixedStructure(), denoptim.graph.DGraphTest.testExtractSubgraph(), denoptim.graph.DGraphTest.testGraphIsomorphism(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testReplaceVertex_inRing().
boolean denoptim.graph.DGraph.isIsostructuralTo | ( | DGraph | other | ) |
Checks if this graph is "DENOPTIM-isostructural" to the other one given.
"DENOPTIM-isostructural" means that the two graphs are isomorfic when:
Vertex
equals to itself unless two vertices differ by the return value of Vertex#isRCV()
, AttachmentPoint
s that are marked as required in either graph are reflected in the other. other |
Definition at line 3580 of file DGraph.java.
References denoptim.graph.simplified.Node.compare(), denoptim.graph.simplified.NodeConnection.compare(), denoptim.graph.simplified.Node.getDNPVertex(), denoptim.graph.Vertex.getGraphOwner(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.jGraphKernel, and denoptim.graph.simplified.Node.REFTOVERTEXKERNEL.
Referenced by denoptim.ga.GraphOperations.checkAndAddXoverSites(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FixedStructure(), and denoptim.graph.DGraphTest.testIsIsostructuralTo().
boolean denoptim.graph.DGraph.isReversible | ( | FragmentSpace | fragSpace | ) |
Checks is the every edge in the graph can be defined in the opposite direction according to the APClass
compatibility rules.
Note that the reversions operation on a branched subgraph generates a graph with multiple source vertices, which is not allowed. Yet, the reversion is formally possible.
true
if the all edges can be reverted and retain consistency with APClass
compatibility rules. Definition at line 7054 of file DGraph.java.
References denoptim.graph.DGraph.gEdges.
boolean denoptim.graph.DGraph.isVertexIDInRing | ( | int | vid | ) |
Definition at line 924 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
boolean denoptim.graph.DGraph.isVertexInRing | ( | Vertex | v | ) |
Definition at line 940 of file DGraph.java.
References denoptim.graph.DGraph.gRings.
Referenced by denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph(), denoptim.graph.DGraph.getFreeRCVertices(), denoptim.utils.GraphConversionTool.getJGraphFromGraph(), denoptim.utils.GraphConversionTool.getJGraphKernelFromGraph(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.removeCappingGroups(), denoptim.graph.DGraph.removeCappingGroupsOn(), and denoptim.graph.DGraph.removeVertex().
ArrayList< DGraph > denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets | ( | RunTimeParameters | settings | ) | throws DENOPTIMException |
Evaluates the possibility of closing rings in this graph and generates all alternative graphs resulting by different combinations of rings.
true
unless no ring can be set up even if required denoptim.exception.DENOPTIMException |
Definition at line 5589 of file DGraph.java.
References denoptim.graph.DGraph.addRing(), denoptim.graph.Ring.addVertex(), denoptim.graph.rings.RingClosureParameters.allowRingClosures(), denoptim.graph.rings.RingClosureParameters.buildChelatesMode, denoptim.graph.rings.CyclicGraphHandler.checkChelatesGraph(), denoptim.graph.DGraph.clone(), denoptim.molecularmodeling.ThreeDimTreeBuilder.convertGraphTo3DAtomContainer(), denoptim.utils.RotationalSpaceUtils.defineRotatableBonds(), denoptim.programs.RunTimeParameters.ParametersType.FS_PARAMS, denoptim.fragspace.FragmentSpaceParameters.getFragmentSpace(), denoptim.programs.RunTimeParameters.getParameters(), denoptim.graph.rings.CyclicGraphHandler.getPossibleCombinationOfRings(), denoptim.fragspace.FragmentSpaceParameters.getRotSpaceDefFile(), denoptim.utils.GraphUtils.getUniqueGraphIndex(), denoptim.graph.DGraph.getVertexWithId(), denoptim.programs.RunTimeParameters.ParametersType.RC_PARAMS, denoptim.graph.DGraph.renumberVerticesGetMap(), denoptim.molecularmodeling.ThreeDimTreeBuilder.setAlignBBsIn3D(), denoptim.graph.Ring.setBondType(), denoptim.graph.DGraph.setGraphId(), denoptim.graph.DGraph.setRings(), and denoptim.fragspace.FragmentSpace.useAPclassBasedApproach().
Referenced by denoptim.combinatorial.GraphBuildingTask.call().
|
protected |
Marks the vertices of this graph with a string that is consistent for all vertices that belong to symmetric sets.
All vertices will get a label, whether they belong to a symmetric set or not. The label is places in the vertex property DENOPTIMConstants#VRTSYMMSETID
. Any previous labeling is ignored and overwritten.
Definition at line 1568 of file DGraph.java.
References denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.DGraph.gVertices, and denoptim.constants.DENOPTIMConstants.VRTSYMMSETID.
Referenced by denoptim.graph.DGraph.replaceVertex(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testSymmetricSetLabels().
boolean denoptim.graph.DGraph.removeBranchStartingAt | ( | Vertex | v | ) | throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children.
Updates symmetry accordingly, but does not remove symmetric branches.
vid | the vertexID of the root of the branch. We'll remove also this vertex. |
true
if operation is successful DENOPTIMException |
Definition at line 4821 of file DGraph.java.
References denoptim.graph.DGraph.removeEdge(), and denoptim.graph.DGraph.removeOrphanBranchStartingAt().
boolean denoptim.graph.DGraph.removeBranchStartingAt | ( | Vertex | v, |
boolean | symmetry | ||
) | throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children.
vid | the vertexID of the root of the branch. We'll remove also this vertex. |
symmetry | use true to enforce deletion of all symmetric vertices. |
true
if operation is successful. DENOPTIMException |
Definition at line 4788 of file DGraph.java.
References denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.hasSymmetryInvolvingVertex(), and denoptim.graph.DGraph.removeBranchStartingAt().
Referenced by denoptim.ga.GraphOperations.deleteFragment(), denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.removeBranchStartingAt(), and denoptim.graph.Template.removeProjectionOfInnerAP().
void denoptim.graph.DGraph.removeCappingGroups | ( | ) |
Remove all capping groups on this graph.
Definition at line 4156 of file DGraph.java.
References denoptim.graph.DGraph.gVertices, and denoptim.graph.DGraph.removeCappingGroups().
Referenced by denoptim.graph.DGraph.removeCappingGroups(), and denoptim.graph.DGraph.removeCappingGroupsFromChilds().
void denoptim.graph.DGraph.removeCappingGroups | ( | List< Vertex > | lstVerts | ) |
Remove capping groups that belong to this graph and are in the given list.
lstVerts | the list of vertices to analyze. |
Definition at line 4114 of file DGraph.java.
References denoptim.graph.Vertex.BBType.CAP, denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraph.getVertexWithId(), denoptim.graph.DGraph.isVertexInRing(), and denoptim.graph.DGraph.removeVertex().
Referenced by denoptim.graph.DGraphTest.testRemoveCapping().
void denoptim.graph.DGraph.removeCappingGroupsFromChilds | ( | List< Vertex > | lstVerts | ) |
Definition at line 4142 of file DGraph.java.
References denoptim.graph.DGraph.getChildVertices(), and denoptim.graph.DGraph.removeCappingGroups().
Referenced by denoptim.graph.DGraph.replaceSubGraph().
void denoptim.graph.DGraph.removeCappingGroupsOn | ( | Vertex | vertex | ) |
Remove capping groups on the given vertex of this graph.
Definition at line 4084 of file DGraph.java.
References denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraph.getChildVertices(), denoptim.graph.DGraph.isVertexInRing(), and denoptim.graph.DGraph.removeVertex().
Referenced by denoptim.graph.DGraphTest.testRemoveCapping().
boolean denoptim.graph.DGraph.removeChainUpToBranching | ( | Vertex | v, |
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Mutates the graph by removing the chain where a given vertex is located up to the first branching (i.e., to non-capping group) on either side.
The graph is updated accordingly. In particular, the direction of edges in the surviving graph and the definition of fundamental cycles are changed to reflect the change of spanning tree.
v | the vertex from which we start detecting a chain |
true
if successful. DENOPTIMException | is any assumption on the healthy structure of this graph is not verified. |
Definition at line 4878 of file DGraph.java.
References denoptim.graph.DGraph.addEdge(), denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.DGraph.addRing(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.Template.getAttachmentPoints(), denoptim.graph.Vertex.getAttachmentPoints(), denoptim.graph.DGraph.getAvailableAPs(), denoptim.graph.Edge.getBondType(), denoptim.graph.Vertex.getBuildingBlockType(), denoptim.graph.Vertex.getCappedAPCountThroughout(), denoptim.graph.Vertex.getChilddren(), denoptim.graph.Vertex.getChildrenThroughout(), denoptim.graph.Vertex.getEdgeToParent(), denoptim.graph.Vertex.getEdgeWith(), denoptim.graph.Vertex.getFreeAPCountThroughout(), denoptim.graph.Template.getInnerAPFromOuterAP(), denoptim.graph.DGraph.getLevel(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Ring.getPositionOf(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.Ring.getSize(), denoptim.graph.Edge.getSrcAP(), denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.Edge.getTrgAP(), denoptim.graph.Ring.getVertexAtPosition(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.APClass.isCPMapCompatibleWith(), denoptim.graph.DGraph.removeEdge(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeRing(), denoptim.graph.DGraph.removeSymmetrySet(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.Vertex.BBType.SCAFFOLD, denoptim.graph.DGraph.templateJacket, and denoptim.io.DenoptimIO.writeGraphToJSON().
Referenced by denoptim.ga.GraphOperations.deleteChain().
void denoptim.graph.DGraph.removeEdge | ( | Edge | edge | ) |
Removes an edge and update the free valences of the attachment points that were originally involved in this edge.
edge |
Definition at line 2620 of file DGraph.java.
References denoptim.graph.DGraph.gEdges, denoptim.graph.Edge.getSrcAP(), denoptim.graph.Edge.getTrgAP(), denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, and denoptim.graph.AttachmentPoint.setUser().
Referenced by denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.removeBranchStartingAt(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.replaceSingleSubGraph(), and denoptim.graph.EdgeTest.testConnectionDeconnectionLoop().
boolean denoptim.graph.DGraph.removeOrphanBranchStartingAt | ( | Vertex | v | ) | throws DENOPTIMException |
Deletes the branch, i.e., the specified vertex and its children.
This method does not cross template boundaries, thus all children belong to the same graph. Symmetry relations are updated accordingly.
vid | the vertexID of the root of the branch. We'll remove also this vertex. |
allowOrphan | use true to allow removal of branches starting with a vertex that has no edge to a parent. |
true
if operation is successful DENOPTIMException |
Definition at line 4847 of file DGraph.java.
References denoptim.graph.DGraph.getChildrenTree(), denoptim.graph.DGraph.getVertexWithId(), and denoptim.graph.DGraph.removeVertex().
Referenced by denoptim.graph.DGraph.removeBranchStartingAt(), and denoptim.graph.DGraph.removeSingleVertexAndWeld().
void denoptim.graph.DGraph.removeRing | ( | Ring | ring | ) |
Definition at line 2637 of file DGraph.java.
References denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), and denoptim.ga.GraphOperationsTest.testExtractPattern_returnsEmptyListIfNoRings().
boolean denoptim.graph.DGraph.removeSingleVertexAndWeld | ( | Vertex | vertex, |
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Remove a given vertex belonging to this graph and re-connects the resulting graph branches as much as possible.
vertex | the vertex currently belonging to this graph and to be replaced. |
true
if the operation is successful. DENOPTIMException |
Definition at line 1247 of file DGraph.java.
References denoptim.graph.SymmetricSet< T >.add(), denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.containsVertex(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.APClass.getBondType(), denoptim.graph.Vertex.getFreeAPThroughout(), denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.AttachmentPoint.getLinkedAP(), denoptim.graph.AttachmentPoint.getLinkedAPThroughout(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.DGraph.getSourceVertex(), denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, denoptim.graph.DGraph.removeEdge(), denoptim.graph.DGraph.removeOrphanBranchStartingAt(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeRing(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.symVertices, denoptim.graph.DGraph.templateJacket, and denoptim.graph.Template.updateInnerApID().
Referenced by denoptim.graph.DGraph.removeSingleVertexAndWeld(), and denoptim.graph.DGraph.removeVertexAndWeld().
void denoptim.graph.DGraph.removeSymmetryRedundance | ( | List< Vertex > | list | ) |
Remove all but one of the symmetry-related partners in a list of vertices.
The vertices must belong to this graph.
list | vertices to be purged. |
Definition at line 6392 of file DGraph.java.
References denoptim.graph.DGraph.getSymSetsIterator().
Referenced by denoptim.graph.DGraph.findVertices(), and denoptim.graph.DGraph.removeSymmetryRedundantIds().
void denoptim.graph.DGraph.removeSymmetryRedundantIds | ( | ArrayList< Long > | list | ) |
Remove all but one of the symmetry-related partners in a given list of vertex IDs.
The vertices must belong to this graph.
list | the list of vertex IDs to be purged. |
Definition at line 6426 of file DGraph.java.
References denoptim.graph.DGraph.getVertexWithId(), and denoptim.graph.DGraph.removeSymmetryRedundance().
void denoptim.graph.DGraph.removeSymmetrySet | ( | SymmetricVertexes | ss | ) |
Removed the given symmetric set, if present.
ss | the symmetric relation to be removed. |
Definition at line 620 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.removeChainUpToBranching().
void denoptim.graph.DGraph.removeVertex | ( | Vertex | vertex | ) |
Remove a vertex from this graph.
This method removes also edges and rings that involve the given vertex. Symmetric sets of vertices are corrected accordingly: they are removed if there is only one remaining vertex in the set, or purged from the vertex being removed.
vertex | the vertex to remove. |
Definition at line 1119 of file DGraph.java.
References denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.Edge.getSrcVertex(), denoptim.graph.Edge.getTrgVertex(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.isVertexInRing(), denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, denoptim.graph.DGraph.removeEdge(), denoptim.graph.DGraph.removeRing(), denoptim.graph.Vertex.resetGraphOwner(), and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.ga.GraphOperations.addRing(), denoptim.graph.DGraph.extractSubgraph(), denoptim.ga.GraphOperationsTest.getExpectedSubgraphs(), denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate(), denoptim.gui.GUIGraphHandler.initialize(), denoptim.graph.DGraph.removeCappingGroups(), denoptim.graph.DGraph.removeCappingGroupsOn(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.DGraph.removeOrphanBranchStartingAt(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceUnusedRCVsWithCapps(), and denoptim.graph.DGraphTest.testRemoveVertex().
boolean denoptim.graph.DGraph.removeVertexAndWeld | ( | Vertex | vertex, |
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Remove a given vertex belonging to this graph and re-connects the resulting graph branches as much as possible.
This method reproduces the change of vertex on all symmetric sites.
oldLink | the vertex currently belonging to this graph and to be replaced. |
true
if the operation is successful. DENOPTIMException |
Definition at line 1195 of file DGraph.java.
References denoptim.utils.GraphUtils.ensureVertexIDConsistency(), denoptim.graph.DGraph.getMaxVertexId(), denoptim.graph.DGraph.getSymVerticesForVertex(), denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, denoptim.graph.AttachmentPoint.hasConnectedSrcAtom(), denoptim.graph.AttachmentPoint.hasSameSrcAtom(), and denoptim.graph.DGraph.removeSingleVertexAndWeld().
Referenced by denoptim.ga.GraphOperations.deleteLink().
void denoptim.graph.DGraph.renumberGraphVertices | ( | ) |
Reassign vertex IDs to all vertices of this graph.
The old IDs are stored in the vertex property DENOPTIMConstants#STOREDVID
.
Definition at line 5283 of file DGraph.java.
References denoptim.graph.DGraph.renumberVerticesGetMap().
Referenced by denoptim.graph.DGraph.appendGraphOnAP(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.graph.DGraph.editGraph(), denoptim.fragspace.FragmentSpaceTest.getExpectedTemplate(), denoptim.ga.GraphOperationsTest.getFusedRings(), denoptim.fragspace.FragmentSpaceTest.getTestCase(), denoptim.ga.GraphOperationsTest.getThreeCycle(), denoptim.ga.PopulationTest.makeGraphA(), denoptim.ga.PopulationTest.makeGraphB(), denoptim.ga.PopulationTest.makeGraphC(), denoptim.ga.PopulationTest.makeGraphD(), denoptim.ga.PopulationTest.makeGraphF(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphA(), denoptim.graph.DGraphTest.makeTestGraphB(), denoptim.graph.DGraphTest.makeTestGraphC(), denoptim.graph.DGraphTest.makeTestGraphD(), denoptim.graph.DGraphTest.makeTestGraphDSub1(), denoptim.graph.DGraphTest.makeTestGraphDSub2(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphE(), denoptim.graph.DGraphTest.makeTestGraphE(), denoptim.fragspace.GraphLinkFinderTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphF(), denoptim.graph.DGraphTest.makeTestGraphH(), denoptim.graph.DGraphTest.makeTestGraphI(), denoptim.graph.DGraphTest.makeTestGraphJ(), denoptim.graph.DGraphTest.makeTestGraphK(), denoptim.graph.DGraphTest.makeTestGraphL(), denoptim.ga.XoverSite.projectToClonedGraphs(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.programs.genetweeker.GeneOpsRunner.runXOver(), and denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize().
Map< Long, Long > denoptim.graph.DGraph.renumberVerticesGetMap | ( | ) |
Reassign vertex IDs to a graph.
The old IDs are stored in the vertex property DENOPTIMConstants#STOREDVID
.
Definition at line 5296 of file DGraph.java.
References denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.Vertex.setProperty(), denoptim.graph.Vertex.setVertexId(), and denoptim.constants.DENOPTIMConstants.STOREDVID.
Referenced by denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), and denoptim.graph.DGraph.renumberGraphVertices().
|
staticprivate |
Sets the vertex at the lowest level as the scaffold, changes the
directions of edges so that the scaffold is the source, and changes the levels of the graph's other vertices to be consistent with the new scaffold.
g | Graph to fix. |
Definition at line 4717 of file DGraph.java.
References denoptim.graph.DGraph.fixEdgeDirections(), denoptim.graph.DGraph.getSourceVertex(), and denoptim.graph.DGraph.setScaffold().
Referenced by denoptim.graph.DGraph.extractPattern().
boolean denoptim.graph.DGraph.replaceSingleSubGraph | ( | List< Vertex > | subGrpVrtxs, |
DGraph | newSubGraph, | ||
LinkedHashMap< AttachmentPoint, AttachmentPoint > | apMap | ||
) | throws DENOPTIMException |
Replaced the subgraph represented by a given collection of vertices that belong to this graph.
This method does not project the change of vertex on symmetric sites, and does not alter the symmetric sets. To properly manage symmetry, you should run DGraph#reassignSymmetricLabels()
on newSubGraph
prior to calling this method, and, after running this method, call DGraph#convertSymmetricLabelsToSymmetricSets()
on this graph. This strategy reflects the fact that multiple sub-graph replacements can introduce vertices that are symmetric throughout these newly inserted subgraphs, thus a single subgraph replacement cannot know the complete list of symmetric vertices. Therefore, the handling of the symmetry is left outside of the subgraph replacement operation.
subGrpVrtxs | the vertices currently belonging to this graph and to be replaced. We assume these collection of vertices is a connected subgraph, i.e., all vertices are reachable by one single vertex via a directed path that does not involve any other vertex not included in this collections. |
newSubGraph | the graph that will be attached on this graph. No copying or cloning: such graph contains the actual vertices that will become part of this graph. |
apMap | mapping of attachment points belonging to any vertex in subGrpVrtxs to attachment points in newSubGraph . |
true
if the substitution is successful. DENOPTIMException |
Definition at line 1954 of file DGraph.java.
References denoptim.graph.DGraph.addEdge(), denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.Template.clearIAtomContainer(), denoptim.graph.DGraph.containsVertex(), denoptim.graph.Edge.getBondType(), denoptim.graph.AttachmentPoint.getEdgeUser(), denoptim.graph.AttachmentPoint.getLinkedAP(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.rings.PathSubGraph.getVertecesPath(), denoptim.graph.DGraph.gVertices, denoptim.graph.AttachmentPoint.isAvailable(), denoptim.graph.DGraph.jGraph, denoptim.graph.DGraph.jGraphKernel, denoptim.graph.DGraph.removeEdge(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.templateJacket, and denoptim.graph.Template.updateInnerApID().
Referenced by denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.graph.DGraphTest.testIsIsostructuralTo(), denoptim.graph.DGraphTest.testReplaceSubGraph(), and denoptim.graph.DGraphTest.testReplaceSubGraph_inTemplate().
boolean denoptim.graph.DGraph.replaceSubGraph | ( | List< Vertex > | subGrpVrtxs, |
DGraph | incomingGraph, | ||
LinkedHashMap< AttachmentPoint, AttachmentPoint > | apMap, | ||
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Replaced the subgraph represented by a given collection of vertices that belong to this graph.
This method reproduces the change of vertex on all symmetric sites, where a site is identified by a symmetrically identified reflection of the subgraph to replace, which are identified using symmetric sets.
subGrpVrtxs | the vertices currently belonging to this graph and to be replaced. We assume these collection of vertices is a connected graph, i.e., all vertices are reachable by one single vertex via a directed path that does not involve any other vertex not included in this collections. |
newSubGraph | the graph that will be used to create the new branch replacing the old one. Vertices of such branch will be cloned to create the new vertices to be added to this graph. |
apMap | mapping of attachment points belonging to any vertex in subGrpVrtxs to attachment points in newSubGraph . |
true
if the substitution is successful. DENOPTIMException | is capping groups are the only vertices in the subgraph. |
Definition at line 1680 of file DGraph.java.
References denoptim.graph.DGraph.addCappingGroups(), denoptim.graph.Vertex.BBType.CAP, denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.utils.GraphUtils.ensureVertexIDConsistency(), denoptim.graph.Vertex.getAP(), denoptim.graph.Vertex.getChilddren(), denoptim.graph.AttachmentPoint.getIndexInOwner(), denoptim.graph.DGraph.getMaxVertexId(), denoptim.graph.DGraph.getSymmetricSubGraphs(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.removeCappingGroupsFromChilds(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.renumberGraphVertices(), and denoptim.graph.DGraph.replaceSingleSubGraph().
Referenced by denoptim.graph.DGraph.embedPatternsInTemplates(), and denoptim.ga.GraphOperations.performCrossover().
void denoptim.graph.DGraph.replaceUnusedRCVsWithCapps | ( | FragmentSpace | fragSpace | ) | throws DENOPTIMException |
Removes unused ring-closing vertices.
If the resulting free AP needs to be capped, then the proper capping group is places where a ring-closing vertex once stood.
fragSpace | the fragment space defining how capping is configured. |
DENOPTIMException |
Definition at line 1526 of file DGraph.java.
References denoptim.graph.DGraph.appendVertexOnAP(), denoptim.graph.Vertex.getAP(), denoptim.graph.AttachmentPoint.getAPClass(), denoptim.graph.DGraph.getRCVertices(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.Vertex.getVertexId(), denoptim.graph.DGraph.removeVertex(), and denoptim.graph.Vertex.setVertexId().
Referenced by denoptim.combinatorial.GraphBuildingTask.call(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.programs.fitnessevaluator.FitnessEvaluationTask.call(), and denoptim.graph.DGraphTest.testRemoveUnusedRCVs().
boolean denoptim.graph.DGraph.replaceVertex | ( | Vertex | vertex, |
int | bbId, | ||
BBType | bbt, | ||
LinkedHashMap< Integer, Integer > | apIdMap, | ||
boolean | symmetry, | ||
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Replaced a given vertex belonging to this graph with a new vertex generated specifically for this purpose.
vertex | the vertex currently belonging to this graph and to be replaced. |
bbId | the building block Id of the building blocks that will replace the original vertex. |
bbt | the type of building block to be used to replace the original vertex. |
apMap | the mapping of attachment points needed to install the new vertex in the slot of the old one and recreate the edges to the rest of the graph. |
true
if the substitution is successful. DENOPTIMException |
Definition at line 2282 of file DGraph.java.
References denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.graph.DGraph.DGraph(), denoptim.utils.GraphUtils.ensureVertexIDConsistency(), denoptim.graph.Vertex.getAP(), denoptim.graph.DGraph.getMaxVertexId(), denoptim.graph.DGraph.getSymVerticesForVertex(), denoptim.utils.GraphUtils.getUniqueVertexIndex(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.gVertices, denoptim.graph.Vertex.newVertexFromLibrary(), denoptim.graph.DGraph.reassignSymmetricLabels(), denoptim.graph.DGraph.renumberGraphVertices(), denoptim.graph.DGraph.replaceSingleSubGraph(), and denoptim.graph.Vertex.setMutationTypes().
boolean denoptim.graph.DGraph.replaceVertex | ( | Vertex | vertex, |
int | bbId, | ||
BBType | bbt, | ||
LinkedHashMap< Integer, Integer > | apIdMap, | ||
FragmentSpace | fragSpace | ||
) | throws DENOPTIMException |
Replaced a given vertex belonging to this graph with a new vertex generated specifically for this purpose.
This method reproduces the change of vertex on all symmetric sites.
vertex | the vertex currently belonging to this graph and to be replaced. |
bbId | the building block Id of the building blocks that will replace the original vertex. |
bbt | the type of building block to be used to replace the original vertex. |
apMap | the mapping of attachment points needed to install the new vertex in the slot of the old one and recreate the edges to the rest of the graph. |
true
if the substitution is successful. DENOPTIMException |
Definition at line 2258 of file DGraph.java.
References denoptim.graph.DGraph.replaceVertex().
Referenced by denoptim.graph.DGraph.editGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.ga.GraphOperations.substituteLink(), denoptim.graph.DGraphTest.testReplaceVertex(), and denoptim.graph.DGraphTest.testReplaceVertex_inRing().
boolean denoptim.graph.DGraph.sameAs | ( | DGraph | other, |
StringBuilder | reason | ||
) |
Compare this and another graph ignoring the vertex IDs.
This method looks into the structure of the graphs to determine if the two graphs have the same spanning tree, same symmetric sets, and same rings set, despite having different vertex IDs. Does not check for alternative permutations nor alternatives spanning trees so it returns false
for isomorphic graphs that are represented by different spanning trees.
other | the other graph to be compared with this graph |
true
if the two graphs represent the same system Definition at line 3665 of file DGraph.java.
References denoptim.graph.DGraph.compareGraphNodes(), denoptim.graph.DGraph.getEdgeCount(), denoptim.graph.DGraph.getRingCount(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.DGraph.getSymmetricSetCount(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), and denoptim.graph.DGraph.sameAsRings().
Referenced by denoptim.ga.Population.getXoverPartners(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_Free(), denoptim.ga.EAUtilsTest.testBuildByXOver_Embedded_FreeBackwards(), denoptim.graph.DGraphTest.testSameAs_DiffRings(), denoptim.graph.DGraphTest.testSameAs_DiffSymmSet(), denoptim.graph.DGraphTest.testSameAs_DiffVertex(), denoptim.graph.DGraphTest.testSameAs_DisorderRings(), denoptim.graph.DGraphTest.testSameAs_Equal(), denoptim.graph.DGraphTest.testSameAs_SameRings(), denoptim.graph.DGraphTest.testSameAs_SameSymmSet(), and denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs().
|
private |
Definition at line 3775 of file DGraph.java.
References denoptim.graph.Ring.getHeadVertex(), denoptim.graph.Ring.getSize(), denoptim.graph.Ring.getTailVertex(), and denoptim.graph.Ring.getVertexAtPosition().
Referenced by denoptim.graph.DGraph.sameAs().
void denoptim.graph.DGraph.setCandidateClosableChains | ( | ArrayList< ClosableChain > | closableChains | ) |
Definition at line 705 of file DGraph.java.
References denoptim.graph.DGraph.closableChains.
Referenced by denoptim.ga.EAUtils.buildGraph(), and denoptim.graph.DGraph.clone().
void denoptim.graph.DGraph.setCandidateOwner | ( | Candidate | candidate | ) |
Sets the reference to the candidate item that is defined by this graph.
candidate | the candidate owner. |
Definition at line 239 of file DGraph.java.
References denoptim.graph.DGraph.candidate.
Referenced by denoptim.graph.Candidate.Candidate().
void denoptim.graph.DGraph.setEdgeList | ( | ArrayList< Edge > | edges | ) |
Definition at line 687 of file DGraph.java.
References denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
void denoptim.graph.DGraph.setGraphId | ( | int | id | ) |
Definition at line 258 of file DGraph.java.
References denoptim.graph.DGraph.graphId.
Referenced by denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), denoptim.graph.DGraph.clone(), denoptim.utils.GraphConversionTool.getGraphFromString(), denoptim.ga.GraphOperationsTest.getPairOfTestGraphs(), denoptim.ga.PopulationTest.getPairOfTestGraphsB(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxo(), denoptim.ga.PopulationTest.getPairOfTestGraphsBxoxo(), denoptim.combinatorial.GraphBuildingTask.GraphBuildingTask(), denoptim.gui.GUIGraphHandler.initializeCurrentGraph(), denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets(), denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold(), and denoptim.io.DenoptimIOTest.testReadGenerationFromSummary().
void denoptim.graph.DGraph.setLocalMsg | ( | String | msg | ) |
Definition at line 272 of file DGraph.java.
References denoptim.graph.DGraph.localMsg.
Referenced by denoptim.ga.EAUtils.buildCandidateByFragmentingMolecule(), denoptim.ga.EAUtils.buildCandidateByMutation(), denoptim.ga.EAUtils.buildCandidateFromScratch(), denoptim.ga.EAUtils.buildCandidatesByXOver(), denoptim.ga.EAUtils.buildGraph(), denoptim.graph.DGraph.clone(), denoptim.ga.EvolutionaryAlgorithm.makeOffspringB(), denoptim.ga.GraphOperations.performMutation(), denoptim.ga.EAUtils.readCandidateFromFile(), and denoptim.combinatorial.CombinatorialExplorerByLayer.startNewGraphFromScaffold().
void denoptim.graph.DGraph.setRings | ( | ArrayList< Ring > | rings | ) |
Definition at line 696 of file DGraph.java.
References denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.graph.DGraph.clone(), and denoptim.graph.DGraph.makeAllGraphsWithDifferentRingSets().
|
static |
Update the graph so that the vertex argument is at the scaffold level i.e.
is the source of this graph. The vertex list of this graph will also be reordered in a way that corresponds to the BFS.
v | vertex to set as scaffold |
Definition at line 6863 of file DGraph.java.
References denoptim.graph.Vertex.getAttachmentPoints(), denoptim.graph.AttachmentPoint.getEdgeUser(), denoptim.graph.Vertex.getGraphOwner(), denoptim.graph.AttachmentPoint.getOwner(), denoptim.graph.Vertex.getVertexId(), and denoptim.graph.DGraph.setVertexList().
Referenced by denoptim.ga.GraphOperationsTest.getFusedRings(), and denoptim.graph.DGraph.reorderVertexList().
void denoptim.graph.DGraph.setSymmetricVertexSets | ( | List< SymmetricVertexes > | symVertices | ) |
Definition at line 647 of file DGraph.java.
References denoptim.graph.DGraph.symVertices.
Referenced by denoptim.graph.DGraph.clone().
void denoptim.graph.DGraph.setTemplateJacket | ( | Template | template | ) |
Sets the reference to a template that embeds this graph, i.e., this graph's "jacket" template.
denoptimTemplate | the jacket template |
Definition at line 6922 of file DGraph.java.
Referenced by denoptim.graph.Template.setInnerGraph().
void denoptim.graph.DGraph.setVertexList | ( | ArrayList< Vertex > | vertices | ) |
Definition at line 678 of file DGraph.java.
References denoptim.graph.DGraph.gVertices, denoptim.graph.DGraph.jGraph, and denoptim.graph.DGraph.jGraphKernel.
Referenced by denoptim.graph.DGraph.setScaffold().
void denoptim.graph.DGraph.storeCurrentVertexIDs | ( | ) |
Copies the current vertexID of each vertex into a property of the vertex itself.
Use this to keep a memory of the vertex IDs in any given moment.
Definition at line 6982 of file DGraph.java.
References denoptim.graph.DGraph.gVertices, and denoptim.constants.DENOPTIMConstants.STOREDVID.
String denoptim.graph.DGraph.toJson | ( | ) |
Produces a string that represents this graph and that adheres to the JSON format.
Definition at line 6660 of file DGraph.java.
References denoptim.json.DENOPTIMgson.getWriter().
Referenced by denoptim.ga.OffspringEvaluationTask.call(), denoptim.graph.Candidate.getFitnessProviderOutputRepresentation(), denoptim.graph.DGraphTest.testFromToJSON(), and denoptim.io.DenoptimIOTest.testSerializeDeserializeDENOPTIMGraphs().
String denoptim.graph.DGraph.toString | ( | ) |
Definition at line 2680 of file DGraph.java.
References denoptim.graph.DGraph.gEdges, denoptim.graph.DGraph.graphId, denoptim.graph.DGraph.gRings, denoptim.graph.DGraph.gVertices, and denoptim.graph.DGraph.symVertices.
Referenced by denoptim.molecularmodeling.MultiMolecularModelBuilder.buildMulti3DStructure(), denoptim.ga.OffspringEvaluationTask.call(), denoptim.graph.DGraph.checkConsistency(), denoptim.graph.Candidate.getFitnessProviderOutputRepresentation(), denoptim.programs.genetweeker.GeneOpsRunner.runMutation(), and denoptim.programs.graphlisthandler.GraphListsHandler.runProgram().
|
private |
Generator of unique AP identifiers within this graph.
Definition at line 171 of file DGraph.java.
Referenced by denoptim.graph.DGraph.ensureUniqueApIDs(), and denoptim.graph.DGraph.getUniqueAPIndex().
|
package |
Reference to the candidate entity owning this graph, or null.
Definition at line 144 of file DGraph.java.
Referenced by denoptim.graph.DGraph.getCandidateOwner(), and denoptim.graph.DGraph.setCandidateOwner().
|
package |
The potentially closable chains of vertices.
Definition at line 121 of file DGraph.java.
Referenced by denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.getClosableChains(), denoptim.graph.DGraph.setCandidateClosableChains(), and denoptim.graph.DGraphTest.testClone().
|
package |
The edges belonging to this graph.
Definition at line 111 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.getEdgeAtPosition(), denoptim.graph.DGraph.getEdgeCount(), denoptim.graph.DGraph.getEdgeList(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.insertVertex(), denoptim.graph.DGraph.isReversible(), denoptim.graph.DGraph.removeEdge(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.graph.DGraph.setEdgeList(), denoptim.graph.DGraphTest.testClone(), and denoptim.graph.DGraph.toString().
|
package |
Definition at line 126 of file DGraph.java.
Referenced by denoptim.graph.DGraph.clone(), denoptim.graph.Candidate.compareTo(), denoptim.graph.DGraph.getGraphId(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.graph.DGraph.setGraphId(), denoptim.graph.DGraphTest.testClone(), and denoptim.graph.DGraph.toString().
|
package |
The rings defined in this graph.
Definition at line 116 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.getRingCount(), denoptim.graph.DGraph.getRings(), denoptim.graph.DGraph.getRingsInvolvingVertex(), denoptim.graph.DGraph.getRingsInvolvingVertexID(), denoptim.graph.DGraph.hasOrEmbedsRings(), denoptim.graph.DGraph.hasRings(), denoptim.graph.DGraph.isVertexIDInRing(), denoptim.graph.DGraph.isVertexInRing(), denoptim.graph.DGraph.removeRing(), denoptim.graph.DGraph.removeVertexAndWeld(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.graph.DGraph.setRings(), denoptim.graph.DGraphTest.testClone(), and denoptim.graph.DGraph.toString().
|
package |
The vertices belonging to this graph.
Definition at line 106 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addCappingGroups(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.containsOrEmbedsVertex(), denoptim.graph.DGraph.containsVertex(), denoptim.graph.DGraph.containsVertexID(), denoptim.graph.DGraph.convertSymmetricLabelsToSymmetricSets(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.embedPatternsInTemplates(), denoptim.graph.DGraph.extractSubgraph(), denoptim.graph.DGraph.getAttachmentPoints(), denoptim.graph.DGraph.getBranchIdOfVertex(), denoptim.graph.DGraph.getMaxVertexId(), denoptim.graph.DGraph.getMutableSites(), denoptim.graph.Template.getMutationSites(), denoptim.graph.DGraph.getRCVertices(), denoptim.graph.DGraph.getSourceVertex(), denoptim.graph.DGraph.getVertexAtPosition(), denoptim.graph.DGraph.getVertexCount(), denoptim.graph.DGraph.getVertexList(), denoptim.graph.DGraph.getVertexWithId(), denoptim.graph.DGraph.hasOrEmbedsRings(), denoptim.graph.DGraph.indexOf(), denoptim.graph.DGraph.indexOfVertexWithID(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.reassignSymmetricLabels(), denoptim.graph.DGraph.removeCappingGroups(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.removeVertexAndWeld(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.replaceSubGraph(), denoptim.graph.DGraph.replaceVertex(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.graph.DGraph.setVertexList(), denoptim.graph.DGraph.storeCurrentVertexIDs(), denoptim.graph.DGraphTest.testClone(), denoptim.graph.DGraphTest.testReplaceVertex(), denoptim.graph.DGraph.toString(), and denoptim.graph.Template.updateMutTypeToFixedSTructure().
|
private |
JGraph representation used to detect DENOPTIM-isomorphism.
Definition at line 155 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.isIsomorphicTo(), denoptim.graph.DGraph.removeEdge(), denoptim.graph.DGraph.removeRing(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.setEdgeList(), denoptim.graph.DGraph.setRings(), and denoptim.graph.DGraph.setVertexList().
|
private |
JGraph representation used to detect DENOPTIM-isostructural graphs.
Definition at line 161 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addEdge(), denoptim.graph.DGraph.addRing(), denoptim.graph.DGraph.addVertex(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.DGraph.isIsostructuralTo(), denoptim.graph.DGraph.removeEdge(), denoptim.graph.DGraph.removeRing(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.replaceSingleSubGraph(), denoptim.graph.DGraph.setEdgeList(), denoptim.graph.DGraph.setRings(), and denoptim.graph.DGraph.setVertexList().
|
package |
A free-format string used to record simple properties in the graph.
For instance, whether this graph comes from a given initial population or is generated anew from scratch, or from mutation/crossover.
Definition at line 139 of file DGraph.java.
Referenced by denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.getLocalMsg(), denoptim.graph.DGraph.setLocalMsg(), and denoptim.graph.DGraphTest.testClone().
|
private |
Definition at line 132 of file DGraph.java.
Referenced by denoptim.graph.DGraph.addSymmetricSetOfVertices(), denoptim.graph.DGraph.cleanup(), denoptim.graph.DGraph.clone(), denoptim.graph.DGraph.detectSymVertexSets(), denoptim.graph.DGraph.DGraph(), denoptim.graph.DGraph.getSymmetricSetCount(), denoptim.graph.DGraph.getSymSetForVertex(), denoptim.graph.DGraph.getSymSetsIterator(), denoptim.graph.DGraph.getSymVerticesForVertex(), denoptim.graph.DGraph.hasSymmetricAP(), denoptim.graph.DGraph.hasSymmetryInvolvingVertex(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), denoptim.graph.DGraph.removeSymmetrySet(), denoptim.graph.DGraph.removeVertex(), denoptim.graph.DGraph.DENOPTIMGraphSerializer.serialize(), denoptim.graph.DGraph.setSymmetricVertexSets(), and denoptim.graph.DGraph.toString().
|
package |
Reference to the Template
embedding this graph.
Definition at line 149 of file DGraph.java.
Referenced by denoptim.graph.Template.addInnerToOuterAPMapping(), denoptim.graph.AttachmentPoint.getEdgeUserThroughout(), denoptim.graph.DGraph.getEmbeddingPath(), denoptim.graph.DGraph.getOutermostGraphOwner(), denoptim.graph.DGraph.getTemplateJacket(), denoptim.graph.DGraph.insertSingleVertex(), denoptim.graph.AttachmentPoint.isAvailableThroughout(), denoptim.graph.DGraph.removeChainUpToBranching(), denoptim.graph.Template.removeProjectionOfInnerAP(), denoptim.graph.DGraph.removeSingleVertexAndWeld(), and denoptim.graph.DGraph.replaceSingleSubGraph().