APBS  1.5
Vpmg class

A wrapper for Mike Holst's PMG multigrid code. More...

Files

file  vpmg.c
 Class Vpmg methods.
 
file  vpmg.h
 Contains declarations for class Vpmg.
 

Data Structures

struct  sVpmg
 Contains public data members for Vpmg class/module. More...
 

Typedefs

typedef struct sVpmg Vpmg
 Declaration of the Vpmg class as the Vpmg structure.
 

Functions

VEXTERNC unsigned long int Vpmg_memChk (Vpmg *thee)
 Return the memory used by this structure (and its contents) in bytes. More...
 
VEXTERNC VpmgVpmg_ctor (Vpmgp *parms, Vpbe *pbe, int focusFlag, Vpmg *pmgOLD, MGparm *mgparm, PBEparm_calcEnergy energyFlag)
 Constructor for the Vpmg class (allocates new memory) More...
 
VEXTERNC int Vpmg_ctor2 (Vpmg *thee, Vpmgp *parms, Vpbe *pbe, int focusFlag, Vpmg *pmgOLD, MGparm *mgparm, PBEparm_calcEnergy energyFlag)
 FORTRAN stub constructor for the Vpmg class (uses previously-allocated memory) More...
 
VEXTERNC void Vpmg_dtor (Vpmg **thee)
 Object destructor. More...
 
VEXTERNC void Vpmg_dtor2 (Vpmg *thee)
 FORTRAN stub object destructor. More...
 
VEXTERNC int Vpmg_fillco (Vpmg *thee, Vsurf_Meth surfMeth, double splineWin, Vchrg_Meth chargeMeth, int useDielXMap, Vgrid *dielXMap, int useDielYMap, Vgrid *dielYMap, int useDielZMap, Vgrid *dielZMap, int useKappaMap, Vgrid *kappaMap, int usePotMap, Vgrid *potMap, int useChargeMap, Vgrid *chargeMap)
 Fill the coefficient arrays prior to solving the equation. More...
 
VEXTERNC int Vpmg_solve (Vpmg *thee)
 Solve the PBE using PMG. More...
 
VEXTERNC int Vpmg_solveLaplace (Vpmg *thee)
 Solve Poisson's equation with a homogeneous Laplacian operator using the solvent dielectric constant. This solution is performed by a sine wave decomposition. More...
 
VEXTERNC double Vpmg_energy (Vpmg *thee, int extFlag)
 Get the total electrostatic energy. More...
 
VEXTERNC double Vpmg_qfEnergy (Vpmg *thee, int extFlag)
 Get the "fixed charge" contribution to the electrostatic energy. More...
 
VEXTERNC double Vpmg_qfAtomEnergy (Vpmg *thee, Vatom *atom)
 Get the per-atom "fixed charge" contribution to the electrostatic energy. More...
 
VEXTERNC double Vpmg_qmEnergy (Vpmg *thee, int extFlag)
 Get the "mobile charge" contribution to the electrostatic energy. More...
 
VEXTERNC double Vpmg_dielEnergy (Vpmg *thee, int extFlag)
 Get the "polarization" contribution to the electrostatic energy. More...
 
VEXTERNC double Vpmg_dielGradNorm (Vpmg *thee)
 Get the integral of the gradient of the dielectric function. More...
 
VEXTERNC int Vpmg_force (Vpmg *thee, double *force, int atomID, Vsurf_Meth srfm, Vchrg_Meth chgm)
 Calculate the total force on the specified atom in units of k_B T/AA. More...
 
VEXTERNC int Vpmg_qfForce (Vpmg *thee, double *force, int atomID, Vchrg_Meth chgm)
 Calculate the "charge-field" force on the specified atom in units of k_B T/AA. More...
 
VEXTERNC int Vpmg_dbForce (Vpmg *thee, double *dbForce, int atomID, Vsurf_Meth srfm)
 Calculate the dielectric boundary forces on the specified atom in units of k_B T/AA. More...
 
VEXTERNC int Vpmg_ibForce (Vpmg *thee, double *force, int atomID, Vsurf_Meth srfm)
 Calculate the osmotic pressure on the specified atom in units of k_B T/AA. More...
 
VEXTERNC void Vpmg_setPart (Vpmg *thee, double lowerCorner[3], double upperCorner[3], int bflags[6])
 Set partition information which restricts the calculation of observables to a (rectangular) subset of the problem domain. More...
 
