Basic types

For element types, molassembler adopts scine_utilities.ElementType.

class scine_molassembler.BondIndex

Ordered atom index pair indicating a bond in a molecule graph.

Has some container magic methods and comparators.

Example

>>> b = BondIndex(10, 4)
>>> b
(4, 10)
>>> b.first
4
>>> b[1]
10
>>> b[1] = 3 # Change part of the bond index
>>> b # The altered object is still ordered
(3, 4)
>>> 3 in b
True
>>> 10 in b
False
>>> c = BondIndex(4, 3)
>>> b == c
True
>>> d = BondIndex(2, 4)
>>> d < c
True
__init__(self: scine_molassembler.BondIndex, a: int, b: int) None

Initialize a bond index from two atom indices

property first

The lesser atom index

property second

The greater atom index

class scine_molassembler.BondType

Bond type enumeration. Besides the classic organic single, double and triple bonds, bond orders up to sextuple are explicitly included. Eta is a bond order used internally by the library to represent haptic bonding. It should not be set by users.

Members:

Single : Single bond

Double : Double bond

Triple : Triple bond

Quadruple : Quadruple bond

Quintuple : Quintuple bond

Sextuple : Sextuple bond

Eta : Eta bond, indicates haptic bonding

Double = <BondType.Double: 1>
Eta = <BondType.Eta: 6>
Quadruple = <BondType.Quadruple: 3>
Quintuple = <BondType.Quintuple: 4>
Sextuple = <BondType.Sextuple: 5>
Single = <BondType.Single: 0>
Triple = <BondType.Triple: 2>
__init__(self: scine_molassembler.BondType, value: int) None
property name
property value