Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
fjclark committed Jun 7, 2024
1 parent c2dc534 commit cc27b8b
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,67 @@
[![CI](https://github.com/michellab/Automated-ABFE-Paper/actions/workflows/ci.yaml/badge.svg)](https://github.com/michellab/Automated-ABFE-Paper/actions/workflows/ci.yaml)

Inputs and code to reproduce the results and analysis from "Automated Adaptive Absolute Binding Free Energy Calculations"

```
├── analysis
│   ├── adaptive
│   ├── cyclod
│   ├── lambda_window_spacing
│   └── non_adaptive
└── simulations
├── cyclod
├── initial_systems
├── scripts
└── shared_config_files
```

## To Rerun Simulations

It is recommended that you run the following in a TMUX session, or using `nohup` for the a3fe script, to ensure that the calculations are not interrupted.

- Ensure that you have SLURM, mamba, and GROMACS installed and that that `gmx` is in your path
- Clone this repository, install a3fe, and activate the environment
```bash
git clone https://github.com/michellab/Automated-ABFE-Paper.git
cd Automated-ABFE-Paper
make env
mamba activate a3fe_reproduce
```
- Modify `run_somd.sh` to match your slurm configuration, e.g.
```bash
vim simulations/shared_config_files/run_somd.sh
```
- Change into the desired directory. For example, to run `T4L`:
```bash
cd simulations/initial_systems/t4l
```
- Run the desired ABFE script. For example, to run the non-adaptively for 0.2 ns per window, run:
```bash
python ../../scripts/run_non_adaptive_200ps.py
```

If you want to repeat the adaptive runs and obtain similar simulation times to those shown in the paper, you need to determine the SOMD simulation speed for the MIF bound complex on your GPUs (this is taken as the reference). This can be done by running a short non-adaptive run (as described above). Once this is complete, you can determine the cost by starting an ipython session in the directory you have run in and running:
```python
import a3fe as a3
calc = a3.Calculation()
cost = calc.tot_gpu_time/calc.tot_time
print(cost) # In hr/ns
```
You should then modify the `run_adaptive.py` script to match this cost (specifically the `reference_sim_cost` argument to `get_optimal_lam_vals`).

## To Reproduce Analysis

The `analysis` directory contains the code and inputs required to perform analyses not already performed by `a3fe` by default (when `calc.analyse()` or `calc.analyse_convergence()` is run). Each sub-directory contains two notebooks - "analysis" notebooks use the pre-provided data in the `final_analysis` directories to generate the figures from the paper. These can be run without changes. The "preprocessing" notebooks show examples of the computationally-intensive analyses run on the simulation outputs (not included due to size) to generate the data which which is used in the "analysis" notebooks. These will not work without changes - they are intended to be adapted to run on outputs generated by the user.

To rerun the "analysis" notebooks and regenerate the plots:

- Ensure that you have mamba installed
- Clone this repository, install a3fe, and run all of the notebooks
```bash
git clone https://github.com/michellab/Automated-ABFE-Paper.git
cd Automated-ABFE-Paper
make env
make analysis
```

Alternatively, you can acitvate the environment (`mamba activate a3fe_reproduce`) and run the notebooks cell-by-cell. The notebooks can be cleaned and the figures removed with `make clean`.

0 comments on commit cc27b8b

Please sign in to comment.