Examples

Welcome to the PyRETIS examples library. The source distribution keeps user-facing material under examples/tutorials/ and consistency checks under examples/tests/.

The pages are grouped by topic, with a short note on what each tutorial covers so you can pick the one that matches the question you have. If you are new to PyRETIS, we recommend the “Getting started” tutorials first. If you are adapting the examples with help from an LLM, start with PyRETIS quick guide for users and LLMs so the assistant follows the same folder, command, and verification conventions as the website. The runnable checks behind these tutorials are tracked in Example test status.

Potentials

These examples are a good place to start when the main question is which model system to use. They run with the internal PyRETIS engine unless noted otherwise, and each entry links to the matching tutorial source folder in the repository.

Sampling methods

These examples focus on the sampling algorithm or the way initial paths are generated.

External engines

These tutorials replace the internal Langevin engine with one of the standard MD codes, or with compiled extension modules. They require the corresponding engine or compiler to be installed and reachable on your PATH.

Analysis

These examples show how to start, seed, analyse and visualise runs with pyretis run, pyretis analyse and PyVisA.

How the examples are organised

The pages below describe the contract between tutorial pages and heavy checks, the rules for adding new examples, the current verification status, and the LLM-oriented quick reference.

  • PyRETIS quick guide for users and LLMs – compact rules for choosing examples, running commands, and avoiding common setup mistakes.

  • Migration guide – moving a project off the deprecated pyretisrun/pyretisanalyse commands, the .rst input format, and the infretis-flavour TOML dialect onto the unified pyretis CLI (all removed in PyRETIS 5).

  • Example organization – folder contract, tutorial authoring rules, and how tutorials link to the heavy suite.

  • Using heavy checks as tutorials – one-shot table of which test fixture to copy when starting a new setup.

  • Example test status – the current verification matrix and per-suite refresh dates.

  • Interactive examples – planned notebook front ends for the lightweight tutorials.

The examples/ folder has two subfolders:

  • examples/tutorials/ for user-facing setup guides;

  • examples/tests/ for heavy consistency checks.

To run all heavy example checks from the repository root:

./test-heavy.sh

To run a single check, cd into its directory and execute its run.sh:

cd examples/tests/test-internal/retis
./run.sh

run.sh cleans the directory, calls pyretis run and pyretis analyse, then runs compare.py to validate the output against the reference data in results/.