3.1.12.2. rule/GraphInterface

3.1.12.2.1. Class RuleLeftGraph

class mod.RuleLeftGraph

A proxy object representing the left graph of the rule.

rule

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

Type

Rule

numVertices

(Read-only) The number of vertices in the graph.

Type

int

vertices

(Read-only) An iterable of all vertices in the graph.

Type

RuleLeftGraphVertexRange

numEdges

(Read-only) The number of edges in the graph.

Type

int

edges

(Read-only) An iterable of all edges in the graph.

Type

RuleLeftGraphEdgeRange

3.1.12.2.2. Class RuleLeftGraphVertex

class mod.RuleLeftGraphVertex

A descriptor of either a vertex in a left side, or a null vertex.

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

id

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

Type

int

Raises

LogicError if it is a null descriptor.

rule

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this vertex in the core graph.

Type

RuleVertex

degree

(Read-only) The degree of the vertex.

Type

int

Raises

LogicError if it is a null descriptor.

incidentEdges

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

Type

RuleLeftGraphIncidentEdgeRange

Raises

LogicError if it is a null descriptor.

stringLabel

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

Type

str

Raises

LogicError if it is a null descriptor.

atomId

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

Type

AtomId

Raises

LogicError if it is a null descriptor.

isotope

(Read-only) The isotope of the vertex.

Type

Isotope

Raises

LogicError if it is a null descriptor.

charge

(Read-only) The charge of the vertex.

Type

Charge

Raises

LogicError if it is a null descriptor.

radical

(Read-only) The radical status of the vertex.

Type

bool

Raises

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.

Returns

the name of the PDF-file that will be compiled in post-processing.

Return type

str

Raises

LogicError if it is a null descriptor.

3.1.12.2.3. Class RuleLeftGraphEdge

class mod.RuleLeftGraphEdge

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

graph

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this edge in the core graph.

Type

RuleEdge

source

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

Type

RuleLeftGraphVertex

Raises

LogicError if it is a null descriptor.

target

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

Type

RuleLeftGraphVertex

Raises

LogicError if it is a null descriptor.

stringLabel

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

Type

str

Raises

LogicError if it is a null descriptor.

bondType

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

Type

BondType

Raises

LogicError if it is a null descriptor.

3.1.12.2.4. Class RuleContextGraph

class mod.RuleContextGraph

A proxy object representing the context graph of the rule.

rule

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

Type

Rule

numVertices

(Read-only) The number of vertices in the graph.

Type

int

vertices

(Read-only) An iterable of all vertices in the graph.

Type

RuleContextGraphVertexRange

numEdges

(Read-only) The number of edges in the graph.

Type

int

edges

(Read-only) An iterable of all edges in the graph.

Type

RuleContextGraphEdgeRange

3.1.12.2.5. Class RuleContextGraphVertex

class mod.RuleContextGraphVertex

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

id

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

Type

int

Raises

LogicError if it is a null descriptor.

rule

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this vertex in the core graph.

Type

RuleVertex

degree

(Read-only) The degree of the vertex.

Type

int

Raises

LogicError if it is a null descriptor.

incidentEdges

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

Type

RuleContextGraphIncidentEdgeRange

Raises

LogicError if it is a null descriptor.

3.1.12.2.6. Class RuleContextGraphEdge

class mod.RuleContextGraphEdge

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

graph

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this edge in the core graph.

Type

RuleEdge

source

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

Type

RuleContextGraphVertex

Raises

LogicError if it is a null descriptor.

target

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

Type

RuleContextGraphVertex

Raises

LogicError if it is a null descriptor.

3.1.12.2.7. Class RuleRightGraph

class mod.RuleRightGraph

A proxy object representing the right graph of the rule.

rule

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

Type

Rule

numVertices

(Read-only) The number of vertices in the graph.

Type

int

vertices

(Read-only) An iterable of all vertices in the graph.

Type

RuleRightGraphVertexRange

numEdges

(Read-only) The number of edges in the graph.

Type

int

edges

(Read-only) An iterable of all edges in the graph.