VEXTERNC void Vpmg_unsetPart (Vpmg *thee)
 Remove partition restrictions. More...
 
VEXTERNC int Vpmg_fillArray (Vpmg *thee, double *vec, Vdata_Type type, double parm, Vhal_PBEType pbetype, PBEparm *pbeparm)
 Fill the specified array with accessibility values. More...
 
VPUBLIC void Vpmg_fieldSpline4 (Vpmg *thee, int atomID, double field[3])
 Computes the field at an atomic center using a stencil based on the first derivative of a 5th order B-spline. More...
 
VEXTERNC double Vpmg_qfPermanentMultipoleEnergy (Vpmg *thee, int atomID)
 Computes the permanent multipole electrostatic hydration energy (the polarization component of the hydration energy currently computed in TINKER). More...
 
VEXTERNC void Vpmg_qfPermanentMultipoleForce (Vpmg *thee, int atomID, double force[3], double torque[3])
 Computes the q-Phi Force for permanent multipoles based on 5th order B-splines. More...
 
VEXTERNC void Vpmg_ibPermanentMultipoleForce (Vpmg *thee, int atomID, double force[3])
 Compute the ionic boundary force for permanent multipoles. More...
 
VEXTERNC void Vpmg_dbPermanentMultipoleForce (Vpmg *thee, int atomID, double force[3])
 Compute the dielectric boundary force for permanent multipoles. More...
 
VEXTERNC void Vpmg_qfDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *induced, int atomID, double force[3], double torque[3])
 q-Phi direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field. More...
 
VEXTERNC void Vpmg_qfNLDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *nlInduced, int atomID, double force[3], double torque[3])
 q-Phi direct polarization force between permanent multipoles and non-local induced dipoles based on 5th Order B-Splines. Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy. More...
 
VEXTERNC void Vpmg_ibDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *induced, int atomID, double force[3])
 Ionic boundary direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field. More...
 
VEXTERNC void Vpmg_ibNLDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *nlInduced, int atomID, double force[3])
 Ionic boundary direct polarization force between permanent multipoles and non-local induced dipoles based on 5th order Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy. More...
 
VEXTERNC void Vpmg_dbDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *induced, int atomID, double force[3])
 Dielectric boundary direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field. More...
 
VEXTERNC void Vpmg_dbNLDirectPolForce (Vpmg *thee, Vgrid *perm, Vgrid *nlInduced, int atomID, double force[3])
 Dielectric bounday direct polarization force between permanent multipoles and non-local induced dipoles. Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy. More...
 
VEXTERNC void Vpmg_qfMutualPolForce (Vpmg *thee, Vgrid *induced, Vgrid *nlInduced, int atomID, double force[3])
 Mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field. More...
 
VEXTERNC void Vpmg_ibMutualPolForce (Vpmg *thee, Vgrid *induced, Vgrid *nlInduced, int atomID, double force[3])
 Ionic boundary mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field. More...
 
VEXTERNC void Vpmg_dbMutualPolForce (Vpmg *thee, Vgrid *induced, Vgrid *nlInduced, int atomID, double force[3])
 Dielectric boundary mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field. More...
 
VEXTERNC void Vpmg_printColComp (Vpmg *thee, char path[72], char title[72], char mxtype[3], int flag)
 Print out a column-compressed sparse matrix in Harwell-Boeing format. More...
 
VPRIVATE void bcolcomp (int *iparm, double *rparm, int *iwork, double *rwork, double *values, int *rowind, int *colptr, int *flag)
 Build a column-compressed matrix in Harwell-Boeing format. More...
 
VPRIVATE void bcolcomp2 (int *iparm, double *rparm, int *nx, int *ny, int *nz, int *iz, int *ipc, double *rpc, double *ac, double *cc, double *values, int *rowind, int *colptr, int *flag)
 Build a column-compressed matrix in Harwell-Boeing format. More...
 
VPRIVATE void bcolcomp3 (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *ac, double *cc, double *values, int *rowind, int *colptr, int *flag)
 Build a column-compressed matrix in Harwell-Boeing format. More...
 
VPRIVATE void bcolcomp4 (int *nx, int *ny, int *nz, int *ipc, double *rpc, double *oC, double *cc, double *oE, double *oN, double *uC, double *values, int *rowind, int *colptr, int *flag)
 Build a column-compressed matrix in Harwell-Boeing format. More...
 
VPRIVATE void pcolcomp (int *nrow, int *ncol, int *nnzero, double *values, int *rowind, int *colptr, char *path, char *title, char *mxtype)
 Print a column-compressed matrix in Harwell-Boeing format. More...
 
VEXTERNC void Vpackmg (int *iparm, double *rparm, size_t *nrwk, int *niwk, int *nx, int *ny, int *nz, int *nlev, int *nu1, int *nu2, int *mgkey, int *itmax, int *istop, int *ipcon, int *nonlin, int *mgsmoo, int *mgprol, int *mgcoar, int *mgsolv, int *mgdisc, int *iinfo, double *errtol, int *ipkey, double *omegal, double *omegan, int *irite, int *iperf)
 Print out a column-compressed sparse matrix in Harwell-Boeing format. More...
 

Detailed Description

A wrapper for Mike Holst's PMG multigrid code.

Note
Many of the routines and macros are borrowed from the main.c driver (written by Mike Holst) provided with the PMG code.

Function Documentation

◆ bcolcomp()

VPRIVATE void bcolcomp ( int *  iparm,
double *  rparm,
int *  iwork,
double *  rwork,
double *  values,
int *  rowind,
int *  colptr,
int *  flag 
)

Build a column-compressed matrix in Harwell-Boeing format.

Author
Tucker Beck [C Translation] Nathan Baker [Original] (mostly ripped off from Harwell-Boeing format documentation)Michael Schnieders)
Parameters
iparm
rparm
iwork
rwork
values
rowind
colptr
flagOperation selection parameter 0 = Use Poisson operator only 1 = Use linearization of full operation around current solution.

Definition at line 10741 of file vpmg.c.

◆ bcolcomp2()

VPRIVATE void bcolcomp2 ( int *  iparm,
double *  rparm,
int *  nx,
int *  ny,
int *  nz,
int *  iz,
int *  ipc,
double *  rpc,
double *  ac,
double *  cc,
double *  values,
int *  rowind,
int *  colptr,
int *  flag 
)

Build a column-compressed matrix in Harwell-Boeing format.

Author
Tucker Beck [C Translation] Nathan Baker [Original] (mostly ripped off from Harwell-Boeing format documentation)Michael Schnieders)
Parameters
iparm
rparm
nx
ny
nz
iz
ipc
rpc
ac
cc
values
rowind
colptr
flagOperation selection parameter 0 = Use Poisson operator only 1 = Use linearization of full operation around current solution.

Definition at line 10795 of file vpmg.c.

◆ bcolcomp3()

VPRIVATE void bcolcomp3 ( int *  nx,
int *  ny,
int *  nz,
int *  ipc,
double *  rpc,
double *  ac,
double *  cc,
double *  values,
int *  rowind,
int *  colptr,
int *  flag 
)

Build a column-compressed matrix in Harwell-Boeing format.

Author
Tucker Beck [C Translation] Nathan Baker [Original] (mostly ripped off from Harwell-Boeing format documentation)Michael Schnieders)
Parameters
nx
ny
nz
ipc
rpc
ac
cc
values
rowind
colptr
flag

Definition at line 10831 of file vpmg.c.

◆ bcolcomp4()

VPRIVATE void bcolcomp4 ( int *  nx,
int *  ny,
int *  nz,
int *  ipc,
double *  rpc,
double *  oC,
double *  cc,
double *  oE,
double *  oN,
double *  uC,
double *  values,
int *  rowind,
int *  colptr,
int *  flag 
)

Build a column-compressed matrix in Harwell-Boeing format.

Author
Tucker Beck [C Translation] Nathan Baker [Original] (mostly ripped off from Harwell-Boeing format documentation)Michael Schnieders)
Parameters
nx
ny
nz
ipc
rpc
oC
cc
oE
oN
uC
values
rowind
colptr
flag

Definition at line 10858 of file vpmg.c.

◆ pcolcomp()

VPRIVATE void pcolcomp ( int *  nrow,
int *  ncol,
int *  nnzero,
double *  values,
int *  rowind,
int *  colptr,
char *  path,
char *  title,
char *  mxtype 
)

Print a column-compressed matrix in Harwell-Boeing format.

Author
Tucker Beck [C Translation] Nathan Baker [Original] (mostly ripped off from Harwell-Boeing format documentation)Michael Schnieders)
Parameters
nrow
ncol
nnzero
values
rowind
colptr
path
title
mxtype

Definition at line 11023 of file vpmg.c.

◆ Vpackmg()

VEXTERNC void Vpackmg ( int *  iparm,
double *  rparm,
size_t *  nrwk,
int *  niwk,
int *  nx,
int *  ny,
int *  nz,
int *  nlev,
int *  nu1,
int *  nu2,
int *  mgkey,
int *  itmax,
int *  istop,
int *  ipcon,
int *  nonlin,
int *  mgsmoo,
int *  mgprol,
int *  mgcoar,
int *  mgsolv,
int *  mgdisc,
int *  iinfo,
double *  errtol,
int *  ipkey,
double *  omegal,
double *  omegan,
int *  irite,
int *  iperf 
)

Print out a column-compressed sparse matrix in Harwell-Boeing format.

Author
Nathan Baker
Bug:
Can this path variable be replaced with a Vio socket?

Definition at line 550 of file mgsubd.c.

◆ Vpmg_ctor()

VEXTERNC Vpmg* Vpmg_ctor ( Vpmgp parms,
Vpbe pbe,
int  focusFlag,
Vpmg pmgOLD,
MGparm mgparm,
PBEparm_calcEnergy  energyFlag 
)

Constructor for the Vpmg class (allocates new memory)

Author
Nathan Baker
Returns
Pointer to newly allocated Vpmg object
Parameters
parmsPMG parameter object
pbePBE-specific variables
focusFlag1 for focusing, 0 otherwise
pmgOLDOld Vpmg object to use for boundary conditions
mgparmMGparm parameter object for boundary conditions
energyFlagWhat types of energies to calculate

Definition at line 141 of file vpmg.c.

◆ Vpmg_ctor2()

VEXTERNC int Vpmg_ctor2 ( Vpmg thee,
Vpmgp parms,
Vpbe pbe,
int  focusFlag,
Vpmg pmgOLD,
MGparm mgparm,
PBEparm_calcEnergy  energyFlag 
)

FORTRAN stub constructor for the Vpmg class (uses previously-allocated memory)

Author
Nathan Baker
Returns
1 if successful, 0 otherwise
Note
this is common to both replace/noreplace options
The fortran replacement functions are run along side the old fortran functions. This is due to the use of common variables in the fortran sub-routines. Once the fortran code has been successfully excised, these functions will no longer need to be called in tandem, and the fortran version may be dropped
Parameters
theeMemory location for object
parmsPMG parameter object
pbePBE-specific variables
focusFlag1 for focusing, 0 otherwise
pmgOLDOld Vpmg object to use for boundary conditions (can be VNULL if focusFlag = 0)
mgparmMGparm parameter object for boundary conditions (can be VNULL if focusFlag = 0)
energyFlagWhat types of energies to calculate (ignored if focusFlag = 0)

Definition at line 153 of file vpmg.c.

◆ Vpmg_dbDirectPolForce()

VEXTERNC void Vpmg_dbDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid induced,
int  atomID,
double  force[3] 
)

Dielectric boundary direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
inducedInduced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_dbForce()

VEXTERNC int Vpmg_dbForce ( Vpmg thee,
double *  dbForce,
int  atomID,
Vsurf_Meth  srfm 
)

Calculate the dielectric boundary forces on the specified atom in units of k_B T/AA.

Author
Nathan Baker
Note
  • Using the force evaluation methods of Im et al (Roux group), Comput Phys Commun, 111, 59–75 (1998). However, this gives the whole (self-interactions included) force – reaction field forces will have to be calculated at higher level.
  • No contributions are made from higher levels of focusing.
Returns
1 if successful, 0 otherwise
Parameters
theeVpmg object
dbForce3*sizeof(double) space to hold the dielectric boundary force in units of k_B T/AA
atomIDValist ID of desired atom
srfmSurface discretization method

Definition at line 6010 of file vpmg.c.

◆ Vpmg_dbMutualPolForce()

VEXTERNC void Vpmg_dbMutualPolForce ( Vpmg thee,
Vgrid induced,
Vgrid nlInduced,
int  atomID,
double  force[3] 
)

Dielectric boundary mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
inducedInduced dipole potential
nlInducedNon-local induced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_dbNLDirectPolForce()

VEXTERNC void Vpmg_dbNLDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid nlInduced,
int  atomID,
double  force[3] 
)

Dielectric bounday direct polarization force between permanent multipoles and non-local induced dipoles. Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
nlInducedNon-local induced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_dbPermanentMultipoleForce()

VEXTERNC void Vpmg_dbPermanentMultipoleForce ( Vpmg thee,
int  atomID,
double  force[3] 
)

Compute the dielectric boundary force for permanent multipoles.

Author
Michael Schnieders
Parameters
theeVpmg object
atomIDAtom index
force(returned) force

◆ Vpmg_dielEnergy()

VEXTERNC double Vpmg_dielEnergy ( Vpmg thee,
int  extFlag 
)

Get the "polarization" contribution to the electrostatic energy.

     Using the solution at the finest mesh level, get the
     electrostatic energy due to the interaction of the mobile charges
     with the potential:
        \f[ G = \frac{1}{2} \int \epsilon (\nabla u)^2 dx \f]
     where epsilon is the dielectric parameter and u(x) is
     the dimensionless electrostatic potential.  The energy is scaled
     to units of k_b T.
Author
Nathan Baker
Note
The value of this observable may be modified by setting restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The polarization electrostatic energy in units of k_B T.
Parameters
theeVpmg object
extFlagIf this was a focused calculation, include (1 – for serial calculations) or ignore (0 – for parallel calculations) energy contributions from outside the focusing domain

Definition at line 1279 of file vpmg.c.

◆ Vpmg_dielGradNorm()

VEXTERNC double Vpmg_dielGradNorm ( Vpmg thee)

Get the integral of the gradient of the dielectric function.

     Using the dielectric map at the finest mesh level, calculate the
     integral of the norm of the dielectric function gradient
     routines of Im et al (see Vpmg_dbForce for reference):
        \f[ \int \| \nabla \epsilon \| dx \f]
     where epsilon is the dielectric parameter.
     The integral is returned in units of A^2.
Author
Nathan Baker restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The integral in units of A^2.
Parameters
theeVpmg object

Definition at line 1342 of file vpmg.c.

◆ Vpmg_dtor()

VEXTERNC void Vpmg_dtor ( Vpmg **  thee)

Object destructor.

Author
Nathan Baker
Parameters
theePointer to memory location of object to be destroyed

Definition at line 561 of file vpmg.c.

◆ Vpmg_dtor2()

VEXTERNC void Vpmg_dtor2 ( Vpmg thee)

FORTRAN stub object destructor.

Author
Nathan Baker
Parameters
theePointer to object to be destroyed

Definition at line 571 of file vpmg.c.

◆ Vpmg_energy()

VEXTERNC double Vpmg_energy ( Vpmg thee,
int  extFlag 
)

Get the total electrostatic energy.

Author
Nathan Baker
Note
The value of this observable may be modified by setting restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The electrostatic energy in units of k_B T.
Parameters
theeVpmg object
extFlagIf this was a focused calculation, include (1 – for serial calculations) or ignore (0 – for parallel calculations) energy contributions from outside the focusing domain

Definition at line 1248 of file vpmg.c.

◆ Vpmg_fieldSpline4()

VPUBLIC void Vpmg_fieldSpline4 ( Vpmg thee,
int  atomID,
double  field[3] 
)

Computes the field at an atomic center using a stencil based on the first derivative of a 5th order B-spline.

Author
Michael Schnieders
Parameters
theeVpmg object
atomIDAtom index
fieldThe (returned) electric field

◆ Vpmg_fillArray()

VEXTERNC int Vpmg_fillArray ( Vpmg thee,
double *  vec,
Vdata_Type  type,
double  parm,
Vhal_PBEType  pbetype,
PBEparm pbeparm 
)

Fill the specified array with accessibility values.

Author
Nathan Baker
Returns
1 if successful, 0 otherwise
Parameters
theeVpmg object
vecA nx*ny*nz*sizeof(double) array to contain the values to be written
typeWhat to write
parmParameter for data type definition (if needed)
pbetypeParameter for PBE type (if needed)
pbeparmPass in the PBE parameters (if needed)

Definition at line 892 of file vpmg.c.

◆ Vpmg_fillco()

VEXTERNC int Vpmg_fillco ( Vpmg thee,
Vsurf_Meth  surfMeth,
double  splineWin,
Vchrg_Meth  chargeMeth,
int  useDielXMap,
Vgrid dielXMap,
int  useDielYMap,
Vgrid dielYMap,
int  useDielZMap,
Vgrid dielZMap,
int  useKappaMap,
Vgrid kappaMap,
int  usePotMap,
Vgrid potMap,
int  useChargeMap,
Vgrid chargeMap 
)

Fill the coefficient arrays prior to solving the equation.

Author
Nathan Baker
Returns
1 if successful, 0 otherwise
Bug:
useDielMap could only be passed once, not three times, to this function - why not just once? that's what the call in routines.c ends up doing - just passing useDielMap three times. - P. Ellis 11/3/11
Parameters
theeVpmg object
surfMethSurface discretization method
splineWinSpline window (in A) for surfMeth = VSM_SPLINE
chargeMethCharge discretization method
useDielXMapBoolean to use dielectric map argument
dielXMapExternal dielectric map
useDielYMapBoolean to use dielectric map argument
dielYMapExternal dielectric map
useDielZMapBoolean to use dielectric map argument
dielZMapExternal dielectric map
useKappaMapBoolean to use kappa map argument
kappaMapExternal kappa map
usePotMapBoolean to use potential map argument
potMapExternal potential map
useChargeMapBoolean to use charge map argument
chargeMapExternal charge map

Definition at line 5655 of file vpmg.c.

◆ Vpmg_force()

VEXTERNC int Vpmg_force ( Vpmg thee,
double *  force,
int  atomID,
Vsurf_Meth  srfm,
Vchrg_Meth  chgm 
)

Calculate the total force on the specified atom in units of k_B T/AA.

Author
Nathan Baker
Note
  • Using the force evaluation methods of Im et al (Roux group), Comput Phys Commun, 111, 59–75 (1998). However, this gives the whole (self-interactions included) force – reaction field forces will have to be calculated at higher level.
  • No contributions are made from higher levels of focusing.
Returns
1 if successful, 0 otherwise
Parameters
theeVpmg object
force3*sizeof(double) space to hold the force in units of k_B T/AA
atomIDValist ID of desired atom
srfmSurface discretization method
chgmCharge discretization method

Definition at line 5822 of file vpmg.c.

◆ Vpmg_ibDirectPolForce()

VEXTERNC void Vpmg_ibDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid induced,
int  atomID,
double  force[3] 
)

Ionic boundary direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
inducedInduced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_ibForce()

VEXTERNC int Vpmg_ibForce ( Vpmg thee,
double *  force,
int  atomID,
Vsurf_Meth  srfm 
)

Calculate the osmotic pressure on the specified atom in units of k_B T/AA.

Author
Nathan Baker
Note
  • Using the force evaluation methods of Im et al (Roux group), Comput Phys Commun, 111, 59–75 (1998). However, this gives the whole (self-interactions included) force – reaction field forces will have to be calculated at higher level.
  • No contributions are made from higher levels of focusing.
Returns
1 if successful, 0 otherwise
Parameters
theeVpmg object
force3*sizeof(double) space to hold the boundary force in units of k_B T/AA
atomIDValist ID of desired atom
srfmSurface discretization method

Definition at line 5845 of file vpmg.c.

◆ Vpmg_ibMutualPolForce()

VEXTERNC void Vpmg_ibMutualPolForce ( Vpmg thee,
Vgrid induced,
Vgrid nlInduced,
int  atomID,
double  force[3] 
)

Ionic boundary mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
inducedInduced dipole potential
nlInducedNon-local induced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_ibNLDirectPolForce()

VEXTERNC void Vpmg_ibNLDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid nlInduced,
int  atomID,
double  force[3] 
)

Ionic boundary direct polarization force between permanent multipoles and non-local induced dipoles based on 5th order Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
nlInducedInduced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_ibPermanentMultipoleForce()

VEXTERNC void Vpmg_ibPermanentMultipoleForce ( Vpmg thee,
int  atomID,
double  force[3] 
)

Compute the ionic boundary force for permanent multipoles.

Author
Michael Schnieders
Parameters
theeVpmg object
atomIDAtom index
force(returned) force

◆ Vpmg_memChk()

VEXTERNC unsigned long int Vpmg_memChk ( Vpmg thee)

Return the memory used by this structure (and its contents) in bytes.

Author
Nathan Baker
Returns
The memory used by this structure and its contents in bytes
Parameters
theeObject for memory check

Definition at line 79 of file vpmg.c.

◆ Vpmg_printColComp()

VEXTERNC void Vpmg_printColComp ( Vpmg thee,
char  path[72],
char  title[72],
char  mxtype[3],
int  flag 
)

Print out a column-compressed sparse matrix in Harwell-Boeing format.

