# 3.1.8.3. graph/GraphInterface¶

## 3.1.8.3.1. Class GraphVertex¶

class mod.GraphVertex

A descriptor of either a vertex in a graph, or a null vertex.

__init__(self)

Constructs a null descriptor.

isNull()
Returns: whether this is a null descriptor or not. bool
id

(Read-only) The index of the vertex. It will be in the range $$[0, numVertices[$$.

Type: int LogicError if it is a null descriptor.
graph

(Read-only) The graph the vertex belongs to.

Type: Graph LogicError if it is a null descriptor.
degree

(Read-only) The degree of the vertex.

Type: int LogicError if it is a null descriptor.
incidentEdges

(Read-only) A range of incident edges to this vertex.

Type: GraphIncidentEdgeRange LogicError if it is a null descriptor.
stringLabel

(Read-only) The string label of the vertex.

Type: string LogicError if it is a null descriptor.
atomId

(Read-only) The atom id of the vertex.

Type: AtomId LogicError if it is a null descriptor.
charge

(Read-only) The charge of the vertex.

Type: Charge LogicError if it is a null descriptor.
radical

Type: bool LogicError if it is a null descriptor.
printStereo()
printStereo(p)

Print the stereo configuration for the vertex.

Parameters: p (GraphPrinter) – the printing options used for the depiction. the name of the PDF-file that will be compiled in post-processing. string LogicError if it is a null descriptor.

## 3.1.8.3.2. Class GraphEdge¶

class mod.GraphEdge

A descriptor of either an edge in a graph, or a null edge.

__init__(self)

Constructs a null descriptor.

isNull()
Returns: whether this is a null descriptor or not. bool
graph

(Read-only) The graph the edge belongs to.

Type: Graph LogicError if it is a null descriptor.
source

(Read-only) The source vertex of the edge.

Type: GraphVertex LogicError if it is a null descriptor.
target

(Read-only) The target vertex of the edge.

Type: GraphVertex LogicError if it is a null descriptor.
stringLabel

(Read-only) The string label of the edge.

Type: string LogicError if it is a null descriptor.
bondType

(Read-only) The bond type of the edge.

Type: BondType LogicError if it is a null descriptor.