torchani.electro#
Utilities for working with charged systems
Useful for systems that have charges and coulomb-like electrostatic interactions.
Functions
Compute dipoles in eA |
Classes
Compute dipoles in eA |
|
Usage: |
- class torchani.electro.DipoleComputer(masses=(), reference='center_of_mass', device=None, dtype=None)[source]#
Compute dipoles in eA
- Parameters:
- forward(atomic_nums, coordinates, charges)[source]#
Calculate the dipoles
- Parameters:
atomic_nums (Tensor) – An int tensor that stores the atomic numbers of a batch of molecules. Shape is
(molecules, 3)
.coordinates (Tensor) – A float tensor with the coordinates of a batch of molecules. Shape is
(molecules, atoms, 3)
. All ANI models use Angstrom.charges (Tensor) – Float tensor of atomic charges
(M, N)
. Unit should be e.
- Returns:
Dipoles with shape
(molecules, 3)
- Return type:
- torchani.electro.compute_dipole(species, coordinates, charges, reference='center_of_mass')[source]#
Compute dipoles in eA
Convenience wrapper over
DipoleComputer
. Non-jittable.