Skip to content

Commit

Permalink
Couple of documentation fixes and improvmenents
Browse files Browse the repository at this point in the history
* Use torch-pme logo as default thumbnail in example gallery
* Fix typo in atomistic example
* Fix thumbnail for atomistic example
* Fix wrong timestep in atomsitic example plot
  • Loading branch information
PicoCentauri committed Jan 22, 2025
1 parent 86bd6b3 commit 5486d00
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions docs/generate_examples/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
sphinx_gallery_conf = {
"backreferences_dir": "backreferences",
"copyfile_regex": r".*\.(xyz)",
"default_thumb_file": os.path.join(ROOT, "docs/src/logo/torch-pme-512.png"),
"doc_module": ("torchpme",),
"examples_dirs": ["../../examples"],
"filename_pattern": ".*",
Expand Down
6 changes: 2 additions & 4 deletions examples/9-atomistic-model.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

# %%

# sphinx_gallery_thumbnail_number = 2

from typing import Dict, List, Optional # noqa

# tools to run the simulation and visualization
Expand Down Expand Up @@ -158,7 +156,7 @@ def __init__(self, calculator: torchpme.metatensor.Calculator, cutoff: float):

self.calculator = calculator

# We use as half neighborlist and allow to have pairs farther than cutoff
# We use a half neighborlist and allow to have pairs farther than cutoff
# (`strict=False`) since this is not problematic for PME and may speed up the
# computation of the neigbors.
self.nl = NeighborListOptions(cutoff=cutoff, full_list=False, strict=False)
Expand Down Expand Up @@ -413,7 +411,7 @@ def forward(

fig, ax = plt.subplots(3, figsize=(8, 5), sharex=True)

time = 0.5 * np.arange(n_steps)
time = 2.0 * np.arange(n_steps)

ax[0].plot(time, potential_energy, label="potential energy")
ax[0].plot(time, kinetic_energy, label="kinetic energy")
Expand Down

0 comments on commit 5486d00

Please sign in to comment.