Automatic Generation of APBS Input Files

The APBS input can be generated automatically with MDAnalysis.Universe object, which should contain the attribute positions, charges, radii and dimensions. Within the MDAnalysis.Universe, different molecules should be able to be accessed through the residues attribute.

Tips for Universe generation

One way of generating such a universe via Gromacs is to obtain charges from the tpr file, the positions from gro file and radii from pqr files.

The pqr files could be generated using editconf functionality.

gmx editconf -f topol.tpr -mead topol.pqr

The MDAnalysis.Universe could then be assembled:

import MDAnalysis as mda
u = mda.Universe('topol.tpr', 'topol.gro')
pqr = mda.Universe('topol.pqr')
u.add_TopologyAttr('radii')
u.atoms.radii = pqr.atoms.radii

Note

Only the pqr files generated with certain versions of Gromacs could be loaded by MDAnalysis and Gromacs 5.1.5 is one of them.

APBS Input Generation

The APBS input could then be generated with rocklinc.RocklinCorrection.make_APBS_input().

import rocklinc
rc = rocklinc.RocklinCorrection(box, lig_netq, protein_netq, temp,
                                rocklinc.waters.TIP3P)
rc.make_APBS_input(u, 'resname LIG',)

The rocklinc.RocklinCorrection.make_APBS_input() also sets the variable rocklinc.RocklinCorrection.NS, which is the number of solvent molecules. If there isn’t any none solvent and ligand molecule, the integrated potential of the protein rocklinc.RocklinCorrection.IP will be set to 0 as well.

rocklinc.RocklinCorrection.make_APBS_input(self, universe, ligand_selection, solvent_selection='resname SOL', in_prot_only='prot_only.pqr', in_lig_in_prot='lig_in_prot.pqr', in_lig_only='lig_only.pqr', apbs_in='apbs.in')

Automatically setup the input file for the APBS calculations.

Parameters
  • universe (MDAnalysis.Universe) – The Universe object of the system, where the coordinate, partial charge, radii and system dimension will be obtained.

  • ligand_selection (str) – The selection string for the ligand.

  • solvent_selection (str, optional) – The selection string for the solvent. (resname SOL)

  • in_prot_only (str, optional) – The name of the pqr file where the ligand has no partial charge. (prot_only.pqr)

  • in_lig_in_prot (str, optional) – The name of the pqr file where the protein has no partial charge. (lig_in_prot.pqr)

  • in_lig_only (str, optional) – The name of the pqr file of the ligand. (lig_only.pqr)

  • apbs_in (str, optional) – The input file to the APBS program. (apbs.in)

Variables
  • IP (float) – The integrated potential of protein will be set to 0, if no protein is found.

  • NS (int) – The number of solvent molecules in the system.

The next step is to run the APBS calculations.