How Should Pressure and Cell Degrees of Freedom Be Coupled?

Note: This is an early draft page for the executable kUPS MD tutorial series. It is intentionally hidden from site navigation while the simulations, notebooks, figures, and review artifacts mature. This post extends the thermostat discussion to pressure and cell degrees of freedom, using a controlled scalar model before the final argon/kUPS NPT diagnostic is added. Corrections and replication issues should be tracked in sungsoo-ahn/kups-md-tutorials.

Introduction

Pressure control is not the same kind of operation as setting a scalar temperature. In small molecular simulations, instantaneous pressure fluctuates strongly, volume fluctuations encode compressibility, and the barostat time constant changes how quickly the cell explores those fluctuations.

For ML researchers, the practical question is not whether one pressure number looks close to a target. It is whether the volume distribution has the right scale, whether pressure fluctuations are interpreted statistically, and whether the cell-coupling dynamics distort the observables that will be measured later.

This draft demonstrates the executable slice of the fifth tutorial with a controlled scalar-volume model. The model is not the final production NPT workflow; it is a microscope for fluctuation targets and barostat memory.

What Should Fluctuate?

The current diagnostic fixes a target pressure, volume, compressibility, and temperature, then changes only the scalar barostat relaxation time:

Choice Full value Why it matters
target pressure 1.0 pressure mean for the controlled model
equilibrium volume 1000 reference cell size
compressibility 0.01 sets volume fluctuation scale
temperature 1.0 dimensionless (kT)
relaxation times 0.5, 2.0, 8.0 fast, moderate, and slow cell memory
samples 2500 per run enough for compact fluctuation checks

In the NPT ensemble, volume variance is proportional to compressibility. A barostat that suppresses this variance is not merely “more stable”; it may be sampling the wrong ensemble.

What Should The Diagnostic Show?

The full run checks two fluctuation targets: volume variance and pressure variance. It also reports the integrated autocorrelation time of the scalar volume process. The slow barostat has the same target distribution but much longer memory, which means fewer effective samples for the same wall-clock trajectory length.

Pressure and scalar-cell diagnostics for the committed full profile. The controlled NPT-like model recovers volume and pressure fluctuation scales while showing that slower barostat coupling increases cell memory.

Reproduction

The current executable path is:

git clone https://github.com/sungsoo-ahn/kups-md-tutorials
cd kups-md-tutorials
uv sync
uv run kups-tutorial run 05 --profile smoke
uv run kups-tutorial verify 05 --profile smoke
uv run kups-tutorial run 05 --profile full
uv run kups-tutorial verify 05 --profile full
uv run jupyter execute notebooks/post-05-barostats.ipynb --inplace

The notebook is deliberately not the implementation source. It imports the configuration loader, scalar barostat diagnostics, and figure generator from src/kups_md_tutorials/.

Current Status

This page is not the final article. The implemented pieces are:

  • smoke and full controlled scalar barostat workflows
  • committed compact summaries and downsampled samples
  • executable notebook
  • generated SVG/PNG figure and snapshot review
  • self-review note covering code, science, notebook, and figure feedback

The missing pieces are:

  • final article prose
  • citations for NPT ensemble fluctuations, compressibility, barostat coupling, and finite-size pressure fluctuations
  • rendered desktop and mobile page snapshots
  • argon/kUPS NPT diagnostics with actual cell degrees of freedom

The rule for this series is simple: a result is not ready because the code ran. It is ready only after the code, data, figure, prose, and rendered page have all been reviewed against the same reproducibility contract.

References

  • Tuckerman, M. E. (2010). Statistical Mechanics: Theory and Molecular Simulation. Oxford University Press.
  • Martyna, G. J., Tobias, D. J. & Klein, M. L. (1994). Constant pressure molecular dynamics algorithms. Journal of Chemical Physics, 101, 4177-4189.
  • Frenkel, D. & Smit, B. (2001). Understanding Molecular Simulation: From Algorithms to Applications. Academic Press.