Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

routines.c File Reference

Supporting routines for APBS front end. More...

#include "apbscfg.h"
#include "maloc/maloc.h"
#include "mc/mc.h"
#include "mcx/mcx.h"
#include "apbs/apbs.h"
#include "apbs/vhal.h"
#include "apbs/nosh.h"
#include "apbs/vgrid.h"
#include "apbs/mgparm.h"
#include "apbs/pbeparm.h"
#include "apbs/femparm.h"
#include "routines.h"

Include dependency graph for routines.c:

Include dependency graph

Functions

VPUBLIC void startVio ()
 Wrapper to start MALOC Vio layer.

VPUBLIC VparamloadParameter (NOsh *nosh)
 Loads and returns parameter object.

VPUBLIC int loadMolecules (NOsh *nosh, Vparam *param, Valist *alist[NOSH_MAXMOL])
 Load the molecules given in NOsh into atom lists.

VPUBLIC void killMolecules (NOsh *nosh, Valist *alist[NOSH_MAXMOL])
 Destroy the loaded molecules.

VPUBLIC int loadDielMaps (NOsh *nosh, Vgrid *dielXMap[NOSH_MAXMOL], Vgrid *dielYMap[NOSH_MAXMOL], Vgrid *dielZMap[NOSH_MAXMOL])
 Load the dielectric maps given in NOsh into grid objects.

VPUBLIC void killDielMaps (NOsh *nosh, Vgrid *dielXMap[NOSH_MAXMOL], Vgrid *dielYMap[NOSH_MAXMOL], Vgrid *dielZMap[NOSH_MAXMOL])
 Destroy the loaded dielectric.

VPUBLIC int loadKappaMaps (NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
 Load the kappa maps given in NOsh into grid objects.

VPUBLIC void killKappaMaps (NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
 Destroy the loaded kappa maps.

VPUBLIC int loadChargeMaps (NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
 Load the charge maps given in NOsh into grid objects.

VPUBLIC void killChargeMaps (NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
 Destroy the loaded charge maps.

VPUBLIC void printPBEPARM (PBEparm *pbeparm)
 Print out generic PBE params loaded from input.

VPUBLIC void printMGPARM (MGparm *mgparm, double realCenter[3])
 Print out MG-specific params loaded from input.

VPUBLIC int initMG (int icalc, NOsh *nosh, MGparm *mgparm, PBEparm *pbeparm, double realCenter[3], Vpbe *pbe[NOSH_MAXCALC], Valist *alist[NOSH_MAXMOL], Vgrid *dielXMap[NOSH_MAXMOL], Vgrid *dielYMap[NOSH_MAXMOL], Vgrid *dielZMap[NOSH_MAXMOL], Vgrid *kappaMap[NOSH_MAXMOL], Vgrid *chargeMap[NOSH_MAXMOL], Vpmgp *pmgp[NOSH_MAXCALC], Vpmg *pmg[NOSH_MAXCALC])
 Initialize an MG calculation.

VPUBLIC void killMG (NOsh *nosh, Vpbe *pbe[NOSH_MAXCALC], Vpmgp *pmgp[NOSH_MAXCALC], Vpmg *pmg[NOSH_MAXCALC])
 Kill structures initialized during an MG calculation.

VPUBLIC int solveMG (NOsh *nosh, Vpmg *pmg, MGparm_CalcType type)
 Solve the PBE with MG.

VPUBLIC int setPartMG (NOsh *nosh, MGparm *mgparm, Vpmg *pmg)
 Set MG partitions for calculating observables and performing I/O.

VPUBLIC int energyMG (NOsh *nosh, int icalc, Vpmg *pmg, int *nenergy, double *totEnergy, double *qfEnergy, double *qmEnergy, double *dielEnergy)
 Calculate electrostatic energies from MG solution.

VPUBLIC int forceMG (Vmem *mem, NOsh *nosh, PBEparm *pbeparm, MGparm *mgparm, Vpmg *pmg, int *nforce, AtomForce **atomForce, Valist *alist[NOSH_MAXMOL])
 Calculate forces from MG solution.

VPUBLIC void killEnergy ()
 Kill arrays allocated for energies.

VPUBLIC void killForce (Vmem *mem, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC])
 Free memory from MG force calculation.

VPUBLIC int writematMG (int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg)
 Write out operator matrix from MG calculation to file.

VPUBLIC void storeAtomEnergy (Vpmg *pmg, int icalc, double **atomEnergy, int *nenergy)
 Store energy in arrays for future use.

VPUBLIC int writedataFlat (NOsh *nosh, Vcom *com, const char *fname, double totEnergy[NOSH_MAXCALC], double qfEnergy[NOSH_MAXCALC], double qmEnergy[NOSH_MAXCALC], double dielEnergy[NOSH_MAXCALC], int nenergy[NOSH_MAXCALC], double *atomEnergy[NOSH_MAXCALC], int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC])
 Write out information to a flat file.

VPUBLIC int writedataXML (NOsh *nosh, Vcom *com, const char *fname, double totEnergy[NOSH_MAXCALC], double qfEnergy[NOSH_MAXCALC], double qmEnergy[NOSH_MAXCALC], double dielEnergy[NOSH_MAXCALC], int nenergy[NOSH_MAXCALC], double *atomEnergy[NOSH_MAXCALC], int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC])
 Write out information to an XML file.

VPUBLIC int writedataMG (int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg)
 Write out observables from MG calculation to file.

VPUBLIC double returnEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint)
 Access net local energy.

