5.3. Examples of using the CHARMM/APBS module

The following examples demonstrate how APBS functionality can be used from within CHARMM. Using CHARMM/APBS module is very similar to using the PBEQ module so examples provided for the PBEQ module can be easily adapted for CHARMM/APBS. The example files are located in CHARMM/examples in iAPBS distribution directory.

5.3.1. Solvation energy calculation

This example executes a solvation energy calculation and prints out total solvation energy for the given molecule.

* sp_elstat.inp
* external files: top_all22_prot.inp, par_all22_prot.inp and radius.str
*

!if ?apbs .ne. 1 then stop

stream datadir.def

open read card unit 11 name @0top_all22_prot.inp
read rtf card unit 11
close unit 11

open read card unit 11 name @0par_all22_prot.inp
read para card unit 11
close unit 11

 ... read in or generate structure

coor orient

scalar charge show

PBEQ
   stream @0radius.str
   set factor 0.939
   set sw     0.4
   scalar wmain add  @sw
   scalar wmain mult @factor
   scalar wmain set 0.0 sele type H* end
   scalar wmain show

  APBS mgauto lpbe dimx 65 dimy 65 dimz 65 -
  cglx 30 cgly 30 cglz 30 fglx 15 fgly 15 fglz 15 -
  srfm 2 debug 1 -
  calcene 1 calcforce 1 sforce -
  sele all END

END

skip all excl pbelec pbnp
ener
set elstatenergy = ?ENPB
stop
    

5.3.2. Molecular dynamics in implicit solvent using APBS

This examples shows how to use the CHARMM/APBS module for performing molecular dynamics simulation in implicit solvent with APBS.

* md.inp
* external files: top_all22_prot.inp, par_all22_prot.inp and radius.str
*

if ?apbs .ne. 1 then stop

stream datadir.def

open read card unit 11 name @0top_all22_prot.inp
read rtf card unit 11
close unit 11

open read card unit 11 name @0par_all22_prot.inp
read para card unit 11
close unit 11

 ... read in or generate structure

coor orient

PBEQ
   set factor 0.939
   set sw     0.4
   stream @0radius.str
   scalar wmain add  @sw
   scalar wmain mult @factor
   scalar wmain set 0.0 sele type H* end

  APBS mgauto lpbe dimx 65 dimy 65 dimz 65 -
  cglx 30 cgly 30 cglz 30 fglx 15 fgly 15 fglz 15 -
  swin @sw srfm 2 -
  calcene 1 calcfor 1 -
  sforce update 2 -
  sele all END
END

skip none

dynamics leap verlet strt nstep 150 timestep 0.001 -
firstt 100.0 finalt 300.0 teminc 100.0 -
twindh 10.0

stop
    

5.3.3. Calculation and visualization of electrostatic potential

When this input file is run three DX files will be created. These can be visualized using several applications (for details please see APBS visualization guide). The DX files will be iapbs-pot.dx, iapbs-smol.dx and iapbs-charge.dx which will contain electrostatic potential, solvent accessible surface and charge information, respectively.

* visualization.inp
* external files: top_all22_prot.inp, par_all22_prot.inp and radius.str
*

!if ?apbs .ne. 1 then stop

stream datadir.def

open read card unit 11 name @0top_all22_prot.inp
read rtf card unit 11
close unit 11

open read card unit 11 name @0par_all22_prot.inp
read para card unit 11
close unit 11

... read in or generate structure

coor orient

PBEQ
   stream @0radius.str
   set factor 0.939
   set sw     0.4
   scalar wmain add  @sw
   scalar wmain mult @factor
   scalar wmain set 0.0 sele type H* end
   scalar wmain show

  APBS mgauto lpbe dimx 65 dimy 65 dimz 65 -
  cglx 30 cgly 30 cglz 30 fglx 15 fgly 15 fglz 15 -
  calcene 1 calcforce 0 -
  ionq1 1.0 ionc1 0.15 ionr1 2.0 ionq2 -1.0 ionc2 0.15 ionr2 2.0 -
  wpot wsmol wchg -
  debug 1 -
  sele all END
END

set elstatenergy = ?ENPB

stop