Molecule¶
-
class
Molecule(atoms, bonds)[source]¶ Bases:
objectA molecular graph.
Parameters: Methods
get_atoms(self[, atom_ids])Yield the atoms of the molecule. get_bonds(self[, bond_ids])Yield the bonds of the molecule. get_num_atoms(self)Return the number of atoms in the molecule. get_num_bonds(self)Return the number of bonds in the molecule. -
get_atoms(self, atom_ids=None)[source]¶ Yield the atoms of the molecule.
Parameters: atom_ids ( iterableofint) – The ids of the atoms which should be yielded. Can be anint, if only one atom should be yielded.Yields: Atom– An atom of the molecule.
-
get_bonds(self, bond_ids=None)[source]¶ Yield the bonds of the molecule.
Parameters: bond_ids ( iterableofint) – The ids of bonds which should be yielded. Can be anint, if only one bond should be yielded.Yields: Bond– A bond of the molecule.
-