Functions

src/mg/vpmg.c File Reference

Class Vpmg methods. More...

#include "apbscfg.h"
#include "vpmg-private.h"
#include "apbs/vpmg.h"
#include "apbs/vhal.h"
Include dependency graph for vpmg.c:

Go to the source code of this file.

Functions

VPUBLIC unsigned long int Vpmg_memChk (Vpmg *thee)
 Return the memory used by this structure (and its contents) in bytes.
VPUBLIC 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.
VPUBLIC VpmgVpmg_ctor (Vpmgp *pmgp, Vpbe *pbe, int focusFlag, Vpmg *pmgOLD, MGparm *mgparm, PBEparm_calcEnergy energyFlag)
 Constructor for the Vpmg class (allocates new memory)
VPUBLIC int Vpmg_ctor2 (Vpmg *thee, Vpmgp *pmgp, Vpbe *pbe, int focusFlag, Vpmg *pmgOLD, MGparm *mgparm, PBEparm_calcEnergy energyFlag)
 FORTRAN stub constructor for the Vpmg class (uses previously-allocated memory)
VPUBLIC int Vpmg_solve (Vpmg *thee)
 Solve the PBE using PMG.
VPUBLIC void Vpmg_dtor (Vpmg **thee)
 Object destructor.
VPUBLIC void Vpmg_dtor2 (Vpmg *thee)
 FORTRAN stub object destructor.
VPUBLIC 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.
VPUBLIC void Vpmg_unsetPart (Vpmg *thee)
 Remove partition restrictions.
VPUBLIC int Vpmg_fillArray (Vpmg *thee, double *vec, Vdata_Type type, double parm, Vhal_PBEType pbetype, PBEparm *pbeparm)
 Fill the specified array with accessibility values.
VPRIVATE double Vpmg_polarizEnergy (Vpmg *thee, int extFlag)
VPUBLIC double Vpmg_energy (Vpmg *thee, int extFlag)
 Get the total electrostatic energy.
VPUBLIC double Vpmg_dielEnergy (Vpmg *thee, int extFlag)
 Get the "polarization" contribution to the electrostatic energy.
VPUBLIC double Vpmg_dielGradNorm (Vpmg *thee)
 Get the integral of the gradient of the dielectric function.
VPUBLIC double Vpmg_qmEnergy (Vpmg *thee, int extFlag)
 Get the "mobile charge" contribution to the electrostatic energy.
VPRIVATE double Vpmg_qmEnergyNONLIN (Vpmg *thee, int extFlag)
VPUBLIC double Vpmg_qmEnergySMPBE (Vpmg *thee, int extFlag)
VPUBLIC double Vpmg_qfEnergy (Vpmg *thee, int extFlag)
 Get the "fixed charge" contribution to the electrostatic energy.
VPRIVATE double Vpmg_qfEnergyPoint (Vpmg *thee, int extFlag)
VPUBLIC double Vpmg_qfAtomEnergy (Vpmg *thee, Vatom *atom)
 Get the per-atom "fixed charge" contribution to the electrostatic energy.
