2. Installation

2.1 Install Dependencies

  • Create conda environment:
conda create -n dmff python=3.9 --yes
  • Install jax (select the correct cuda version, see more details in the Jax installation guide):
pip install "jaxlib[cuda11_cudnn805]==0.3.15" -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
pip install jax==0.3.17
pip install jax-md==0.2.0
conda install -c conda-forge openmm==7.7.0
  • Install RDKit (required for SMIRKS-based parametrization):
conda install -c conda-forge rdkit

2.2 Install DMFF from Source Code

One can download the DMFF source code from github:

git clone https://github.com/deepmodeling/DMFF.git

Then you may install DMFF using pip:

cd DMFF
pip install . --user

2.3 Test Installation

To test if DMFF is correctly installed, you can run the following commands in an interactive python session:

>>> import dmff
>>> import dmff.admp

You can also run the example scripts to test whether DMFF is installed correctly.

cd ./examples/water_fullpol
python ./run.py

Note that the scripts will run slower than expect if DO_JIT = True in dmff/settings.py. This is because the programm will do the jit compilation when a function is invoked in the first time.