A light-weighted automation tool for alchemical free energy simulations with the Bennett Acceptance Ratio (BAR) method using the polarizable AMOEBA and AMOEBA+ force fields.
- python modules:
ruamel.yaml
andnumpy
. (Hint: one can usepip
orconda
to install easily) - compiled software:
Tinker
andTinker9
. (Note: Nothing need to do for Ren lab members).
Prepare the following 4 files:
gas_xyz
: ligand tinker xyz filebox_xyz
: ligand or ligand-protein in water, with box info. in the second lineparameters
: Tinker parameter file (see Notes for one-step perturbation function)settings.yaml
: settings read by autoBAR.py program. Please refer to the example file here.
Note: User customized tinker key files are supported (see here)
To make it flexible to use, this program was designed to be run in either interactive or automated mode. In the interactive mode, an individual step can be run depending on the requirement. In the automated mode, this program will automatically go through all steps until it exits.
- Interactive mode
# Run `setup`: generate the necessary input files for Tinker python autoBAR.py setup # Run `dynamic`: do molecular dynamics simulations at a series of lambda using Tinker/Tinker9 python autoBAR.py dynamic # Run `bar`: do bar analysis using Tinker/Tinker9 after the above MD jobs finish python autoBAR.py bar # Run `result`: summarize and printout the bar analysis result python autoBAR.py result
- Automated mode
# Run `auto`: automatically run all the above commands python autoBAR.py auto
- Advanced feature
# Run `opt`: use one-step BAR to get numerical gradient of the FE w.r.t. tuning parameters, and optimize the FF parameters. The settings.yaml needs to be setup carefully! python autoBAR.py opt
Two example systems are located in examples
folder. They should be easy to read and understand.
-
For the Ion-HFE system, only the
liquid
phase is necessary├── liquid ├── Na-water.xyz ├── Na.xyz ├── result.txt ├── settings.yaml └── water03.prm
-
For the Phenol-HFE system, both the
liquid
andgas
phases are needed├── amoeba09.prm ├── gas ├── liquid ├── phenol_solv.xyz ├── phenol.xyz ├── result.txt └── settings.yaml
-
Minimal settings for HFE simulations
lambda_window
: courser # This reduces the number of windows without losing much accuracyliquid_md_total_time
: 1.25 ns # The last 4/5 of trajectories (1 ns) is used in BARliquid_md_time_step
: 2.0 fs # Good with RESPA integratorgas_md_total_time
: 1.25 ns # The last 4/5 of trajectories (1 ns) is used in BARgas_md_time_step
: 0.1 fs # Gas phase stochastic dynamics
-
One-step perturbation is supported
- An
{fname}.prm_
file with small parameter perturbation need to be in the working directory - No need modify the
settings.yaml
file - This will be treated as the end state (two end states if involving two legs)
- An