VPRIVATE double Vpmg_qfEnergyVolume (Vpmg *thee, int extFlag)
VPRIVATE void Vpmg_splineSelect (int srfm, Vacc *acc, double *gpos, double win, double infrad, Vatom *atom, double *force)
VPRIVATE void focusFillBound (Vpmg *thee, Vpmg *pmgOLD)
VPRIVATE void extEnergy (Vpmg *thee, Vpmg *pmgOLD, PBEparm_calcEnergy extFlag, double partMin[3], double partMax[3], int bflags[6])
VPRIVATE double bcfl1sp (double size, double *apos, double charge, double xkappa, double pre1, double *pos)
VPRIVATE void bcfl1 (double size, double *apos, double charge, double xkappa, double pre1, double *gxcf, double *gycf, double *gzcf, double *xf, double *yf, double *zf, int nx, int ny, int nz)
VPRIVATE void bcfl2 (double size, double *apos, double charge, double *dipole, double *quad, double xkappa, double eps_p, double eps_w, double T, double *gxcf, double *gycf, double *gzcf, double *xf, double *yf, double *zf, int nx, int ny, int nz)
VPRIVATE void bcCalcOrig (Vpmg *thee)
VPRIVATE int gridPointIsValid (int i, int j, int k, int nx, int ny, int nz)
VPRIVATE void packAtoms (double *ax, double *ay, double *az, double *charge, double *size, Vpmg *thee)
VPRIVATE void packUnpack (int nx, int ny, int nz, int ngrid, double *gx, double *gy, double *gz, double *value, Vpmg *thee, int pack)
VPRIVATE void bcflnew (Vpmg *thee)
VPRIVATE void multipolebc (double r, double kappa, double eps_p, double eps_w, double rad, double tsr[3])
VPRIVATE void bcfl_sdh (Vpmg *thee)
VPRIVATE void bcfl_mdh (Vpmg *thee)
VPRIVATE void bcfl_mem (double zmem, double L, double eps_m, double eps_w, double V, double xkappa, double *gxcf, double *gycf, double *gzcf, double *xf, double *yf, double *zf, int nx, int ny, int nz)
VPRIVATE void bcfl_map (Vpmg *thee)
VPRIVATE void bcCalc (Vpmg *thee)
VPRIVATE void fillcoCoefMap (Vpmg *thee)
VPRIVATE void fillcoCoefMol (Vpmg *thee)
VPRIVATE void fillcoCoefMolIon (Vpmg *thee)
VPRIVATE void fillcoCoefMolDiel (Vpmg *thee)
VPRIVATE void fillcoCoefMolDielNoSmooth (Vpmg *thee)
VPRIVATE void fillcoCoefMolDielSmooth (Vpmg *thee)
VPRIVATE void fillcoCoefSpline (Vpmg *thee)
VPRIVATE void fillcoCoef (Vpmg *thee)
VPRIVATE Vrc_Codes fillcoCharge (Vpmg *thee)
VPRIVATE Vrc_Codes fillcoChargeMap (Vpmg *thee)
VPRIVATE void fillcoChargeSpline1 (Vpmg *thee)
VPRIVATE double bspline2 (double x)
VPRIVATE double dbspline2 (double x)
VPRIVATE void fillcoChargeSpline2 (Vpmg *thee)
VPUBLIC 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.
VPUBLIC 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.
VPUBLIC 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.
VPUBLIC 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.
VPUBLIC 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.
VPRIVATE void qfForceSpline1 (Vpmg *thee, double *force, int atomID)
VPRIVATE void qfForceSpline2 (Vpmg *thee, double *force, int atomID)
VPRIVATE void qfForceSpline4 (Vpmg *thee, double *force, int atomID)
VPRIVATE void markFrac (double rtot, double *tpos, int nx, int ny, int nz, double hx, double hy, double hzed, double xmin, double ymin, double zmin, double *xarray, double *yarray, double *zarray)
VPRIVATE void markSphere (double rtot, double *tpos, int nx, int ny, int nz, double hx, double hy, double hz, double xmin, double ymin, double zmin, double *array, double markVal)
VPRIVATE void zlapSolve (Vpmg *thee, double **solution, double **source, double **work1)
VPUBLIC 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.
VPRIVATE double VFCHI4 (int i, double f)
VPRIVATE double bspline4 (double x)
VPUBLIC double dbspline4 (double x)
VPUBLIC double d2bspline4 (double x)
VPUBLIC double d3bspline4 (double x)
VPUBLIC void fillcoPermanentMultipole (Vpmg *thee)
VPRIVATE void fillcoCoefSpline4 (Vpmg *thee)
VPUBLIC void fillcoPermanentInduced (Vpmg *thee)
VPRIVATE void fillcoCoefSpline3 (Vpmg *thee)

Detailed Description

Class Vpmg methods.

Author:
Nathan Baker
Version:
Id:
vpmg.c 1611 2010-10-07 20:35:26Z yhuang01
Attention:
 *
 * APBS -- Adaptive Poisson-Boltzmann Solver
 *
 * Nathan A. Baker (nathan.baker@pnl.gov)
 * Pacific Northwest National Laboratory
 *
 * Additional contributing authors listed in the code documentation.
 *
 * Copyright (c) 2010, Pacific Northwest National Laboratory.  Portions Copyright (c) 2002-2010, Washington University in St. Louis.  Portions Copyright (c) 2002-2010, Nathan A. Baker.  Portions Copyright (c) 1999-2002, The Regents of the University of California. Portions Copyright (c) 1995, Michael Holst.
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met: 
 *
 * -  Redistributions of source code must retain the above copyright notice, this
 * list of conditions and the following disclaimer.  
 * 
 * - Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 * 
 * - Neither the name of Washington University in St. Louis nor the names of its
 * contributors may be used to endorse or promote products derived from this
 * software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * 

Definition in file vpmg.c.