VPUBLIC int printEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint)
 Combine and pretty-print energy data (deprecated...see printElecEnergy).

VPUBLIC int printElecEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint)
 Combine and pretty-print energy data.

VPUBLIC int printApolEnergy (NOsh *nosh, int iprint)
 Combine and pretty-print energy data.

VPUBLIC int printForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int iprint)
 Combine and pretty-print force data (deprecated...see printElecForce).

VPUBLIC int printElecForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int iprint)
 Combine and pretty-print force data.

VPUBLIC int printApolForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int iprint)
 Combine and pretty-print force data.

VPUBLIC int initFE (int icalc, NOsh *nosh, FEMparm *feparm, PBEparm *pbeparm, Vpbe *pbe[NOSH_MAXCALC], Valist *alist[NOSH_MAXMOL], Vfetk *fetk[NOSH_MAXCALC])
 Initialize FE solver objects.

VPUBLIC void printFEPARM (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
 Print out FE-specific params loaded from input.

VPUBLIC int partFE (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
 Partition mesh (if applicable).

VPUBLIC int preRefineFE (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
 Pre-refine mesh before solve.

VPUBLIC int solveFE (int icalc, NOsh *nosh, PBEparm *pbeparm, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
 Solve-estimate-refine.

VPUBLIC int energyFE (NOsh *nosh, int icalc, Vfetk *fetk[NOSH_MAXCALC], int *nenergy, double *totEnergy, double *qfEnergy, double *qmEnergy, double *dielEnergy)
 Calculate electrostatic energies from FE solution.

VPUBLIC int postRefineFE (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
 Estimate error, mark mesh, and refine mesh after solve.

VPUBLIC int writedataFE (int rank, NOsh *nosh, PBEparm *pbeparm, Vfetk *fetk)
 Write FEM data to files.

VPUBLIC int initAPOL (NOsh *nosh, Vmem *mem, Vparam *param, APOLparm *apolparm, int *nforce, AtomForce **atomForce, Valist *alist)
 Upperlevel routine to the non-polar energy and force routines.

VPUBLIC int energyAPOL (APOLparm *apolparm, double sasa, double sav)
 Calculate non-polar energies.

VPUBLIC int forceAPOL (Vacc *acc, Vmem *mem, APOLparm *apolparm, int *nforce, AtomForce **atomForce, Valist *alist, Vclist *clist)
 Calculate non-polar forces.


Detailed Description

Supporting routines for APBS front end.

Author:
Nathan Baker
Version:
Id
routines.c 1100 2007-06-25 17:02:52Z sobolevnrm
Attention:
 *
 * APBS -- Adaptive Poisson-Boltzmann Solver
 *
 * Nathan A. Baker (baker@biochem.wustl.edu)
 * Dept. of Biochemistry and Molecular Biophysics
 * Center for Computational Biology
 * Washington University in St. Louis
 *
 * Additional contributing authors listed in the code documentation.
 *
 * Copyright (c) 2002-2007.  Washington University in St. Louis.
 * All Rights Reserved.
 * Portions Copyright (c) 1999-2002.  The Regents of the University of
 * California.  
 * Portions Copyright (c) 1995.  Michael Holst.
 *
 * This file is part of APBS.
 *
 * APBS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * APBS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with APBS; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
 *
 * Linking APBS statically or dynamically with other modules is making a
 * combined work based on APBS. Thus, the terms and conditions of the GNU
 * General Public License cover the whole combination.
 * 
 * SPECIAL GPL EXCEPTION
 * In addition, as a special exception, the copyright holders of APBS
 * give you permission to combine the APBS program with free software
 * programs and libraries that are released under the GNU LGPL or with
 * code included in releases of ISIM, Ion Simulator Interface, PMV, PyMOL
 * SMOL, VMD, and Vision. Such combined software may be linked with APBS and 
 * redistributed together in original or modified form as mere aggregation
 * without requirement that the entire work be under the scope of the GNU 
 * General Public License. This special exception permission is also extended
 * to any software listed in the SPECIAL GPL EXCEPTION clauses by the PMG,
 * FEtk, MC, or MALOC libraries.
 * 
 * Note that people who make modified versions of APBS are not obligated
 * to grant this special exception for their modified versions; it is
 * their choice whether to do so. The GNU General Public License gives
 * permission to release a modified version without this exception; this
 * exception also makes it possible to release a modified version which
 * carries forward this exception.
 *
 * 

Generated on Thu Jul 12 11:49:54 2007 for APBS by doxygen 1.3.4