molfoundry.IncidenceCount#

class molfoundry.IncidenceCount(op, count, nodeLabels=None, edgeLabels=None, edgeWeights=None)#

Bases: _Condition

The edges at a vertex number op count: a leaf of a condition.

Only edges whose label is in edgeLabels, to a neighbor whose label is in nodeLabels, are counted; None counts any (an unlabeled edge of an electron graph has no label in any list). Each counted edge adds its weight from edgeWeights, a mapping from edge label to weight, or 1 for a label not listed, so a degree is a count without weights and a valence one with bond orders as weights. Weights must not be negative. op is a ConstraintOp or its symbol ("<=").

Parameters:
property op: ConstraintOp#
property count: float#
property nodeLabels: Tuple[str, ...] | None#
property edgeLabels: Tuple[str, ...] | None#
property edgeWeights: Tuple[Tuple[str, float], ...] | None#

(edge label, weight) pairs, by label; None if unset.