APBS calculations: Membrane simulations — bornprofiler.electrostatics

APBSmem facilitates the setup of electrostatics calculations with a membrane. It implements the workflow from the APBS tutorial ‘Helix in a membrane’. The draw_membrane2a binary is required to to add a low-dielectric (eps=2) region and sets protein dielectric to eps=10.

Note

Paths to draw_membrane2a and apbs are set in the configuration file ~/.bornprofiler.cfg:

apbs = %(APBS)r
draw_membrane2 = %(DRAWMEMBRANE)r

APBSnomem simply gives electrostatics info for the protein/solvent system for comparison (and does not need draw_membrane2a).

class bornprofiler.electrostatics.APBSmem(*args, **kwargs)[source]

Represent the apbsmem tools.

Run for S, M, and L grid (change suffix).

Note

see code for kwargs

Set up calculation.

APBSmem(pqr, suffix[, kwargs])

Arguments:
  • arguments for drawmembrane (see source)
  • temperature: temperature [298.15]
  • conc: ionic concentration of monovalent salt with radius 2 A
    in mol/l [0.1]
  • dime: grid dimensions, as list [(97,97,97)]
  • glen: grid length, as list in Angstroem [(250,250,250}]
generate()[source]

Setup solvation calculation.

  1. create exclusion maps (runs apbs)
  2. create membrane maps (drawmembrane)
  3. create apbs run input file
vars = None

“static” variables required for a calculation

class bornprofiler.electrostatics.APBSnomem(*args, **kwargs)[source]

Represent the apbsnomem tools.

Run for S, M, and L grid (change suffix).

Note

see code for kwargs

Set up calculation.

APBSnomem(pqr, suffix[, kwargs])

Arguments:
  • temperature: temperature [298.15]
  • conc: ionic concentration of monovalent salt with radius 2 A
    in mol/l [0.1]
  • dime: grid dimensions, as list [(97,97,97)]
  • glen: grid length, as list in Angstroem [(250,250,250}]
generate()[source]

Setup solvation calculation.

  1. create exclusion maps (runs apbs)
  2. create apbs run input file
vars = None

“static” variables required for a calculation

class bornprofiler.electrostatics.BornAPBSmem(*args, **kwargs)[source]

Class to prepare a single window in a manual focusing run.

Set up calculation.

BornAPBSmem(protein_pqr, ion_pqr, complex_pqr[, kwargs])

Additional arguments:
  • apbs_script_name: name on the xxx.in script [mem_placeion.in]
  • drawmembrane arguments (see source)
  • temperature: temperature [298.15]
  • conc: ionic concentration of monovalent salt with radius 2 A
    in mol/l [0.1]
  • dime: grid dimensions, as list with 1 or 3 entries; if o1 entry
    then the same dime is used for all focusing stages [(97,97,97)]
  • glen: grid length, as list in Angstroem, must contain three triplets
    [(250,250,250),(100,100,100),(50,50,50)]
  • runtype: for standard Born calculations use ‘with_protein’; if one only wants to
    look at geometrically defined dielectric regions and uncharged proteins (see the example/Parsegian) then use ‘memonly’ [‘with_protein’]
generate(run=False)[source]

Setup solvation calculation.

If run = True then runs apbs and draw_membrane2 (which can take a few minutes); otherwise just generate scripts (default).

run = True
  1. create exclusion maps (runs apbs through run_apbs())
  2. create membrane maps (draw_membrane2a through run_drawmembrane2())
  3. create apbs run input file
run = False
  1. write a bash script that calls apbs and draw_membrane2 and which can be integrated into a window run script for parallelization.
  2. create apbs run input file
suffices = ('L', 'M', 'S')

Suffices of file names are hard coded in templates and should not be changed; see templates/mdummy.in and templates/mplaceion.in. The order of the suffices corresponds to the sequence in the schedule.

vars = None

“static” variables required for generating a file from a template; The variable names can be found in self.__dict__

