td
#
Run torsion drives.
Classes:
-
WFP
–Parameters for torsion drives that use wavefront propagation.
-
Simple
–Parameters for torsion drives that do a simple linear scan.
-
Params
–Parameters for the optimization process.
Functions:
-
bond_to_dihedral_idxs
–Select a dihedral to scan given a central bond to scan around.
-
torsion_drive
–Perform a torsion scan of a molecule around a given dihedral.
WFP
dataclass
#
Parameters for torsion drives that use wavefront propagation.
Attributes:
-
type
(Literal['wavefront']
) –The type of driver to use.
-
energy_decrease_thresh
(float | None
) –The minimum energy decrease required to continue scanning.
-
energy_upper_limit
(float | None
) –The maximum energy to scan up to.
Simple
dataclass
#
Params
dataclass
#
Parameters for the optimization process.
Attributes:
bond_to_dihedral_idxs
#
Select a dihedral to scan given a central bond to scan around.
Parameters:
-
mol
(Molecule
) –The molecule to scan.
-
bond
(tuple[int, int]
) –The bond to scan around.
Returns:
-
tuple[int, int, int, int]
–The indices of the atoms involved in the dihedral.
Source code in tico/td.py
torsion_drive
#
torsion_drive(
coords: Tensor | list[Tensor],
bond_idxs: Tensor,
dihedral: tuple[int, int, int, int],
energy_fn: EnergyFn,
atomic_nums: Tensor,
params: Params | None = None,
) -> dict[int, tuple[Tensor, Tensor]]
Perform a torsion scan of a molecule around a given dihedral.
Parameters:
-
coords
(Tensor | list[Tensor]
) –The initial cartesian coordinates [a0].
-
bond_idxs
(Tensor
) –The indices of the bonds in the molecule to scan.
-
dihedral
(tuple[int, int, int, int]
) –The dihedral to scan.
-
energy_fn
(EnergyFn
) –A function that computes the energy and gradients of the molecule. It should take the cartesian coordinates and return the energy [Eh] and gradients [Eh/a0] in atomic units.
-
atomic_nums
(Tensor
) –The atomic numbers of the atoms in the molecule.
-
params
(Params | None
, default:None
) –The parameters for the torsion drive.
Returns:
-
dict[int, tuple[Tensor, Tensor]]
–The optimized coordinates [a0] and energies [Eh] at each angle [deg].