3.1.1. Chem¶
3.1.1.1. Class AtomId¶
-
class
mod.AtomId¶ Representation of the chemical element of an atom.
-
__init__(self, id=AtomIds.Invalid)¶ Construct an atom ID from an integer.
- Parameters
id (int) – the atomic number to construct from, or
AtomIds.Invalidto explicitly signal an invalid atom. Must be at most the same value asAtomIds.Max.
-
symbol¶ (Read-only) The symbol represented by the atom id.
- Type
- Raises
LogicErrorif the id is invalid.
-
__int__(self)¶ Implicit conversion to an integer type.
-
3.1.1.2. Class Isotope¶
-
class
mod.Isotope¶ Representation of the isotope of an atom.
-
__init__(self)¶ -
__init__(self, i) Construct a representation of an isotope. If an isotope number is given, that specific one is constructed, otherwise the most abundant one is implicitly constructed.
Note
There is a difference between constructing the most abundant isotope implicitly and explicitly.
- Parameters
i (int) – An isotope number for explicit construction. Passing -1 is equivalent to default-construction. The number must be either -1 or at least 1.
-
__int__(self)¶ Implicit conversion to an integer type.
-
3.1.1.3. Class Charge¶
3.1.1.4. Class AtomData¶
3.1.1.5. Class BondType¶
-
class
mod.BondType¶ Representation of a bond type.
-
Invalid¶
-
Single¶
-
Aromatic¶
-
Double¶
-
Triple¶
-
__str__(self)¶ - Returns
A string representation of the bond type adhering to the string encoding of bonds (see Molecule Encoding).
- Raises
LogicErrorif the bond type isInvalid.
-