bornprofiler.electrostatics.TEMPLATES = {'born_dummy': '# APBS: write coefficient maps \n# Coefficient maps for Born profile calculations\n# Build maps for three focusing steps of a Born profile calculation\n# Map names are hard coded. Writing/reading of dxformat=gz requires\n# APBS version >= 1.3 and draw_membrane2a\n\nREAD\n mol pqr %(protein_pqr)s\n mol pqr %(ion_pqr)s\n mol pqr %(complex_pqr)s\nEND\n\n#------------------------------------------------------------\n# Protein alone (mol 1)\n#------------------------------------------------------------\n#\n# focusing step (1): whole system\nELEC name protein_L\n mg-dummy\n mol 1\n dime %(DIME_XYZ_L)s\n nlev 4\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_prot_L\n write diely %(dxformat)s diely_prot_L\n write dielz %(dxformat)s dielz_prot_L\n write kappa %(dxformat)s kappa_prot_L\n write charge %(dxformat)s charge_prot_L\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name protein_M\n mg-dummy\n mol 1\n dime %(DIME_XYZ_M)s\n nlev 4\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_prot_M\n write diely %(dxformat)s diely_prot_M\n write dielz %(dxformat)s dielz_prot_M\n write kappa %(dxformat)s kappa_prot_M\n write charge %(dxformat)s charge_prot_M\nEND\n\nELEC name protein_S\n mg-dummy\n mol 1\n dime %(DIME_XYZ_S)s\n nlev 4\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_prot_S\n write diely %(dxformat)s diely_prot_S\n write dielz %(dxformat)s dielz_prot_S\n write kappa %(dxformat)s kappa_prot_S\n write charge %(dxformat)s charge_prot_S\nEND\n\n#------------------------------------------------------------\n# Complex protein+ion (mol 3)\n#------------------------------------------------------------\n#\n# Uses own set of maps\n# focusing step (1): whole system\nELEC name complex_L\n mg-dummy\n mol 3\n dime %(DIME_XYZ_L)s\n nlev 4\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_cpx_L\n write diely %(dxformat)s diely_cpx_L\n write dielz %(dxformat)s dielz_cpx_L\n write kappa %(dxformat)s kappa_cpx_L\n write charge %(dxformat)s charge_cpx_L\nEND\n\n# focus but now center on ion position (mol 2)\nELEC name complex_M\n mg-dummy\n mol 3\n dime %(DIME_XYZ_M)s\n nlev 4\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_cpx_M\n write diely %(dxformat)s diely_cpx_M\n write dielz %(dxformat)s dielz_cpx_M\n write kappa %(dxformat)s kappa_cpx_M\n write charge %(dxformat)s charge_cpx_M\nEND\n\nELEC name complex_S\n mg-dummy\n mol 3\n dime %(DIME_XYZ_S)s\n nlev 4\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie).2f\n sdie %(sdie).2f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx_cpx_S\n write diely %(dxformat)s diely_cpx_S\n write dielz %(dxformat)s dielz_cpx_S\n write kappa %(dxformat)s kappa_cpx_S\n write charge %(dxformat)s charge_cpx_S\nEND\n\n', 'born_setup_script': '#!/bin/bash\n# Generate dielectric/kappa/charge files with membrane inserted.\n# Requires a customized version \'draw_membrane2a\' (can be found in the BornProfiler\n# distribution in \'src/drawmembrane/draw_membrane2a.c\')\n# Written by bornprofiler.membrane instead of MPlaceion.run_drawmembrane()\n# :Author: Oliver Beckstein <oliver.beckstein@bioch.ox.ac.uk>\n# :Year: 2010-2011\n# :Licence: This file is placed in the Public Domain.\n\n# can be set in the environment\n: ${APBS:=apbs}\n: ${DRAW_MEMBRANE2A:=draw_membrane2a}\n\n# set by the BornProfiler scripts\nDUMMY_IN=%(born_dummy_in)r\nDUMMY_OUT=%(born_dummy_out)r\nINFICES="%(infices)s"\n\nfunction die () {\n echo "ERROR: $1";\n exit ${2:-};\n}\n\nfunction checkfile () {\n test -e "$1" || die "File $1 does not exist." 2;\n}\n\nfunction run_apbs () {\n local infile="$1" outfile="$2"\n local targets\n targets=$(ls {dielx,diely,dielz,kappa,charge}*[LMS].dx* 2>/dev/null)\n if [ $(echo $targets | wc -w) -eq 30 ]; then\n\techo "APBS-generated diel/kappa/charge dx already exist ... skipping run_apbs(\'born_dummy\')"\n\treturn\n else\n\techo "Running ${APBS} ${infile} ... [run_apbs(\'born_dummy\')]"\n\t${APBS} "${infile}" 2>&1 | tee "${outfile}" \\\n\t || die "${APBS} ${infile} failed."\n fi\n}\n\nfunction run_drawmembrane () {\n # all draw_membrane interpolations are done here!\n local infix=$1 compression="%(dxformat)s"\n local targets compress_option=""\n targets=$(ls {dielx,diely,dielz,kappa,charge}${infix}m.dx* 2>/dev/null)\n if [ $(echo $targets | wc -w) -eq 5 ]; then\n\techo "Files for $infix already exist .. skipping"\n\treturn\n fi\n if [ "$compression" == "gz" ]; then\n\tcompress_option="-Z"\n fi\n ${DRAW_MEMBRANE2A} $compress_option -z %(zmem)f -d %(lmem)f \\\n\t-p %(pdie)f -s %(sdie)f -m %(mdie)f \\\n\t-R %(Rtop)f -r %(Rbot)f -X %(x0_R)f -Y %(y0_R)f -c %(cdie)s \\\n\t-a %(headgroup_l)f -i %(headgroup_die)f \\\n\t-V %(Vmem)f -I %(conc)f $infix \\\n\t|| die "${DRAW_MEMBRANE2A} $infix failed."\n} \n\necho "------------------------------------------------------------"\necho "Generating dx files with membrane"\necho "------------------------------------------------------------"\necho "APBS = ${APBS}"\necho "draw_membrane2a = ${DRAW_MEMBRANE2A}"\n\ncheckfile "${DUMMY_IN}"\nrun_apbs "${DUMMY_IN}" "${DUMMY_OUT}"\n\necho "Running ${DRAW_MEMBRANE2A} ... [run_drawmembrane()]"\nfor infix in ${INFICES}; do\n run_drawmembrane $infix\ndone\n\necho "Generated all membrane files required for running the window."\nexit 0\n', 'dummy': '# APBS: write coefficient maps\n# (based on APBSmem-generated output)\nread\n mol pqr "%(pqr)s"\nend\n\nelec name solv0\n mg-dummy\n dime %(DIME_XYZ)s\n glen %(GLEN_XYZ)s\n lpbe\n pdie %(pdie)f\n sdie %(sdie)f\n bcfl zero\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n gcent mol 1\n mol 1\n chgm spl2\n srfm mol\n srad 1.4\n swin 0.3\n sdens 10\n temp %(temperature)f\n calcenergy no\n calcforce no\n write dielx %(dxformat)s dielx%(suffix)s\n write diely %(dxformat)s diely%(suffix)s\n write dielz %(dxformat)s dielz%(suffix)s\n write kappa %(dxformat)s kappa%(suffix)s\n write charge %(dxformat)s charge%(suffix)s\nend\n\nquit\n', 'memonly': '# APBS input file generated by placeion.py\n# only for the ion (see example/parsegian) --- uses a neutral "fakeprotein"\n# %(comment)s\n# Uses a membrane and manual focusing in three steps.\n\nREAD\n # molecules\n # the protein is required to anchor the system; it is only\n # used for its position and thus can be a single atom\n # (This is a hack in order to be able to use the Membrane\n # BornProfiler scripts which always want a protein; when doing\n # things manually one could remove it and \'gcent\' on the complex)\n mol pqr %(protein_pqr)s\n mol pqr %(ion_pqr)s\n mol pqr %(complex_pqr)s\n\n # NOTE: APBS 1.3 has a bug that prevents _reading_ of gzipped files \n # so they need to be unzipped manually\n \n # maps for complex\n diel %(dxformat)s dielx_cpx_Lm.%(dxsuffix)s diely_cpx_Lm.%(dxsuffix)s dielz_cpx_Lm.%(dxsuffix)s\n diel %(dxformat)s dielx_cpx_Mm.%(dxsuffix)s diely_cpx_Mm.%(dxsuffix)s dielz_cpx_Mm.%(dxsuffix)s\n diel %(dxformat)s dielx_cpx_Sm.%(dxsuffix)s diely_cpx_Sm.%(dxsuffix)s dielz_cpx_Sm.%(dxsuffix)s\n\n kappa %(dxformat)s kappa_cpx_Lm.%(dxsuffix)s\n kappa %(dxformat)s kappa_cpx_Mm.%(dxsuffix)s\n kappa %(dxformat)s kappa_cpx_Sm.%(dxsuffix)s\n\n charge %(dxformat)s charge_cpx_Lm.%(dxsuffix)s\n charge %(dxformat)s charge_cpx_Mm.%(dxsuffix)s\n charge %(dxformat)s charge_cpx_Sm.%(dxsuffix)s\nEND\n\n# Focus each calculation in three steps\n\n\n#------------------------------------------------------------\n# Ion in solvent (mol 2)\n#------------------------------------------------------------\n#\n# focusing step (1): whole system\n# (note: no membrane because the reference state for our Born\n# ion is the aqueous phase).\nELEC name ion_L\n mg-manual\n mol 2\n dime %(DIME_XYZ_L)s\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name ion_M\n mg-manual\n mol 2\n dime %(DIME_XYZ_M)s\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\nELEC name ion_S\n mg-manual\n mol 2\n dime %(DIME_XYZ_S)s\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\n\n#------------------------------------------------------------\n# Complex ion in membrane (mol 3)\n#------------------------------------------------------------\n#\n# Uses own set of maps\n# focusing step (1): whole system\nELEC name complex_L\n mg-manual\n mol 3\n dime %(DIME_XYZ_L)s\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 1\n usemap kappa 1\n usemap charge 1\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name complex_M\n mg-manual\n mol 3\n dime %(DIME_XYZ_M)s\n nlev 4\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 2\n usemap kappa 2\n usemap charge 2\nEND\n\nELEC name complex_S\n mg-manual\n mol 3\n dime %(DIME_XYZ_S)s\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 3\n usemap kappa 3\n usemap charge 3\nEND\n\n\n# Born free energy from the focused potentials\nPRINT elecEnergy complex_S - ion_S END\nQUIT\n\n', 'solvation': '# APBS input file\n# calculate the potential for a system embedded in a membrane\n\nread\n mol pqr "%(pqr)s"\n # Read Maps\n diel %(dxformat)s dielx%(suffix)sm.%(dxsuffix)s diely%(suffix)sm.%(dxsuffix)s dielz%(suffix)sm.%(dxsuffix)s\n kappa %(dxformat)s kappa%(suffix)sm.%(dxsuffix)s\n charge %(dxformat)s charge%(suffix)sm.%(dxsuffix)s\nend\n\nelec name bulksolvent\n mg-manual\n dime %(DIME_XYZ)s\n glen %(GLEN_XYZ)s\n lpbe\n pdie %(pdie)f\n sdie %(sdie)f\n bcfl sdh\n ion charge 1 conc %(conc)f radius 0.95 # sodium\n ion charge -1 conc %(conc)f radius 1.81 # chloride\n gcent mol 1\n mol 1\n chgm spl2\n srfm mol\n srad 1.4\n swin 0.3\n sdens 10\n temp %(temperature)f\n calcenergy total\n calcforce no\n write pot dx pot_bulksolvent%(suffix)s\nend\n\nelec name membrane\n mg-manual\n dime %(DIME_XYZ)s\n glen %(GLEN_XYZ)s\n lpbe\n pdie %(pdie)f\n sdie %(sdie)f\n bcfl sdh\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n gcent mol 1\n mol 1\n chgm spl2\n srfm mol\n srad 1.4\n swin 0.3\n sdens 10\n temp %(temperature)f\n calcenergy total\n calcforce no\n usemap diel 1\n usemap kappa 1\n usemap charge 1\n write pot dx pot_membrane%(suffix)s\nend\n\nprint elecEnergy membrane - bulksolvent\nend\n\nquit\n', 'solvation_no_membrane': '# APBS input file\n# calculate the potential for a system embedded in a membrane\n\nread\n mol pqr "%(pqr)s"\n # Read Maps\n diel %(dxformat)s dielx%(suffix)s.%(dxsuffix)s diely%(suffix)s.%(dxsuffix)s dielz%(suffix)s.%(dxsuffix)s\n kappa %(dxformat)s kappa%(suffix)s.%(dxsuffix)s\n charge %(dxformat)s charge%(suffix)s.%(dxsuffix)s\nend\n\nelec name bulksolvent\n mg-manual\n dime %(DIME_XYZ)s\n glen %(GLEN_XYZ)s\n lpbe\n pdie %(pdie)f\n sdie %(sdie)f\n bcfl sdh\n ion charge 1 conc %(conc)f radius 0.95 # sodium\n ion charge -1 conc %(conc)f radius 1.81 # chloride\n gcent mol 1\n mol 1\n chgm spl2\n srfm mol\n srad 1.4\n swin 0.3\n sdens 10\n temp %(temperature)f\n calcenergy total\n calcforce no\n write pot dx pot_bulksolvent%(suffix)s\nend\n\nprint elecEnergy bulksolvent\nend\n\nquit\n', 'with_protein': '# APBS input file generated by placeion.py\n# for the complex and the ion\n# %(comment)s\n# Uses a membrane and manual focusing in three steps.\n\nREAD\n # molecules\n mol pqr %(protein_pqr)s\n mol pqr %(ion_pqr)s\n mol pqr %(complex_pqr)s\n\n # NOTE: APBS 1.3 has a bug that prevents _reading_ of gzipped files \n # so they need to be unzipped manually\n \n # maps for protein only\n diel %(dxformat)s dielx_prot_Lm.%(dxsuffix)s diely_prot_Lm.%(dxsuffix)s dielz_prot_Lm.%(dxsuffix)s\n diel %(dxformat)s dielx_prot_Mm.%(dxsuffix)s diely_prot_Mm.%(dxsuffix)s dielz_prot_Mm.%(dxsuffix)s\n diel %(dxformat)s dielx_prot_Sm.%(dxsuffix)s diely_prot_Sm.%(dxsuffix)s dielz_prot_Sm.%(dxsuffix)s\n\n kappa %(dxformat)s kappa_prot_Lm.%(dxsuffix)s\n kappa %(dxformat)s kappa_prot_Mm.%(dxsuffix)s\n kappa %(dxformat)s kappa_prot_Sm.%(dxsuffix)s\n\n charge %(dxformat)s charge_prot_Lm.%(dxsuffix)s\n charge %(dxformat)s charge_prot_Mm.%(dxsuffix)s\n charge %(dxformat)s charge_prot_Sm.%(dxsuffix)s\n\n # maps for complex\n diel %(dxformat)s dielx_cpx_Lm.%(dxsuffix)s diely_cpx_Lm.%(dxsuffix)s dielz_cpx_Lm.%(dxsuffix)s\n diel %(dxformat)s dielx_cpx_Mm.%(dxsuffix)s diely_cpx_Mm.%(dxsuffix)s dielz_cpx_Mm.%(dxsuffix)s\n diel %(dxformat)s dielx_cpx_Sm.%(dxsuffix)s diely_cpx_Sm.%(dxsuffix)s dielz_cpx_Sm.%(dxsuffix)s\n\n kappa %(dxformat)s kappa_cpx_Lm.%(dxsuffix)s\n kappa %(dxformat)s kappa_cpx_Mm.%(dxsuffix)s\n kappa %(dxformat)s kappa_cpx_Sm.%(dxsuffix)s\n\n charge %(dxformat)s charge_cpx_Lm.%(dxsuffix)s\n charge %(dxformat)s charge_cpx_Mm.%(dxsuffix)s\n charge %(dxformat)s charge_cpx_Sm.%(dxsuffix)s\nEND\n\n# Focus each calculation in three steps\n\n#------------------------------------------------------------\n# Protein alone (mol 1)\n#------------------------------------------------------------\n#\n# focusing step (1): whole system\nELEC name protein_L\n mg-manual\n mol 1\n dime %(DIME_XYZ_L)s\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 1\n usemap kappa 1\n usemap charge 1\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name protein_M\n mg-manual\n mol 1\n dime %(DIME_XYZ_M)s\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 2\n usemap kappa 2\n usemap charge 2\nEND\n\nELEC name protein_S\n mg-manual\n mol 1\n dime %(DIME_XYZ_S)s\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 3\n usemap kappa 3\n usemap charge 3\nEND\n\n#------------------------------------------------------------\n# Ion in solvent (mol 2)\n#------------------------------------------------------------\n#\n# focusing step (1): whole system\n# (note: no membrane because the reference state for our Born\n# ion is the aqueous phase).\nELEC name ion_L\n mg-manual\n mol 2\n dime %(DIME_XYZ_L)s\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name ion_M\n mg-manual\n mol 2\n dime %(DIME_XYZ_M)s\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\nELEC name ion_S\n mg-manual\n mol 2\n dime %(DIME_XYZ_S)s\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\nEND\n\n\n#------------------------------------------------------------\n# Complex protein+ion (mol 3)\n#------------------------------------------------------------\n#\n# Uses own set of maps\n# focusing step (1): whole system\nELEC name complex_L\n mg-manual\n mol 3\n dime %(DIME_XYZ_L)s\n glen %(GLEN_XYZ_L)s\n gcent mol 1\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl zero\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 4\n usemap kappa 4\n usemap charge 4\nEND\n\n# focus but now center on ion position (mol 2)\n# and use potential from boundary of previous calc (bcfl focus)\nELEC name complex_M\n mg-manual\n mol 3\n dime %(DIME_XYZ_M)s\n nlev 4\n glen %(GLEN_XYZ_M)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 5\n usemap kappa 5\n usemap charge 5\nEND\n\nELEC name complex_S\n mg-manual\n mol 3\n dime %(DIME_XYZ_S)s\n glen %(GLEN_XYZ_S)s\n gcent mol 2\n # NaCl ionic strength in mol/L\n ion charge 1 conc %(conc).2f radius 0.95 # sodium ions\n ion charge -1 conc %(conc).2f radius 1.81 # chloride ions\n lpbe\n bcfl focus\n pdie %(pdie)f\n sdie %(sdie)f\n srfm mol\n chgm spl2\n srad 1.4\n swin 0.3\n sdens 10.0\n temp %(temperature).2f\n calcenergy total\n calcforce no\n usemap diel 6\n usemap kappa 6\n usemap charge 6\nEND\n\n\n# Born free energy from the focused potentials\nPRINT elecEnergy complex_S - ion_S - protein_S END\nQUIT\n\n'}

cache for template files