Author
Nathan Baker
Bug:
Can this path variable be replaced with a Vio socket?
Parameters
theeVpmg object
pathThe file to which the matrix is to be written
titleThe title of the matrix
mxtypeThe type of REAL-valued matrix, a 3-character string of the form "R_A" where the '_' can be one of:
  • S: symmetric matrix
  • U: unsymmetric matrix
  • H: Hermitian matrix
  • Z: skew-symmetric matrix
  • R: rectangular matrix
flagThe operator to compress:
  • 0: Poisson operator
  • 1: Linearization of the full Poisson-Boltzmann operator around the current solution

Definition at line 87 of file vpmg.c.

◆ Vpmg_qfAtomEnergy()

VEXTERNC double Vpmg_qfAtomEnergy ( Vpmg thee,
Vatom atom 
)

Get the per-atom "fixed charge" contribution to the electrostatic energy.

Using the solution at the finest mesh level, get the electrostatic energy due to the interaction of the fixed charges with the potential:

\[ G = q u(r), \]

where q$ is the charge and r is the location of the atom of interest. The result is returned in units of k_B T. Clearly, no self-interaction terms are removed. A factor a 1/2 has to be included to convert this to a real energy.

Author
Nathan Baker
Note
The value of this observable may be modified by setting restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The fixed charge electrostatic energy in units of k_B T.
Parameters
theeThe Vpmg object
atomThe atom for energy calculations

Definition at line 1791 of file vpmg.c.

◆ Vpmg_qfDirectPolForce()

VEXTERNC void Vpmg_qfDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid induced,
int  atomID,
double  force[3],
double  torque[3] 
)

q-Phi direct polarization force between permanent multipoles and induced dipoles, which are induced by the sum of the permanent intramolecular field and the permanent reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
inducedInduced dipole potential
atomIDAtom index
force(returned) force
torque(returned) torque

◆ Vpmg_qfEnergy()

VEXTERNC double Vpmg_qfEnergy ( Vpmg thee,
int  extFlag 
)

Get the "fixed charge" contribution to the electrostatic energy.

     Using the solution at the finest mesh level, get the
     electrostatic energy due to the interaction of the fixed charges
     with the potential: \f[ G = \sum_i q_i u(r_i) \f]
     and return the result in units of k_B T.  Clearly, no
     self-interaction terms are removed.  A factor a 1/2 has to be
     included to convert this to a real energy.
Author
Nathan Baker
Note
The value of this observable may be modified by setting restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The fixed charge electrostatic energy in units of k_B T.
Parameters
theeVpmg object
extFlagIf this was a focused calculation, include (1 – for serial calculations) or ignore (0 – for parallel calculations) energy contributions from outside the focusing domain

Definition at line 1687 of file vpmg.c.

◆ Vpmg_qfForce()

VEXTERNC int Vpmg_qfForce ( Vpmg thee,
double *  force,
int  atomID,
Vchrg_Meth  chgm 
)

Calculate the "charge-field" force on the specified atom in units of k_B T/AA.

Author
Nathan Baker
Note
  • Using the force evaluation methods of Im et al (Roux group), Comput Phys Commun, 111, 59–75 (1998). However, this gives the whole (self-interactions included) force – reaction field forces will have to be calculated at higher level.
  • No contributions are made from higher levels of focusing.
Returns
1 if sucessful, 0 otherwise
Parameters
theeVpmg object
force3*sizeof(double) space to hold the force in units of k_B T/A
atomIDValist ID of desired atom
chgmCharge discretization method

Definition at line 6267 of file vpmg.c.

◆ Vpmg_qfMutualPolForce()

VEXTERNC void Vpmg_qfMutualPolForce ( Vpmg thee,
Vgrid induced,
Vgrid nlInduced,
int  atomID,
double  force[3] 
)

Mutual polarization force for induced dipoles based on 5th order B-Splines. This force arises due to self-consistent convergence of the solute induced dipoles and reaction field.

Author
Michael Schnieders
Parameters
theeVpmg object
inducedInduced dipole potential
nlInducedNon-local induced dipole potential
atomIDAtom index
force(returned) force

◆ Vpmg_qfNLDirectPolForce()

VEXTERNC void Vpmg_qfNLDirectPolForce ( Vpmg thee,
Vgrid perm,
Vgrid nlInduced,
int  atomID,
double  force[3],
double  torque[3] 
)