Type

RuleRightGraphEdgeRange

3.1.12.2.8. Class RuleRightGraphVertex

class mod.RuleRightGraphVertex

A descriptor of either a vertex in a right side, or a null vertex.

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

id

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

Type

int

Raises

LogicError if it is a null descriptor.

rule

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this vertex in the core graph.

Type

RuleVertex

degree

(Read-only) The degree of the vertex.

Type

int

Raises

LogicError if it is a null descriptor.

incidentEdges

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

Type

RuleRightGraphIncidentEdgeRange

Raises

LogicError if it is a null descriptor.

stringLabel

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

Type

str

Raises

LogicError if it is a null descriptor.

atomId

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

Type

AtomId

Raises

LogicError if it is a null descriptor.

isotope

(Read-only) The isotope of the vertex.

Type

Isotope

Raises

LogicError if it is a null descriptor.

charge

(Read-only) The charge of the vertex.

Type

Charge

Raises

LogicError if it is a null descriptor.

radical

(Read-only) The radical status of the vertex.

Type

bool

Raises

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.

Returns

the name of the PDF-file that will be compiled in post-processing.

Return type

str

Raises

LogicError if it is a null descriptor.

3.1.12.2.9. Class RuleRightGraphEdge

class mod.RuleRightGraphEdge

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

graph

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

Type

Rule

Raises

LogicError if it is a null descriptor.

core

(Read-only) The descriptor for this edge in the core graph.

Type

RuleEdge

source

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

Type

RuleRightGraphVertex

Raises

LogicError if it is a null descriptor.

target

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

Type

RuleRightGraphVertex

Raises

LogicError if it is a null descriptor.

stringLabel

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

Type

str

Raises

LogicError if it is a null descriptor.

bondType

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

Type

BondType

Raises

LogicError if it is a null descriptor.

3.1.12.2.10. Class RuleVertex

class mod.RuleVertex

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

id

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

Type

int

Raises

LogicError if it is a null descriptor.

rule

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

Type

Rule

Raises

LogicError if it is a null descriptor.

left

(Read-only) A null descriptor if this vertex is not in the left graph, otherwise the descriptor of this vertex in the left graph.

context

(Read-only) A null descriptor if this vertex is not in the context graph, otherwise the descriptor of this vertex in the context graph.

right

(Read-only) A null descriptor if this vertex is not in the right graph, otherwise the descriptor of this vertex in the right graph.

degree

(Read-only) The degree of the vertex.

Type

int

Raises

LogicError if it is a null descriptor.

incidentEdges

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

Type

RuleIncidentEdgeRange

Raises

LogicError if it is a null descriptor.

get2DX(withHydrogens=True)
Returns

the x-coordinate in a 2D depiction of the rule. Different sets of coordinates exists for rendering with and wihout certain hydrogens.

Return type

float

Raises

LogicError if it is a null descriptor, or if withHydrogens is True and the vertex is a “clean” hydrogen.

get2DY(withHydrogens=True)
Returns

the y-coordinate in a 2D depiction of the rule. Different sets of coordinates exists for rendering with and wihout certain hydrogens.

Return type

float

Raises

LogicError if it is a null descriptor, or if withHydrogens is True and the vertex is a “clean” hydrogen.

3.1.12.2.11. Class RuleEdge

class mod.RuleEdge

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

__init__(self)

Constructs a null descriptor.

isNull()
Returns

whether this is a null descriptor or not.

Return type

bool

rule

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

Type

Rule

Raises

LogicError if it is a null descriptor.

left

(Read-only) A null descriptor if this edge is not in the left graph, otherwise the descriptor of this edge in the left graph.

context

(Read-only) A null descriptor if this edge is not in the context graph, otherwise the descriptor of this edge in the context graph.

right

(Read-only) A null descriptor if this edge is not in the right graph, otherwise the descriptor of this edge in the right graph.

source

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

Type

RuleVertex

Raises

LogicError if it is a null descriptor.

target

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

Type

RuleVertex

Raises

LogicError if it is a null descriptor.