ForceBalance is an automatic force field parametrization tool developed by Lee-Ping Wang et al. It allows one to use both quantum chemical data and experimental observables of the liquid phase. It has been applied to parameterize a bunch of water models and organic molecules. The following examples are some of them.
J. Phys. Chem. Lett., 2014, 5 (11), pp 1885–1891 (ForceBalance paper, TIP3P and TIP4P water as examples)
J. Phys. Chem. B, 2013, 117 (34), pp 9956–9972 (iAMOEBA paper)
J. Phys. Chem. B, 2015, 119 (29), pp 9423–9437 (AMOEBA14 paper)
Here, a brief tutorial on how to install, set up, parallelize and run FB is provided below.
ForceBalance can be installed in different ways. Here I recommend installing FB through conda software manager (either Anaconda or Miniconda). For how to install conda, please go to the anaconda download page (https://www.anaconda.com/products/individual).
After you have conda installed, FB can be easily installed through the following commands:
conda create --name FB17 python=3.7 conda activate FB17 conda install --strict-channel-priority -c conda-forge forcebalance
Now ForceBalance is installed. You should be able to run (but not efficiently) FB jobs with the following settings.
Alternatively, for GPU tinker modifications and cluster submission. Please read https://github.com/bdw2292/Ren-Lab-Daemon/blob/main/README_HELP.MD , the section titled Creating workers for ForceBalance cluster submission
ForceBalance input files
In the following I will use amoeba water as an example. All the files are located in Renlab cluster at
A typical job of ForceBalance folder looks like:
where example.in has the settings read by ForceBalance, forcefield directory contains the tinker parameter file, and targets folder contains lots of targets (both QM and Liquid).
Inside the QM target is the tinker xyz and interactions.txt, interactions.key files Inside the Liquid target are the input files for Tinker (key and xyz) and experimental data (data.csv).
A cluster folder typically contains the XYZ files, interactions.key, and interactions.txt, which defines the QM reference and how you calculate the interaction energy for AMOEBA.
A QM target folder (showing below) typically contains xyz files, interactions.key and interactions.txt, which defines the QM reference and how you calculate the interaction energy for AMOEBA.
After setting up the above files, you should be able to run ForceBalance using the simple command:
If ForceBalance jobs crash, check the error message and modify your setting. More information about settings in the example.in, please refer to ForceBalance manual file
Customization and parallelization for AMOEBA(+)
1. Backup original FB source files
export condaHOME = /home/liuchw/anaconda3/envs/FB17/lib/python3.7/site-packages/forcebalance cp $condaHOME/binding.py $condaHOME/binding.py_back cp $condaHOME/liquid.py $condaHOME/liquid.py_back cp $condaHOME/tinkerio.py $condaHOME/tinkerio.py_back cp $condaHOME/parser.py $condaHOME/parser.py_back cp $condaHOME/data/npt.py $condaHOME/data/npt.py_back
2. Download modified files and copy them to the anaconda lib directory
git clone firstname.lastname@example.org:leucinw/Software-mod.git modcode export modfileHOME=/home/liuchw/modcode/forcebalance-1.7.5 cp $modfileHOME/binding.py $condaHOME/binding.py cp $modfileHOME/liquid.py $condaHOME/liquid.py cp $modfileHOME/tinkerio.py $condaHOME/tinkerio.py cp $modfileHOME/parser.py $condaHOME/parser.py cp $modfileHOME/data/npt.py $condaHOME/data/npt.py
The above customization mostly involves supports for AMOEBA+ keywords and parallelization of the serial jobs in:
- Tinker binding energy calculations (
- Tinker post-MD
3. An extra file besides the .in is needed in order to distribute the dynamic/dynamic_omm jobs on to different Renlab cluster nodes. Specify the node filename in the .in file as
where the yourfilename.node should look like: