Interface for element embracing-based high dimensional neural network potentials and OpenMM.
Most requirements can be easily installed with conda (see all-environment.yaml). The remaining requirements
not available on conda are:
- Torch bindings for SymmetryFunctions (https://github.com/Quantum-for-Life/SymmetryFunctions).
- lMLP (https://github.com/Quantum-for-Life/pipeline/packages).
Make sure that lMLP and SymmetryFunctions uses the Torch version installed with conda. To ensure that this is the case, install SymmetryFunctions with the conda environment enabled.
conda env create -f all-environment.yaml
conda activate EEForce
<install SymmetryFunctions>
<install lMLP>
pip install .
Download and extract the example MLPs and adjust the paths to these files:
export lmlp_name=small_qm_region
curl https://sid.erda.dk/share_redirect/kP7PWXatuX/machine_learning_potentials/EEforce_unit_tests/${lmlp_name}.tar.gz > ${lmlp_name}.tar.gz
tar -xvf ${lmlp_name}.tar.gz
export mlp_path=`pwd`/${lmlp_name}
sed -i "s#<LMLP-Settings-File>#${mlp_path}#" ee_force/tests/test_*.py
sed -i "s#<LMLP-Settings-File>#${mlp_path}#" ee_force/tests/run_md*.py
export lmlp_name=large_qm_region
curl https://sid.erda.dk/share_redirect/kP7PWXatuX/machine_learning_potentials/EEforce_unit_tests/${lmlp_name}.tar.gz > ${lmlp_name}.tar.gz
tar -xvf ${lmlp_name}.tar.gz
export mlp_path=`pwd`/${lmlp_name}
sed -i "s#<LMLP-Settings-File-2>#${mlp_path}#" ee_force/tests/test_*.py
sed -i "s#<LMLP-Settings-File-2>#${mlp_path}#" ee_force/tests/run_md*.py
Then, adjust the variable sym_fun_torch_path in the same file to point to the directory containing libSymFuncTorch.so.
For instance, run the following code:
export site_package_path=`python -c 'import torch; print(torch.__path__[0].replace("torch", ""))'`
sed -i "s#<Sym-Func-Torch-Path>#${site_package_path}#" ee_force/tests/test_*.py
sed -i "s#<Sym-Func-Torch-Path>#${site_package_path}#" ee_force/tests/run_md*.py
Run the unit tests with
python -m pytest ee_force/tests/test_*.py
You can also run the example MD simulations in `ee_force/tests:
python run_md.py
See ee_force/tests/run_md.py for an example of an ML/MM MD.