01 · Quick start: run, inspect, reproduce¶
For: anyone new to nanopnp; the collaborating computational scientist (P2) who runs case files from the command line. Runtime: well under a minute. Needs: nanopnp installed (the getting-started page of the documentation). Exercises: IF-02, IF-06, FR-23, FR-25, QR-08.
An uncharged cylindrical pore through a membrane, in 0.1 M NaCl at +50 mV, solved with the validated ePNP-NS model: every correction of the model on, at its published parameters. You run the case, read the run back and check that it reproduces. The case declares the pore itself, and stage 6 meshes it.
Run every command from this directory. In a development checkout, put uv run in front of each
command.
The commands¶
$ nanopnp run quickstart.case.yaml --store store --run-dir run
$ nanopnp inspect run
$ nanopnp reproduce run
nanopnp runwalks the pipeline: case, region, mesh, materials, solve, quantities, report. The case'sgeometry.poreis a cylinder, its size fromgeometry.membraneandgeometry.reservoir, andnumerics.meshsets the element sizes: the smallest mesh the solver's wall-distance gate accepts with the wall corrections on, so the run is quick. It is not converged.nanopnp geometry cylinderwrites the same pore as a file thatnanopnp plotdraws andnanopnp meshmeshes. The run prints one line per stage with its artefact hash, then the quantities of interest. Every artefact goes intostore/, keyed by its content hash, and the run directoryrun/gets three files:manifest.json, the provenance record;case.yaml, the case verbatim; andrun.json, the run record.nanopnp inspect runreads the run back: its model and stabilisation mode, each stage, each continuation rung with its Newton iterations and seconds, the quantities, and the deviations from the validated model. This case has none.--sectionprints one group of the manifest in full (inputsfor the input hashes,environmentfor the library versions,geometry_and_meshfor the mesh and its quality,solverfor its settings);--jsonprints the whole manifest.nanopnp reproduce runsolves the archived case again, in a throwaway store so nothing is served from cache, and compares every recorded scalar. It exits0only if all of them agree to the tolerance. Differences in library, interpreter or platform are reported, not failed, unless you pass--strict-environment.
What the test asserts¶
tests/tier2/test_examples_01_quickstart.py runs the three commands above, verbatim, from a copy
of this directory. It checks properties of the model rather than transcribed numbers
(SPECIFICATION.md VER-46):
- every command exits
0, so the reproduction agreed; - the two current-extraction routes of FR-23 agree to the tolerance the solver itself gates on;
- the manifest records no deviation from the validated model.
Next¶
- 02 adds a fixed charge and compares against classical PNP-NS.
- The case file is documented field by field in the case-file reference of the documentation.