Automatic Differentiable Multipolar Polarizable (ADMP) force field calculator.
This module provides an auto-differentiable implementation of multipolar polarizable force fields, that resembles the behavior of MPID plugin of OpenMM. Supposedly, this module is developed for the following purposes:
- Achieving an easy calculation of force and virial of the multipolar polarizable forcefield.
- Allowing fluctuating (geometric-dependent) multipoles/polarizabilities in multipolar polarizable potentials.
- Allowing the calculation of derivatives of various force field parameters, thus achieving a more systematic and automatic parameter optimization scheme.
The module is based on JAX and JAX-MD projects.
ADMP module depends on the following packages, install them before using ADMP:
-
Install jax (pick the correct cuda version, see more details on their installation guide):
pip install jax[cuda11_cudnn82] -f https://storage.googleapis.com/jax-releases/jax_releases.html
-
Install jax-md :
pip install jax-md --upgrade
ADMP currently relies on the space and partition modules to provide neighbor list
-
Install ADMP:
ADMP is a pure python module, just simply put it in your $PYTHONPATH.
export PYTHONPATH=$PYTHONPATH:/path/to/admp
In admp/settings.py
, you can modify some global settings, including:
PRECISION: single or double precision
DO_JIT: whether do jit or not.
We provide a MPID 1024 water box example. In water_1024 and water_pol_1024, we show both the nonpolarizable and the polarizable cases.
cd ./examples/water_1024
./run_admp.py
cd ./examples/water_pol_1024
./run_admp.py
if DO_JIT = True
, then the first run would be a bit slow, since it tries to do the jit compilation. Further executions of get_forces
or get_energy
should be much faster.