PotentialDipole¶
- class torchpme.PotentialDipole(smearing: float | None = None, exclusion_radius: float | None = None, epsilon: float = 0.0)[source]¶
Pair potential energy function between point dipoles.
The intercation is described as
\[V(\vec{r}) = \frac{(\vec{\mu}_i \cdot \vec{\mu}_j)}{r^3} - \frac{3 (\vec{\mu}_i \cdot \vec{r}) (\vec{\mu}_j \cdot \vec{r}) }{r^5}\]where \(r=|\vec{r}|\).
- Parameters:
smearing (float | None) – float or torch.Tensor containing the parameter often called “sigma” in publications, which determines the length-scale at which the short-range and long-range parts of the naive \(1/r\) potential are separated. The smearing parameter corresponds to the “width” of a Gaussian smearing of the particle density.
exclusion_radius (float | None) – A length scale that defines a local environment within which the potential should be smoothly zeroed out, as it will be described by a separate model.
epsilon (float) – Dielectric constant of the medium in which the dipoles are embedded.
- f_cutoff(vector: Tensor) Tensor [source]¶
Default cutoff function defining the local region that should be excluded from the computation of a long-range model. Defaults to a shifted cosine \((1+\cos \pi r/r_\mathrm{cut})/2\).
- lr_from_dist(vector: Tensor) Tensor [source]¶
Long-range of the range-separated dipolar potential.
Used to subtract out the interior contributions after computing the long-range part in reciprocal (Fourier) space.
- lr_from_k_sq(k_sq: Tensor) Tensor [source]¶
Fourier transform of the long-range part of the potential.
- self_contribution() Tensor [source]¶
A correction that depends exclusively on the “charge” on every particle and on the range splitting parameter. Foe example, in the case of a Coulomb potential, this is the potential generated at the origin by the fictituous Gaussian charge density in order to split the potential into a SR and LR part.
- Return type:
- background_correction(volume) Tensor [source]¶
A correction designed to compensate for the presence of divergent terms. For instance, the energy of a periodic electrostatic system is infinite when the cell is not charge-neutral. This term then implicitly assumes that a homogeneous background charge of the opposite sign is present to make the cell neutral.
- Return type: