Skip to content

Interface for element embracing-based high dimensional neural network potentials and OpenMM

License

Notifications You must be signed in to change notification settings

Quantum-for-Life/EEForce

Repository files navigation

EEForce

Interface for element embracing-based high dimensional neural network potentials and OpenMM.

Requirements

Most requirements can be easily installed with conda (see all-environment.yaml). The remaining requirements not available on conda are:

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.

Installation

conda env create -f all-environment.yaml
conda activate EEForce
<install SymmetryFunctions>
<install lMLP>
pip install .

Tests

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

Using the OpenMM-TorchForce Object

See ee_force/tests/run_md.py for an example of an ML/MM MD.

About

Interface for element embracing-based high dimensional neural network potentials and OpenMM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •