PyAutoFEP icon indicating copy to clipboard operation
PyAutoFEP copied to clipboard

[Questions] How to handle `top` with `amber14ff`

Open yanze039 opened this issue 2 years ago • 5 comments

Hi,

I am using PyAutoFEP to calculate the free energy values of 3 pairs. Previously, my other simulations were conducted by amber14ff via gromacs-2022 and I would like to use them here as well. Since amber14ff is not officially supported by gromacs, what I am doing is modeling and parametering the system (protein + ligands) by ambertools and convert the file to Gromacs format via parmed. So what I have is actually the gro file and the top file of these molecules. I don't have the forcefield files. Also, my ligands are already in the good binding pose since I just modified them from the co-crystal. They have very obvious MCS.

When I am using PyAutoFEP, because I already parameteried and solvated my system, I tried to use pre_solvated=True and provide structure and topology to load my prepared system. I also use pose_loader = generic and give poses_input to load prepared ligands.

Because my .top files don't contain any #include lines, I encoundered some trouble when adding ligand to system topology. I fixed it by skipping the searching for #include

But I am fully stuck at the solvation of ligands. I am not very clear the mechanism here. In my case where I don't have the forcefield but have the gro and top, how does it prepare the water model and get the parameters for ligand-water system?

Also, when I am running the code to solvate the ligands, I got a following bug which I have no idea how it comes out:

[ERROR] 
[ERROR] Processing topology
[ERROR] 
[ERROR] 
[ERROR] -------------------------------------------------------
[ERROR] Program:     gmx solvate, version 2022.3-plumed_2.8.1
[ERROR] Source file: src/gromacs/utility/futil.cpp (line 614)
[ERROR] Function:    void gmx_file_rename(const char*, const char*)
[ERROR] 
[ERROR] System I/O error:
[ERROR] Failed to rename temp.topjdVDO6 to
[ERROR] /state/partition1/slurm_tmp/22373106.0.0/tmpuapcmr1i/eif4e_fep/mol_m7G_A-mol_LNA_A/water/build_water_230416_16042023/ligandsolv_step3_230416_16042023.top.
[ERROR] 
[ERROR] For more information and tips for troubleshooting, please check the GROMACS
[ERROR] website at http://www.gromacs.org/Documentation/Errors
[ERROR] -------------------------------------------------------

Thank you!

yanze039 avatar Apr 17 '23 03:04 yanze039

For Question 1, I found that the searching criteria for "#include forcefield.itp" should change.

If no forcefields are included in the top file, we can search for [ defaults ] and add ligand.atp below the [ defaults ], so that all atomtypes can be indentified.

For Question 2, when employing on Cluster like Slurm, PyAutoFEP will use the tmp area to manipulate the files. But somtimes the permission to that path may have problems. I solved this problem by enforcing the cwd of gmx to that tmp, so that there is no move of file from user space to tmp space.

yanze039 avatar Apr 17 '23 19:04 yanze039

Hello @Dead-fisher , I am another user using the same trick as you to use Amber FF. If I understand you properly, you edited the searching for 'include forcefield.itp' to a searching for 'defaults', where you include the atomtype file. Is that it? Thanks for the clarification!

Ferran

Fplanas92 avatar Apr 24 '23 06:04 Fplanas92

Hi @Fplanas92 , Yeah, that’s my solution to it.

yanze039 avatar Apr 24 '23 12:04 yanze039

Thank you for your comments and sorry it took me a while to reply. I started a position in industry and my time has been quite limited these last weeks.

  1. Would you mind sharing a example topology so I can test a code for falling back to match [ defaults ]?
  2. Alternatively, you can set output_hidden_temp_dir=False to avoid using tmpfs.

luancarvalhomartins avatar Apr 25 '23 02:04 luancarvalhomartins

Hi @luancarvalhomartins,

Cheers on your new positions.

My .top files are generated by ambertools and converted by Parmed. So it doesn't have #include. Instead, it contains all of the necessary ff params in itself.

I prepared a minimal example at my repo for you https://github.com/Dead-fisher/FEP_files from where you probably are able to reproduce all my problems around these issues.

Thanks for your contribution anyway!

yanze039 avatar Apr 25 '23 02:04 yanze039