q-Phi direct polarization force between permanent multipoles and non-local induced dipoles based on 5th Order B-Splines. Keep in mind that the "non-local" induced dipooles are just a mathematical quantity that result from differentiation of the AMOEBA polarization energy.

Author
Michael Schnieders
Parameters
theeVpmg object
permPermanent multipole potential
nlInducedNon-local induced dipole potential
atomIDAtom index
force(returned) force
torque(returned) torque

◆ Vpmg_qfPermanentMultipoleEnergy()

VEXTERNC double Vpmg_qfPermanentMultipoleEnergy ( Vpmg thee,
int  atomID 
)

Computes the permanent multipole electrostatic hydration energy (the polarization component of the hydration energy currently computed in TINKER).

Author
Michael Schnieders
Returns
The permanent multipole electrostatic hydration energy
Parameters
theeVpmg object
atomIDAtom index

◆ Vpmg_qfPermanentMultipoleForce()

VEXTERNC void Vpmg_qfPermanentMultipoleForce ( Vpmg thee,
int  atomID,
double  force[3],
double  torque[3] 
)

Computes the q-Phi Force for permanent multipoles based on 5th order B-splines.

Author
Michael Schnieders
Parameters
theeVpmg object
atomIDAtom index
force(returned) force
torque(returned) torque

◆ Vpmg_qmEnergy()

VEXTERNC double Vpmg_qmEnergy ( Vpmg thee,
int  extFlag 
)

Get the "mobile charge" contribution to the electrostatic energy.

     Using the solution at the finest mesh level, get the
     electrostatic energy due to the interaction of the mobile charges
     with the potential:
        \f[ G = \frac{1}{4 I_s} \sum_i c_i q_i^2 \int
        \kappa^2(x) e^{-q_i u(x)} dx \f]
     for the NPBE and
        \f[ G = \frac{1}{2} \int \overline{\kappa}^2(x) u^2(x) dx \f]
     for the LPBE.  Here i denotes the counterion species,
     I_s is the bulk ionic strength, kappa^2(x)
     is the modified Debye-Huckel parameter, c_i is the
     concentration of species i, q_i is the charge of
     species i, and u(x) is the dimensionless electrostatic
     potential.  The energy is scaled to units of k_b T.
Author
Nathan Baker
Note
The value of this observable may be modified by setting restrictions on the subdomain over which it is calculated. Such limits can be set via Vpmg_setPart and are generally useful for parallel runs.
Returns
The mobile charge electrostatic energy in units of k_B T.
Parameters
theeVpmg object
extFlagIf this was a focused calculation, include (1 – for serial calculations) or ignore (0 – for parallel calculations) energy contributions from outside the focusing domain

Definition at line 1386 of file vpmg.c.

◆ Vpmg_setPart()

VEXTERNC void Vpmg_setPart ( Vpmg thee,
double  lowerCorner[3],
double  upperCorner[3],
int  bflags[6] 
)

Set partition information which restricts the calculation of observables to a (rectangular) subset of the problem domain.

Author
Nathan Baker
Parameters
theeVpmg object
lowerCornerPartition lower corner
upperCornerPartition upper corner
bflagsBooleans indicating whether a particular processor is on the boundary with another partition. 0 if the face is not bounded (next to) another partition, and 1 otherwise.

Definition at line 627 of file vpmg.c.

◆ Vpmg_solve()

VEXTERNC int Vpmg_solve ( Vpmg thee)

Solve the PBE using PMG.

Author
Nathan Baker
Returns
1 if successful, 0 otherwise
Parameters
theeVpmg object

Definition at line 401 of file vpmg.c.

◆ Vpmg_solveLaplace()

VEXTERNC int Vpmg_solveLaplace ( Vpmg thee)

Solve Poisson's equation with a homogeneous Laplacian operator using the solvent dielectric constant. This solution is performed by a sine wave decomposition.

Author
Nathan Baker
Returns
1 if successful, 0 otherwise
Note
This function is really only for testing purposes as the PMG multigrid solver can solve the homogeneous system much more quickly. Perhaps we should implement an FFT version at some point...
Parameters
theeVpmg object

Definition at line 7042 of file vpmg.c.

◆ Vpmg_unsetPart()

VEXTERNC void Vpmg_unsetPart ( Vpmg thee)

Remove partition restrictions.

Author
Nathan Baker
Parameters
theeVpmg object

Definition at line 872 of file vpmg.c.