GHeinzelmann / BAT.py

The Binding Affinity Tool (BAT.py) is a fully automated tool for absolute binding free energy (ABFE) and relative binding free energy (RBFE) calculations on protein-ligand systems, compatible with the AMBER and OpenMM simulation packages.
MIT License
174 stars 45 forks source link

Free energy calculation file not found. #25

Closed ParkvilleData closed 2 years ago

ParkvilleData commented 2 years ago

Hi,

I am working through the example you give. I have set up the environment with all the required dependencies and have been able to successfully run the first command i.e. python3 BAT.py -i input-dd.in -s equil

However, when running the second command, python3 BAT.py -i input-dd.in -s fe I get the following error.

python3 BAT.py -i input-dd.in -s fe
Setting up pose0
window: c00 weight: 0.0
Traceback (most recent call last):
  File "BAT.py", line 501, in <module>
    anch = build.build_rest(hmr, mol, pose, comp, win, ntpr, ntwr, ntwe, ntwx, cut, gamma_ln, barostat, receptor_ff, ligand_ff, dt, fwin, l1_x, l1_y, l1_z, l1_range, min_adis, max_adis, sdr_dist, ion_def)
  File "/data/gpfs/projects/punim1165/bobbie/bat/BAT/lib/build.py", line 517, in build_rest
    shutil.copy('../../build_files/%s.pdb' %mol.lower(), './')
  File "/home/bobbieshaban/.conda/envs/bat/lib/python3.8/shutil.py", line 418, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/home/bobbieshaban/.conda/envs/bat/lib/python3.8/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: '../../build_files/lig.pdb'

Can I please get some guidance on what I am doing wrong? It seems to have problems finding the ligand pdb file, but I am running it the same directory as the previous command. Thank you!

GHeinzelmann commented 2 years ago

Solved by email

spadavec commented 2 years ago

Just wanted to ping this, as I'm seeing a similar error.

GHeinzelmann commented 2 years ago

Hi, I have been running the program to test the OpenMM version and everything looks OK. A few questions:

Have all the equilibration simulations finished when you ran the fe step?

Do you have Ambertools in your path in order to run cpptraj and other programs?

spadavec commented 2 years ago

Hi, sorry for slow response--

I was able to run the equil step for just one of the poses (for testing purposes). Then when I tried to run the fe step, it threw the above error. There is a /fe folder with a pose0 folder within it (containing the build_files and rest folders). Its not clear to me if youre supposed to be able to run the bash scripts from within the run_files dir, or if the root folder BAT.py file is supposed to ID itself?

GHeinzelmann commented 2 years ago

Hi. After the equilibrium step, and before running the fe step, you should run the equilibration simulations using the run-local.bash or the PBS script inside the equil/pose0 folder, and do the same for other poses.

It was not clear to me if you did that part, so just making sure.

spadavec commented 2 years ago

Hi @GHeinzelmann--Yes, I've run the equilibration simulations--this was my process:

1) run python BAT.py -i input-dd-openmm.in -s equil 2) Within equil/pose0/ run ./local-equil.bash 3) When those are done, go back to BAT directory and try to run BAT.py -i input-dd-openmm.in -s fe

Note, for step 3, I edited BAT.py so that poses_def only equaled [pose0]

Is this correct series?

GHeinzelmann commented 2 years ago

OK, from what I see, inside the brackets there should only be the number “0” instead of “pose0”.

If that doesn’t work, can we discuss by email? Then you can perhaps send me your files for me to check. My email is listed in the main page.

Thanks!