spindry.Spinner
- class spindry.Spinner(step_size, rotation_step_size, num_conformers, max_attempts=1000, potential_function=None, beta=2, random_seed=1000)[source]
Bases:
objectGenerate host-guest conformations by rotating guest.
A Metroplis MC algorithm is applied to perform rigid translations and rotations of the guest, relative to the host.
Methods
Compute the potential of a supramolecule.
Get conformers of supramolecule.
Get final conformer of supramolecule.
- Parameters:
- compute_potential(supramolecule)[source]
Compute the potential of a supramolecule.
- Parameters:
supramolecule (SupraMolecule)
- Return type:
- get_conformers(supramolecule, movable_components=None, verbose=False)[source]
Get conformers of supramolecule.
- Parameters:
supramolecule (SupraMolecule) – The supramolecule to optimize.
movable_components (tuple[int, ...] | None) – Components of supramolecule to move during simulation.
verbose (bool) – True to print some extra information.
- Yields:
conformer –
SupraMoleculeThe host-guest supramolecule.
- Return type:
abc.Iterable[mch.Molecule]
- get_final_conformer(supramolecule, movable_components=None)[source]
Get final conformer of supramolecule.
- Parameters:
supramolecule (SupraMolecule) – The supramolecule to optimize.
movable_components (tuple[int, ...] | None) – Components of supramolecule to move during simulation. If None, then moved components are selected randomly, and the largest component (host) is not moved.
- Returns:
The host-guest supramolecule.
- Return type:
conformer