# 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

connectivity1

‘short’

Type:

connectivity1

connectivity2

‘short’

Type:

connectivity2

connectivity3

‘short’

Type:

connectivity3

copy(self)

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.

edges

dict

Type:

edges

equivalent(self, Vertex other, bool strict=True) bool

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.

ignore

‘bool’

Type:

ignore

is_specific_case_of(self, Vertex other) bool

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.

mapping

rmgpy.molecule.graph.Vertex

Type:

mapping

reset_connectivity_values(self)

Reset the cached structure information for this vertex.

sorting_label

‘short’

Type:

sorting_label

terminal

‘bool’

Type:

terminal