-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
An initial version of refurnished documentation
- Loading branch information
1 parent
ee3cc7d
commit 250d8c6
Showing
16 changed files
with
313 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,5 @@ refer to the :ref:`userdoc-how-to` section. | |
metatensor | ||
lib/index | ||
utils/index | ||
tuning/index | ||
changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
Base Classes | ||
############ | ||
|
||
.. autoclass:: torchpme.tuning.tuner.TunerBase | ||
:members: | ||
|
||
.. autoclass:: torchpme.tuning.tuner.GridSearchTuner | ||
:members: | ||
|
||
.. autoclass:: torchpme.tuning.tuner.TuningTimings | ||
:members: | ||
|
||
.. autoclass:: torchpme.tuning.error_bounds.TuningErrorBounds | ||
:members: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Tuning | ||
###### | ||
|
||
The choice of parameters like the neighborlist ``cutoff``, the ``smearing`` or the | ||
``lr_wavelength``/``mesh_spacing`` has a large influence one the accuracy of the | ||
calculation. To help find the parameters that meet the accuracy requirements, this | ||
module offers tuning methods for the calculators. | ||
|
||
The scheme behind all tuning functions is grid-searching based, focusing on the Fourier | ||
space parameters like ``lr_wavelength``, ``mesh_spacing`` and ``interpolation_nodes``. | ||
For real space parameter ``cutoff``, it is treated as a hyperparameter here, which | ||
should be manually specified by the user. The parameter ``smearing`` is determined by | ||
the real space error formula and is set to achieve a real space error of | ||
``desired_accuracy / 4``. | ||
|
||
The Fourier space parameters are all discrete, so it's convenient to do the grid-search. | ||
Default searching-ranges are provided for those parameters. For ``lr_wavelength``, the | ||
values are chosen to be with a minimum of 1 and a maximum of 13 mesh points in each | ||
spatial direction ``(x, y, z)``. For ``mesh_spacing``, the values are set to have | ||
minimally 2 and maximally 7 mesh points in each spatial direction, for both the P3M and | ||
PME method. The values of ``interpolation_nodes`` are the same as those supported in | ||
:class:`torchpme.lib.MeshInterpolator`. | ||
|
||
In the grid-searching, all possible parameter combinations are evaluated. The error | ||
associated with the parameter is estimated by the error formulas implemented in the | ||
subclasses of :class:`torchpme.tuning.error_bounds.TuningErrorBounds`. Parameter with | ||
the error within the desired accuracy are benchmarked for computational time by | ||
:class:`torchpme.tuning.tuner.TuningTimings` The timing of the other parameters are | ||
not tested and set to infinity. | ||
|
||
The return of these tuning functions contains the ``smearing`` and a dictionary, in | ||
which there is parameter for the Fourier space. The parameter is that of the desired | ||
accuracy and the shortest timing. The parameter of the smallest error will be returned | ||
in the case that no parameter can fulfill the accuracy requirement. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:glob: | ||
|
||
./* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Tune Ewald | ||
########## | ||
|
||
.. autofunction:: torchpme.tuning.ewald.tune_ewald | ||
|
||
.. autoclass:: torchpme.tuning.error_bounds.EwaldErrorBounds | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Tune P3M | ||
######### | ||
|
||
.. autofunction:: torchpme.tuning.p3m.tune_p3m | ||
|
||
.. autoclass:: torchpme.tuning.error_bounds.P3MErrorBounds | ||
:members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Tune PME | ||
######### | ||
|
||
.. autofunction:: torchpme.tuning.pme.tune_pme | ||
|
||
.. autoclass:: torchpme.tuning.error_bounds.PMEErrorBounds | ||
:members: |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.