Random Atom Factory

class RandomAtomFactory(atoms, num_atoms, required_atoms=(), random_seed=None)[source]

Bases: vabene.atom.factories.atom_factory.AtomFactory

Creates a random collection of atoms.

Parameters:
  • atoms (tuple of Atom) – The atoms, which are randomly selected, with replacement, in each get_atoms() call.
  • num_atoms (int) – The number of atoms which should be yielded in each get_atoms() call.
  • required_atoms (tuple of Atom, optional) – Atoms, which must be yielded in each get_atoms() call.
  • random_seed (int, optional) – The random seed to use.

Methods

get_atoms() Yield the atoms of a molecule.
get_atoms()[source]

Yield the atoms of a molecule.

Yields:Atom – An atom.