Skip to content

v0.1.0

Choose a tag to compare

@pstansfeld pstansfeld released this 18 Oct 13:06
· 20 commits to main since this release

MemPrOD v0.1.0

Runs with current JAX and MemPrO, and is about 10× faster. Install with pip install -U memprod (this also installs MemPrO ≥ 0.2.1).

Fixes

  • Works with JAX 0.7 and later. memprod 0.0.9 imported jax.sharding.PositionalSharding, which JAX has since removed, so it crashed on import with current JAX (including a fresh pip install memprod alongside mempro 0.2.0).
  • PATH_TO_MARTINI is now optional. If it isn't set, MemPrOD uses the Martini 3 force field bundled with MemPrO. -itp still overrides.
  • Requires mempro ≥ 0.2.1, which fixes an intermittent XLA crash MemPrOD could hit on JAX 0.11.
  • No longer depends on the obsolete argparse package from PyPI (it is part of Python).

Faster

4G1U (protein only) on an Apple M4: 185 s with v0.0.9 → 17–19 s.

  • The deformation potential and its gradient are vectorised (identical values to ~1e-15).
  • The optimiser is the same BFGS algorithm as SciPy's (same line search and stopping rules) with an O(n²) inverse-Hessian update instead of SciPy's O(n³) one, which had taken 90% of the minimisation time.
  • Grid setup, post-processing (head-group/tail contacts, charges) and force-field loading are vectorised or cached, with identical outputs.

Behaviour change

Deformations differ from v0.0.9 by about 0.05 Å on average. The potential has small steps, so rounding-level differences in the optimiser change its path slightly; v0.0.9 itself differs by the same amount between JAX versions.

Notes

  • Input must be the protein only: remove MemPrO's dummy membrane (DUM) beads from oriented structures before running MemPrOD.
  • A NVIDIA GPU extra is available: pip install "memprod[gpu]" (Linux, CUDA 12).