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

edges

dict

Dictionary of edges with keys being neighboring vertices

sorting_label

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(other, strict)

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.

is_specific_case_of(other)

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.

reset_connectivity_values()

Reset the cached structure information for this vertex.