Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend leap_gen_top to parameterize cofactors from database #10

Open
PabloNA97 opened this issue Oct 21, 2024 · 1 comment
Open

Extend leap_gen_top to parameterize cofactors from database #10

PabloNA97 opened this issue Oct 21, 2024 · 1 comment

Comments

@PabloNA97
Copy link

PabloNA97 commented Oct 21, 2024

Hi! It's me again :)

To simulate cofactors one can use the manchester university database of parameter modifications. For example to simulate PDB 2FDV, one can extract the heteroatom pdb entries and use tleap -f leap.in with the following leap.in:

# Load protein ff
source leaprc.protein.ff14SB

# Load cofactor parameters
loadamberparams HEM.frcmod
loadamberprep HEM.prep

# Load PDB coordinates
mol = loadpdb HEM.pdb 

savepdb mol HEM_parameterized.pdb 

saveamberparm mol HEM.prmtop HEM.inpcrd
quit 

The file HEM.prep is used to understand the new residue (HEM) and atom types. See File formats. Unfortunately, this cannot be done from biobb_amber.leap.leap_gen_top. The only thing missing is to include "input_prep_path" as an input file completely analogous to "input_frcmod_path" but paired to the "loadamberprep" directive in leap.in instead of the "loadamberparams" one. See below:

In file biobb_amber/leap/leap_gen_top.py, after including the corresponding input file, line 159:

       ligands_prep_list = []
       if self.io_dict['in']['input_prep_path'] is not None:
           if self.io_dict['in']['input_prep_path'].endswith('.zip'):
               ligands_prep_list = fu.unzip_list(self.stage_io_dict['in']['input_prep_path'], dest_dir=self.tmp_folder, out_log=self.out_log)
           else:
               ligands_prep_list.append(self.stage_io_dict['in']['input_prep_path'])

Then in line 203:

           for amber_prep in ligands_prep_list:
               leapin.write("loadamberprep " + amber_prep + "\n")

Version:

biobb_amber 4.2.0 (I believe this is not available in 5.0.0 either)

@PabloNA97
Copy link
Author

PabloNA97 commented Oct 21, 2024

Additionally, the new format and input file has to be added to biobb_amber/leap/common.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant