rmgpy.molecule.graph.Edge¶
- class rmgpy.molecule.graph.Edge(vertex1, vertex2)¶
A base class for edges in a graph. The vertices which comprise the edge can be accessed using the vertex1 and vertex2 attributes.
- copy(self) Edge ¶
Return a copy of the edge. The default implementation assumes that no semantic information is associated with each edge, and therefore simply returns a new
Edge
object. Note that the vertices are not copied in this implementation.
- equivalent(self, Edge other) bool ¶
Return
True
if two edges self and other are semantically equivalent, orFalse
if not. You should reimplement this function in a derived class if your edges have semantic information.
- get_other_vertex(self, Vertex vertex) Vertex ¶
Given a vertex that makes up part of the edge, return the other vertex. Raise a
ValueError
if the given vertex is not part of the edge.
- is_specific_case_of(self, Edge other) bool ¶
Return
True
if self is semantically more specific than other, orFalse
if not. You should reimplement this function in a derived class if your edges have semantic information.
- vertex1¶
rmgpy.molecule.graph.Vertex
- Type:
vertex1
- vertex2¶
rmgpy.molecule.graph.Vertex
- Type:
vertex2