rmgpy.molecule.graph.Vertex¶
- class rmgpy.molecule.graph.Vertex¶
A base class for vertices in a graph. Contains several connectivity values useful for accelerating isomorphism searches, as proposed by Morgan (1965).
Attribute
Type
Description
connectivity1
intThe number of nearest neighbors
connectivity2
intThe sum of the neighbors’ connectivity1 values
connectivity3
intThe sum of the neighbors’ connectivity2 values
edges
dictDictionary of edges with keys being neighboring vertices
sorting_label
intAn integer label used to sort the vertices
- copy()¶
Return a copy of the vertex. The default implementation assumes that no semantic information is associated with each vertex, and therefore simply returns a new
Vertexobject.
- equivalent(other, strict=True)¶
Return
Trueif two vertices self and other are semantically equivalent, orFalseif not. You should reimplement this function in a derived class if your vertices have semantic information.
- is_specific_case_of(other)¶
Return
Trueif self is semantically more specific than other, orFalseif not. You should reimplement this function in a derived class if your edges have semantic information.
- reset_connectivity_values()¶
Reset the cached structure information for this vertex.