Skip to content

Commit 1f61266

Browse files
committed
slight proofread
1 parent a17217a commit 1f61266

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

docs/src/about.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,6 @@ potential at the atomic positions as output. To use torch-pme as a modular libra
2727
provide a set of building blocks that can be combined to build custom range-separated
2828
architectures, as shown in the figure below.
2929

30-
.. note::
31-
32-
``torch-pme`` adopts a different parameter convention. Instead of using the usual
33-
parameters, the inverse width of Gaussian charge cloud :math:`\alpha` and the Fourier
34-
space cutoff :math:`K`, we use the smearing :math:`\sigma=\frac{1}{\sqrt{2}\alpha}`
35-
and the long-range resolution :math:`h=\frac{2\pi}{K}`.
36-
3730
.. figure:: ../static/images/pme-structure.*
3831
:width: 650px
3932
:align: center
@@ -44,3 +37,11 @@ architectures, as shown in the figure below.
4437
local interatomic distance information with the evaluation of the long-range part
4538
:math:`v_\mathrm{LR}(k)` using grids via a :ref:`mesh_interpolator` and a
4639
:ref:`kspace_filter`.
40+
41+
.. note::
42+
43+
``torch-pme`` uses parameters like smearing :math:`\sigma` and the long-range
44+
resolution :math:`h` to control the long-range part of the potential. Another common
45+
set of parameters are the inverse width of a Gaussian charge cloud :math:`\alpha` and
46+
the Fourier space cutoff :math:`K`. These two definitions are related by
47+
:math:`\sigma=\frac{1}{\sqrt{2}\alpha}` and :math:`h=\frac{2\pi}{K}`.

src/torchpme/tuning/ewald.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,8 +174,9 @@ def err_kspace(
174174
return (
175175
self.prefac**0.5
176176
/ smearing
177-
/ torch.sqrt(torch.pi**2 * self.volume / lr_wavelength)
178-
* torch.exp(-2 * torch.pi**2 * smearing**2 / lr_wavelength**2)
177+
/ torch.pi
178+
/ torch.sqrt(self.volume / lr_wavelength)
179+
* torch.exp(-2 * (torch.pi * smearing / lr_wavelength) ** 2)
179180
)
180181

181182
def err_rspace(self, smearing: torch.Tensor, cutoff: torch.Tensor) -> torch.Tensor:

0 commit comments

Comments
 (0)