# 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 int The number of nearest neighbors
connectivity2 int The sum of the neighbors’ connectivity1 values
connectivity3 int The sum of the neighbors’ connectivity2 values
sortingLabel int An 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 Vertex object.

equivalent()

Return True if two vertices self and other are semantically equivalent, or False if not. You should reimplement this function in a derived class if your vertices have semantic information.

isSpecificCaseOf()

Return True if self is semantically more specific than other, or False if not. You should reimplement this function in a derived class if your edges have semantic information.

resetConnectivityValues()

Reset the cached structure information for this vertex.