Data Structures | |
struct | AtomForce |
Structure to hold atomic forces. More... | |
Files | |
file | main.c |
APBS "front end" program using formatted input files. | |
file | routines.h |
Header file for front end auxiliary routines. | |
Defines | |
#define | APBSRC 13 |
Return code for APBS during failure. | |
Typedefs | |
typedef struct AtomForce | AtomForce |
Define AtomForce type. | |
Functions | |
int | main (int argc, char **argv) |
The main APBS function. | |
Vparam * | loadParameter (NOsh *nosh) |
Loads and returns parameter object. | |
int | loadMolecules (NOsh *nosh, Vparam *param, Valist *alist[NOSH_MAXMOL]) |
Load the molecules given in NOsh into atom lists. | |
void | killMolecules (NOsh *nosh, Valist *alist[NOSH_MAXMOL]) |
Destroy the loaded molecules. | |
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. | |
void | killDielMaps (NOsh *nosh, Vgrid *dielXMap[NOSH_MAXMOL], Vgrid *dielYMap[NOSH_MAXMOL], Vgrid *dielZMap[NOSH_MAXMOL]) |
Destroy the loaded dielectric. | |
int | loadKappaMaps (NOsh *nosh, Vgrid *kappa[NOSH_MAXMOL]) |
Load the kappa maps given in NOsh into grid objects. | |
void | killKappaMaps (NOsh *nosh, Vgrid *kappa[NOSH_MAXMOL]) |
Destroy the loaded kappa maps. | |
int | loadChargeMaps (NOsh *nosh, Vgrid *charge[NOSH_MAXMOL]) |
Load the charge maps given in NOsh into grid objects. | |
void | killChargeMaps (NOsh *nosh, Vgrid *charge[NOSH_MAXMOL]) |
Destroy the loaded charge maps. | |
void | printPBEPARM (PBEparm *pbeparm) |
Print out generic PBE params loaded from input. | |
void | printMGPARM (MGparm *mgparm, double realCenter[3]) |
Print out MG-specific params loaded from input. | |
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. | |
void | killMG (NOsh *nosh, Vpbe *pbe[NOSH_MAXCALC], Vpmgp *pmgp[NOSH_MAXCALC], Vpmg *pmg[NOSH_MAXCALC]) |
Kill structures initialized during an MG calculation. | |
int | solveMG (NOsh *nosh, Vpmg *pmg, MGparm_CalcType type) |
Solve the PBE with MG. | |
int | setPartMG (NOsh *nosh, MGparm *mgparm, Vpmg *pmg) |
Set MG partitions for calculating observables and performing I/O. | |
int | energyMG (NOsh *nosh, int icalc, Vpmg *pmg, int *nenergy, double *totEnergy, double *qfEnergy, double *qmEnergy, double *dielEnergy) |
Calculate electrostatic energies from MG solution. | |
void | killEnergy () |
Kill arrays allocated for energies. | |
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. | |
void | killForce (Vmem *mem, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC]) |
Free memory from MG force calculation. | |
void | storeAtomEnergy (Vpmg *pmg, int icalc, double **atomEnergy, int *nenergy) |
Store energy in arrays for future use. | |
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. | |
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. | |
int | writedataMG (int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg) |
Write out observables from MG calculation to file. | |
int | writematMG (int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg) |
Write out operator matrix from MG calculation to file. | |
double | returnEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint) |
Access net local energy. | |
int | printEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint) |
Combine and pretty-print energy data (deprecated...see printElecEnergy). | |
int | printElecEnergy (Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint) |
Combine and pretty-print energy data. | |
int | printApolEnergy (NOsh *nosh, int iprint) |
Combine and pretty-print energy data. | |
int | printForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int i) |
Combine and pretty-print force data (deprecated...see printElecForce). | |
int | printElecForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int i) |
Combine and pretty-print force data. | |
int | printApolForce (Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int i) |
Combine and pretty-print force data. | |
void | startVio () |
Wrapper to start MALOC Vio layer. | |
void | printFEPARM (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC]) |
Print out FE-specific params loaded from input. | |
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. | |
Vrc_Codes | initFE (int icalc, NOsh *nosh, FEMparm *feparm, PBEparm *pbeparm, Vpbe *pbe[NOSH_MAXCALC], Valist *alist[NOSH_MAXMOL], Vfetk *fetk[NOSH_MAXCALC], Gem *gm[NOSH_MAXCALC]) |
Initialize FE solver objects. | |
void | killFE (NOsh *nosh, Vpbe *pbe[NOSH_MAXCALC], Vfetk *fetk[NOSH_MAXCALC], Gem *gem[NOSH_MAXMOL]) |
Kill structures initialized during an FE calculation. | |
int | preRefineFE (int i, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC]) |
Pre-refine mesh before solve. | |
int | partFE (int i, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC]) |
Partition mesh (if applicable). | |
int | solveFE (int i, NOsh *nosh, PBEparm *pbeparm, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC]) |
Solve-estimate-refine. | |
int | postRefineFE (int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC]) |
Estimate error, mark mesh, and refine mesh after solve. | |
int | writedataFE (int rank, NOsh *nosh, PBEparm *pbeparm, Vfetk *fetk) |
Write FEM data to files. | |
int | energyAPOL (APOLparm *apolparm, double sasa, double sav, double atomsasa[], double atomwcaEnergy[], int numatoms) |
Calculate non-polar energies. | |
int | forceAPOL (Vacc *acc, Vmem *mem, APOLparm *apolparm, int *nforce, AtomForce **atomForce, Valist *alist, Vclist *clist) |
Calculate non-polar forces. | |
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. | |
Vrc_Codes | loadMeshes (NOsh *nosh, Gem *gm[NOSH_MAXMOL]) |
Load the meshes given in NOsh into geometry objects. | |
void | killMeshes (NOsh *nosh, Gem *alist[NOSH_MAXMOL]) |
Destroy the loaded meshes. |
int energyAPOL | ( | APOLparm * | apolparm, | |
double | sasa, | |||
double | sav, | |||
double | atomsasa[], | |||
double | atomwcaEnergy[], | |||
int | numatoms | |||
) |
Calculate non-polar energies.
sasa | APOLparm object | |
sav | Solvent accessible surface area | |
atomsasa | Solvent accessible volume | |
atomwcaEnergy | Array for SASA per atom * | |
numatoms | Array for WCA energy per atom * Number of atoms (or size of the above arrays) * |
References ACE_COMPS, ACE_NO, ACE_TOTAL, sAPOLparm::calcenergy, sAPOLparm::gamma, sAPOLparm::press, and VRC_SUCCESS.
Referenced by initAPOL().
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.
nosh | Object with parsed input file parameters | |
icalc | Index of calculation | |
fetk | FE object array | |
nenergy | Set to number of entries in energy arrays | |
totEnergy | Set to total energy (in kT) | |
qfEnergy | Set to charge-potential energy (in kT) | |
qmEnergy | Set to mobile ion energy (in kT) | |
dielEnergy | Set to polarization energy (in kT) |
References sNOsh::bogus, sNOsh::calc, sPBEparm::calcenergy, sNOsh_calc::femparm, PBE_LPBE, PBE_LRPBE, PBE_NPBE, PBE_SMPBE, sNOsh_calc::pbeparm, sPBEparm::pbetype, PCE_COMPS, sPBEparm::temp, Vfetk_energy(), Vunit_kb, and Vunit_Na.
Referenced by main().
int energyMG | ( | NOsh * | nosh, | |
int | icalc, | |||
Vpmg * | pmg, | |||
int * | nenergy, | |||
double * | totEnergy, | |||
double * | qfEnergy, | |||
double * | qmEnergy, | |||
double * | dielEnergy | |||
) |
Calculate electrostatic energies from MG solution.
nosh | Object with parsed input file parameters | |
icalc | Index of calculation | |
pmg | MG object | |
nenergy | Set to number of entries in energy arrays | |
totEnergy | Set to total energy (in kT) | |
qfEnergy | Set to charge-potential energy (in kT) | |
qmEnergy | Set to mobile ion energy (in kT) | |
dielEnergy | Set to polarization energy (in kT) |
References sVpbe::alist, APBS_TIMER_ENERGY, sNOsh::bogus, sNOsh::calc, sPBEparm::calcenergy, extEnergy(), sNOsh_calc::mgparm, sVpmg::pbe, sNOsh_calc::pbeparm, PCE_COMPS, PCE_TOTAL, sPBEparm::temp, Valist_getAtom(), Valist_getNumberAtoms(), Vpmg_dielEnergy(), Vpmg_energy(), Vpmg_qfAtomEnergy(), Vpmg_qfEnergy(), Vpmg_qmEnergy(), Vunit_kb, and Vunit_Na.
Referenced by main().
int forceAPOL | ( | Vacc * | acc, | |
Vmem * | mem, | |||
APOLparm * | apolparm, | |||
int * | nforce, | |||
AtomForce ** | atomForce, | |||
Valist * | alist, | |||
Vclist * | clist | |||
) |
Calculate non-polar forces.
acc | Accessiblity object | |
mem | Memory manager | |
apolparm | Apolar calculation parameter object | |
nforce | Number of atomic forces to calculate statements for | |
atomForce | Object for storing atom forces | |
alist | Atom list | |
clist | Cell list for accessibility object |
References ACF_COMPS, ACF_TOTAL, sVacc::alist, sAPOLparm::bconc, sAPOLparm::calcforce, sAPOLparm::dpos, sAPOLparm::gamma, sVacc::mem, sAPOLparm::press, sVacc::refSphere, sAPOLparm::srad, sPBEparm::srad, sVacc::surf, Vacc_atomdSASA(), Vacc_atomdSAV(), Vacc_atomSurf(), Vacc_wcaForceAtom(), Valist_getAtom(), Valist_getNumberAtoms(), Vatom_getPosition(), and VRC_SUCCESS.
Referenced by initAPOL().
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.
mem | Memory management object | |
nosh | Parameters from input file | |
pbeparm | Generic PBE parameters | |
mgparm | MG-specific parmaeters | |
pmg | MG object | |
nforce | Set to number of forces in arrays | |
atomForce | List of atom forces | |
alist | List of atom lists |
References APBS_TIMER_FORCE, sNOsh::bogus, sPBEparm::calcforce, sMGparm::chgm, sPBEparm::molid, PCF_COMPS, PCF_TOTAL, AtomForce::qfForce, sPBEparm::srfm, sPBEparm::temp, Valist_getNumberAtoms(), Vpmg_dbForce(), Vpmg_ibForce(), Vpmg_qfForce(), Vunit_kb, and Vunit_Na.
Referenced by main().
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.
nosh | Input parameter object | |
mem | Memory manager | |
param | Atom parameters | |
apolparm | Apolar calculation parameters | |
nforce | Number of force calculations | |
atomForce | Atom force storage object | |
alist | Atom list |
References sAPOLparm::bconc, sAPOLparm::calcenergy, sAPOLparm::calcforce, CLIST_AUTO_DOMAIN, sAPOLparm::dpos, energyAPOL(), sVparam_AtomData::epsilon, forceAPOL(), sAPOLparm::gamma, sAPOLparm::press, sVparam_AtomData::radius, sAPOLparm::sasa, sAPOLparm::sav, sAPOLparm::sdens, sAPOLparm::setwat, sAPOLparm::srad, sPBEparm::srad, Vacc_atomSASA(), Vacc_ctor(), Vacc_dtor(), Vacc_totalSASA(), Vacc_totalSAV(), Vacc_wcaEnergy(), Valist_getAtom(), Valist_getNumberAtoms(), Vatom_getCharge(), Vatom_getPosition(), Vatom_getRadius(), Vclist_ctor(), Vclist_dtor(), Vparam_getAtomData(), VRC_FAILURE, VRC_SUCCESS, sAPOLparm::watepsilon, and sAPOLparm::watsigma.
Referenced by main().
Vrc_Codes initFE | ( | int | icalc, | |
NOsh * | nosh, | |||
FEMparm * | feparm, | |||
PBEparm * | pbeparm, | |||
Vpbe * | pbe[NOSH_MAXCALC], | |||
Valist * | alist[NOSH_MAXMOL], | |||
Vfetk * | fetk[NOSH_MAXCALC], | |||
Gem * | gm[NOSH_MAXCALC] | |||
) |
Initialize FE solver objects.
nosh | Index in pb, fetk to initialize (calculation index) | |
feparm | Master parmaeter object | |
pbeparm | FE-specific parameters | |
pbe | Generic PBE parameters | |
alist | Array of PBE objects | |
fetk | Array of atom lists | |
gm | Array of finite element objects Array of geometry objects |
Referenced by main().
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.
icalc | Index of calculation in pmg/pmpg arrays | |
nosh | Object with parsed input file parameters | |
mgparm | Object with MG-specific parameters | |
pbeparm | Object with generic PBE parameters | |
realCenter | The actual center of the current mesh | |
pbe | Array of Vpbe objects (one for each calc) | |
alist | Array of atom lists | |
dielXMap | Array of x-shifted dielectric maps | |
dielYMap | Array of y-shifted dielectric maps | |
dielZMap | Array of z-shifted dielectric maps | |
kappaMap | Array of kappa maps | |
chargeMap | Array of charge maps | |
pmgp | Array of MG parameter objects (one for each calc) | |
pmg | Array of MG objects (one for each calc) |
References APBS_TIMER_SETUP, sPBEparm::bcfl, BCFL_FOCUS, sPBEparm::calcenergy, sMGparm::center, sPBEparm::chargeMapID, sMGparm::chgm, sPBEparm::dielMapID, sPBEparm::ionc, sPBEparm::ionq, sPBEparm::ionr, sPBEparm::kappaMapID, sPBEparm::Lmem, sPBEparm::mdie, sPBEparm::memv, sMGparm::method, sPBEparm::molid, sNOsh::ncharge, sNOsh::ndiel, sPBEparm::nion, sNOsh::nkappa, sMGparm::nonlintype, PBE_LPBE, PBE_LRPBE, PBE_NPBE, PBE_SMPBE, sPBEparm::pbetype, PCE_NO, sPBEparm::pdie, sPBEparm::sdens, sPBEparm::sdie, sPBEparm::smsize, sPBEparm::smvolume, sPBEparm::srad, sPBEparm::srfm, sPBEparm::swin, sPBEparm::temp, sMGparm::useAqua, sPBEparm::useChargeMap, sPBEparm::useDielMap, sPBEparm::useKappaMap, Valist_getAtom(), Valist_getNumberAtoms(), Vatom_getCharge(), Vpbe_ctor(), Vpbe_dtor(), Vpbe_getDeblen(), Vpmg_ctor(), Vpmg_dtor(), Vpmg_fillco(), Vpmgp_ctor(), Vpmgp_dtor(), VSM_SPLINE, and sPBEparm::zmem.
Referenced by main().
Destroy the loaded charge maps.
nosh | NOsh object with input file information | |
charge | List of charge maps |
References sNOsh::ncharge, and Vgrid_dtor().
Referenced by main().
void killDielMaps | ( | NOsh * | nosh, | |
Vgrid * | dielXMap[NOSH_MAXMOL], | |||
Vgrid * | dielYMap[NOSH_MAXMOL], | |||
Vgrid * | dielZMap[NOSH_MAXMOL] | |||
) |
Destroy the loaded dielectric.
nosh | NOsh object with input file information | |
dielXMap | List of x-shifted dielectric maps | |
dielYMap | List of y-shifted dielectric maps | |
dielZMap | List of x-shifted dielectric maps |
References sNOsh::ndiel, and Vgrid_dtor().
Referenced by main().
void killEnergy | ( | ) |
Kill arrays allocated for energies.
Referenced by main().
void killFE | ( | NOsh * | nosh, | |
Vpbe * | pbe[NOSH_MAXCALC], | |||
Vfetk * | fetk[NOSH_MAXCALC], | |||
Gem * | gem[NOSH_MAXMOL] | |||
) |
Kill structures initialized during an FE calculation.
pbe | Object with parsed input file parameters | |
fetk | Array of Vpbe objects for each calc | |
gem | Array of FEtk objects for each calc Array of geometry manager objects for each calc |
References sNOsh::ncalc, sNOsh::nmesh, Vfetk_dtor(), and Vpbe_dtor().
Referenced by main().
void killForce | ( | Vmem * | mem, | |
NOsh * | nosh, | |||
int | nforce[NOSH_MAXCALC], | |||
AtomForce * | atomForce[NOSH_MAXCALC] | |||
) |
Free memory from MG force calculation.
mem | Memory management object | |
nosh | Parameters from input file | |
nforce | Number of forces in arrays | |
atomForce | List of atom forces |
References sNOsh::ncalc.
Referenced by main().
Destroy the loaded kappa maps.
nosh | NOsh object with input file information | |
kappa | List of kappa maps |
References sNOsh::nkappa, and Vgrid_dtor().
Referenced by main().
void killMeshes | ( | NOsh * | nosh, | |
Gem * | alist[NOSH_MAXMOL] | |||
) |
Destroy the loaded meshes.
nosh | NOsh object with input file information | |
alist | Populated list of geometry objects to be destroyed |
void killMG | ( | NOsh * | nosh, | |
Vpbe * | pbe[NOSH_MAXCALC], | |||
Vpmgp * | pmgp[NOSH_MAXCALC], | |||
Vpmg * | pmg[NOSH_MAXCALC] | |||
) |
Kill structures initialized during an MG calculation.
pbe | Object with parsed input file parameters | |
pmgp | Array of Vpbe objects for each calc | |
pmg | Array of MG parameter objects for each calc Array of MG objects for each calc |
References sNOsh::ncalc, Vpbe_dtor(), Vpmg_dtor(), and Vpmgp_dtor().
Referenced by main().
Destroy the loaded molecules.
nosh | NOsh object with input file information | |
alist | List of atom list objects |
References sNOsh::nmol, and Valist_dtor().
Referenced by main().
Load the charge maps given in NOsh into grid objects.
nosh | NOsh object with input file information | |
charge | List of kappa maps |
References sNOsh::chargefmt, sNOsh::chargepath, sNOsh::kappafmt, sNOsh::ncharge, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, Vgrid_ctor(), and Vgrid_readDX().
Referenced by main().
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.
nosh | NOsh object with input file information | |
dielXMap | List of x-shifted dielectric maps | |
dielYMap | List of y-shifted dielectric maps | |
dielZMap | List of x-shifted dielectric maps |
References sNOsh::dielfmt, sNOsh::dielXpath, sNOsh::dielYpath, sNOsh::dielZpath, sNOsh::ndiel, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, Vgrid_ctor(), and Vgrid_readDX().
Referenced by main().
Load the kappa maps given in NOsh into grid objects.
nosh | NOsh object with input file information | |
kappa | List of kappa maps |
References sNOsh::kappafmt, sNOsh::kappapath, sNOsh::nkappa, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, Vgrid_ctor(), and Vgrid_readDX().
Referenced by main().
Vrc_Codes loadMeshes | ( | NOsh * | nosh, | |
Gem * | gm[NOSH_MAXMOL] | |||
) |
Load the meshes given in NOsh into geometry objects.
nosh | NOsh object with input file information | |
gm | List of geometry objects (to be populated) |
Load the molecules given in NOsh into atom lists.
nosh | NOsh object with input file information | |
param | NULL (if PQR files only) or pointer to parameter object | |
alist | List of atom list objects (to be populated) |
References sNOsh::gotparm, sNOsh::molfmt, sNOsh::molpath, NMF_PDB, NMF_PQR, NMF_XML, sNOsh::nmol, sNOsh::parmpath, Valist_ctor(), Valist_getNumberAtoms(), Valist_readPDB(), Valist_readPQR(), and Valist_readXML().
Referenced by main().
Loads and returns parameter object.
nosh | Pointer to NOsh object with input file information |
References sNOsh::gotparm, NPF_FLAT, NPF_XML, sNOsh::parmfmt, sNOsh::parmpath, Vparam_ctor(), Vparam_readFlatFile(), and Vparam_readXMLFile().
Referenced by main().
int main | ( | int | argc, | |
char ** | argv | |||
) |
The main APBS function.
argc | Number of arguments | |
argv | Argument strings |
References ACD_ERROR, APBS_TIMER_WALL_CLOCK, APBSRC, sNOsh::apol2calc, sNOsh::apolname, sNOsh_calc::apolparm, sNOsh::calc, sPBEparm::calcenergy, sNOsh_calc::calctype, sNOsh::elec2calc, sNOsh::elecname, energyFE(), energyMG(), sNOsh_calc::femparm, forceMG(), initAPOL(), initFE(), initMG(), killChargeMaps(), killDielMaps(), killEnergy(), killFE(), killForce(), killKappaMaps(), killMG(), killMolecules(), loadChargeMaps(), loadDielMaps(), loadKappaMaps(), loadMolecules(), loadParameter(), sFEMparm::maxsolve, sNOsh_calc::mgparm, sAPOLparm::molid, sNOsh::napol, sNOsh::ncalc, NCT_APOL, NCT_FEM, NCT_MG, sNOsh::nelec, NOsh_ctor(), NOsh_dtor(), NOSH_MAXCALC, NOSH_MAXMOL, NOsh_parseInput(), NOsh_setupApolCalc(), NOsh_setupElecCalc(), sNOsh::nprint, NPT_APOLENERGY, NPT_APOLFORCE, NPT_ELECENERGY, NPT_ELECFORCE, NPT_ENERGY, NPT_FORCE, OUTPUT_FLAT, OUTPUT_NULL, sNOsh_calc::pbeparm, PCE_COMPS, postRefineFE(), preRefineFE(), printApolEnergy(), printApolForce(), printElecEnergy(), printElecForce(), printEnergy(), printFEPARM(), printForce(), printMGPARM(), printPBEPARM(), sNOsh::printwhat, setPartMG(), solveFE(), solveMG(), startVio(), storeAtomEnergy(), sMGparm::type, Vparam_dtor(), VRC_SUCCESS, Vstring_strcasecmp(), writedataFE(), writedataFlat(), writedataMG(), and writematMG().
Partition mesh (if applicable).
i | Calculation index | |
nosh | Master parameter object | |
feparm | FE-specific parameters | |
fetk | Array of FE solver objects |
References Vfetk_setAtomColors().
Estimate error, mark mesh, and refine mesh after solve.
icalc | Calculation index | |
nosh | Master parameter object | |
feparm | FE-specific parameters | |
fetk | Array of FE solver objects |
References sFEMparm::akeySOLVE, sFEMparm::ekey, sFEMparm::etol, FRT_DUAL, FRT_GEOM, FRT_LOCA, FRT_RESI, FRT_UNIF, sFEMparm::maxvert, and sFEMparm::pkey.
Referenced by main().
Pre-refine mesh before solve.
i | Calculation index | |
nosh | Master parameter object | |
feparm | FE-specific parameters | |
fetk | Array of FE solver objects |
References sFEMparm::akeyPRE, sFEMparm::ekey, sFEMparm::etol, FRT_DUAL, FRT_GEOM, FRT_LOCA, FRT_RESI, FRT_UNIF, sFEMparm::pkey, sFEMparm::targetNum, and sFEMparm::targetRes.
Referenced by main().
int printApolEnergy | ( | NOsh * | nosh, | |
int | iprint | |||
) |
Combine and pretty-print energy data.
nosh | Parameters from input file | |
iprint | Index of energy statement to print |
References ACE_TOTAL, sNOsh::apol2calc, sNOsh::apolname, sNOsh_calc::apolparm, sNOsh::calc, sAPOLparm::calcenergy, sAPOLparm::gamma, sAPOLparm::press, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sAPOLparm::sasa, sAPOLparm::sav, and Vstring_strcasecmp().
Referenced by main().
int printApolForce | ( | Vcom * | com, | |
NOsh * | nosh, | |||
int | nforce[NOSH_MAXCALC], | |||
AtomForce * | atomForce[NOSH_MAXCALC], | |||
int | i | |||
) |
Combine and pretty-print force data.
nosh | Communications object | |
nforce | Parameters from input file | |
atomForce | Number of forces calculated | |
i | Array of force structures Index of force statement to print |
References ACF_COMPS, ACF_NO, ACF_TOTAL, sNOsh::apol2calc, sNOsh::apolname, sNOsh_calc::apolparm, sNOsh::calc, sAPOLparm::calcforce, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, AtomForce::sasaForce, AtomForce::savForce, sAPOLparm::temp, sPBEparm::temp, Vstring_strcasecmp(), and AtomForce::wcaForce.
Referenced by main().
int printElecEnergy | ( | Vcom * | com, | |
NOsh * | nosh, | |||
double | totEnergy[NOSH_MAXCALC], | |||
int | iprint | |||
) |
Combine and pretty-print energy data.
nosh | Communications object | |
totEnergy | Parameters from input file | |
iprint | Array of energies from different calculations Index of energy statement to print |
References sNOsh::calc, sPBEparm::calcenergy, sNOsh::elec2calc, sNOsh::elecname, sNOsh_calc::pbeparm, PCE_NO, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sPBEparm::temp, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Referenced by main().
int printElecForce | ( | Vcom * | com, | |
NOsh * | nosh, | |||
int | nforce[NOSH_MAXCALC], | |||
AtomForce * | atomForce[NOSH_MAXCALC], | |||
int | i | |||
) |
Combine and pretty-print force data.
nosh | Communications object | |
nforce | Parameters from input file | |
atomForce | Number of forces calculated | |
i | Array of force structures Index of force statement to print |
References sNOsh::calc, sPBEparm::calcforce, AtomForce::dbForce, sNOsh::elec2calc, sNOsh::elecname, AtomForce::ibForce, sNOsh_calc::pbeparm, PCF_COMPS, PCF_NO, PCF_TOTAL, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, AtomForce::qfForce, sPBEparm::temp, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Referenced by main().
int printEnergy | ( | Vcom * | com, | |
NOsh * | nosh, | |||
double | totEnergy[NOSH_MAXCALC], | |||
int | iprint | |||
) |
Combine and pretty-print energy data (deprecated...see printElecEnergy).
nosh | Communications object | |
totEnergy | Parameters from input file | |
iprint | Array of energies from different calculations Index of energy statement to print |
References sNOsh::calc, sPBEparm::calcenergy, sNOsh::elec2calc, sNOsh::elecname, sNOsh_calc::pbeparm, PCE_NO, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sPBEparm::temp, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Referenced by main().
Print out FE-specific params loaded from input.
icalc | Calculation index | |
nosh | Master parameter object | |
feparm | FE-specific parameters | |
fetk | Array of FE solver objects |
References sFEMparm::akeyPRE, sFEMparm::akeySOLVE, sNOsh::bogus, sFEMparm::ekey, sFEMparm::etol, FET_FRAC, FET_GLOB, FET_SIMP, FRT_DUAL, FRT_GEOM, FRT_LOCA, FRT_RESI, FRT_UNIF, sFEMparm::glen, sFEMparm::maxsolve, sFEMparm::maxvert, sFEMparm::targetNum, sFEMparm::targetRes, VGT_DIRI, VGT_PREV, VGT_ZERO, VLT_BCG, VLT_CG, VLT_MG, VLT_SLU, VNT_ARC, VNT_INC, VNT_NEW, VPT_DIAG, VPT_IDEN, and VPT_MG.
Referenced by main().
int printForce | ( | Vcom * | com, | |
NOsh * | nosh, | |||
int | nforce[NOSH_MAXCALC], | |||
AtomForce * | atomForce[NOSH_MAXCALC], | |||
int | i | |||
) |
Combine and pretty-print force data (deprecated...see printElecForce).
nosh | Communications object | |
nforce | Parameters from input file | |
atomForce | Number of forces calculated | |
i | Array of force structures Index of force statement to print |
References sNOsh::calc, sPBEparm::calcforce, AtomForce::dbForce, sNOsh::elec2calc, sNOsh::elecname, AtomForce::ibForce, sNOsh_calc::pbeparm, PCF_COMPS, PCF_NO, PCF_TOTAL, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, AtomForce::qfForce, sPBEparm::temp, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Referenced by main().
void printMGPARM | ( | MGparm * | mgparm, | |
double | realCenter[3] | |||
) |
Print out MG-specific params loaded from input.
realCenter | Center of mesh for actual calculation | |
mgparm | MGparm object |
References sMGparm::chgm, sMGparm::dime, sMGparm::glen, sMGparm::grid, MCT_PARALLEL, sMGparm::nlev, sMGparm::ofrac, sMGparm::pdime, and sMGparm::type.
Referenced by main().
void printPBEPARM | ( | PBEparm * | pbeparm | ) |
Print out generic PBE params loaded from input.
pbeparm | PBEparm object |
References sPBEparm::bcfl, BCFL_FOCUS, BCFL_MDH, BCFL_MEM, BCFL_SDH, BCFL_ZERO, sPBEparm::calcenergy, sPBEparm::calcforce, sPBEparm::ionc, sPBEparm::ionq, sPBEparm::ionr, sPBEparm::molid, sPBEparm::nion, sPBEparm::numwrite, PBE_LPBE, PBE_LRPBE, PBE_NPBE, PBE_SMPBE, sPBEparm::pbetype, PCE_NO, PCF_COMPS, PCF_TOTAL, sPBEparm::pdie, sPBEparm::sdie, sPBEparm::smsize, sPBEparm::smvolume, sPBEparm::srad, sPBEparm::srfm, sPBEparm::swin, sPBEparm::temp, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, VDT_CHARGE, VDT_DIELX, VDT_DIELY, VDT_DIELZ, VDT_EDENS, VDT_IVDW, VDT_KAPPA, VDT_LAP, VDT_NDENS, VDT_POT, VDT_QDENS, VDT_SMOL, VDT_SSPL, VDT_VDW, sPBEparm::writefmt, sPBEparm::writestem, and sPBEparm::writetype.
Referenced by main().
double returnEnergy | ( | Vcom * | com, | |
NOsh * | nosh, | |||
double | totEnergy[NOSH_MAXCALC], | |||
int | iprint | |||
) |
Access net local energy.
com | Communications object | |
nosh | Parameters from input file | |
totEnergy | Array of energies from different calculations | |
iprint | Index of energy statement to print |
References sNOsh::calc, sPBEparm::calcenergy, sNOsh::elec2calc, sNOsh_calc::pbeparm, PCE_NO, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sPBEparm::temp, Vunit_kb, and Vunit_Na.
Set MG partitions for calculating observables and performing I/O.
nosh | Object with parsed input file parameters | |
mgparm | MG parameters from input file | |
pmg | MG object |
References sNOsh::bogus, sMGparm::center, sMGparm::glen, MCT_PARALLEL, sMGparm::partDisjCenter, sMGparm::partDisjLength, sMGparm::partDisjOwnSide, sMGparm::type, and Vpmg_setPart().
Referenced by main().
Solve-estimate-refine.
i | Calculation index | |
nosh | Master parameter object | |
feparm | FE-specific parameters | |
pbeparm | Generic PBE parameters | |
fetk | Array of FE solver objects |
< AM_hPcg
< Coarse-grid solver; 0 = SLU, 1 = MG, 2 = CG, 3 = BCG, 4 = PCG, 5 = PBCG
< Primal problem
< Preconditioner; 0 = identity.
References PBE_LPBE, PBE_LRPBE, PBE_NPBE, PBE_SMPBE, and sPBEparm::pbetype.
Referenced by main().
int solveMG | ( | NOsh * | nosh, | |
Vpmg * | pmg, | |||
MGparm_CalcType | type | |||
) |
Solve the PBE with MG.
nosh | Object with parsed input file parameters | |
pmg | MG objects for this calculation | |
type | Type of MG calculation |
References APBS_TIMER_SOLVER, sNOsh::bogus, MCT_DUMMY, sVpmgp::nx, sVpmgp::ny, sVpmgp::nz, sVpmg::pmgp, sVpmg::u, and Vpmg_solve().
Referenced by main().
void startVio | ( | ) |
Wrapper to start MALOC Vio layer.
Referenced by main().
void storeAtomEnergy | ( | Vpmg * | pmg, | |
int | icalc, | |||
double ** | atomEnergy, | |||
int * | nenergy | |||
) |
Store energy in arrays for future use.
pmg | MG object | |
icalc | Calculation number | |
atomEnergy | Pointer to storage array of doubles | |
nenergy | Stores number of atoms per calc |
References sVpbe::alist, sVpmg::pbe, Valist_getAtom(), Valist_getNumberAtoms(), sVpmg::vmem, and Vpmg_qfAtomEnergy().
Referenced by main().
Write FEM data to files.
rank | Rank of processor (for parallel runs) | |
nosh | NOsh object | |
pbeparm | PBEparm object | |
fetk | FEtk object (with solution) |
References sVfetk::am, sNOsh::bogus, sNOsh::ispara, sPBEparm::numwrite, sNOsh::proc_rank, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, VDT_CHARGE, VDT_DIELX, VDT_DIELY, VDT_DIELZ, VDT_EDENS, VDT_IVDW, VDT_KAPPA, VDT_LAP, VDT_NDENS, VDT_POT, VDT_QDENS, VDT_SMOL, VDT_SSPL, VDT_VDW, Vfetk_fillArray(), Vfetk_write(), sPBEparm::writefmt, sPBEparm::writestem, and sPBEparm::writetype.
Referenced by main().
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.
nosh | Parameters from input file | |
com | The communications object | |
fname | The target XML file name | |
totEnergy | An array with per-calc total energies (in kT) | |
qfEnergy | An array with per-calc charge-potential energies (in kT) | |
qmEnergy | An array with per-calc mobile energies (in kT) | |
dielEnergy | An array with per-calc polarization energies (in kT) | |
nenergy | An array containing the number of atoms per-calc | |
atomEnergy | An array containing per-atom energies (in KT) per calc | |
nforce | An array containing the number of forces calculated per-calc | |
atomForce | An array containing per-atom forces per calc |
References sPBEparm::bcfl, BCFL_FOCUS, BCFL_MDH, BCFL_MEM, BCFL_SDH, BCFL_ZERO, sNOsh::bogus, sNOsh::calc, sPBEparm::calcenergy, sPBEparm::calcforce, sMGparm::dime, sNOsh::elec2calc, sNOsh::elecname, sMGparm::glen, sMGparm::grid, sPBEparm::ionc, sPBEparm::ionq, sPBEparm::ionr, MCT_AUTO, MCT_DUMMY, MCT_MANUAL, MCT_PARALLEL, sNOsh_calc::mgparm, sPBEparm::molid, sNOsh::nelec, sPBEparm::nion, sNOsh::nprint, NPT_ENERGY, PBE_LPBE, PBE_NPBE, sNOsh_calc::pbeparm, sPBEparm::pbetype, PCE_COMPS, PCE_TOTAL, PCF_TOTAL, sPBEparm::pdie, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sNOsh::printwhat, sPBEparm::sdie, sPBEparm::srad, sPBEparm::srfm, sPBEparm::temp, sMGparm::type, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Referenced by main().
Write out observables from MG calculation to file.
rank | Processor rank (if parallel calculation) | |
nosh | Parameters from input file | |
pbeparm | Generic PBE parameters | |
pmg | MG object |
References sNOsh::bogus, sVpmgp::hx, sVpmgp::hy, sVpmgp::hzed, sNOsh::ispara, sVpbe::maxIonRadius, sPBEparm::numwrite, sVpmgp::nx, sVpmgp::ny, sVpmgp::nz, sVpmg::pbe, sPBEparm::pbetype, sVpmg::pmgp, sNOsh::proc_rank, sVpmg::pvec, sVpmg::rwork, sPBEparm::srad, sPBEparm::swin, VDF_AVS, VDF_DX, VDF_MCSF, VDF_UHBD, VDT_CHARGE, VDT_DIELX, VDT_DIELY, VDT_DIELZ, VDT_EDENS, VDT_IVDW, VDT_KAPPA, VDT_LAP, VDT_NDENS, VDT_POT, VDT_QDENS, VDT_SMOL, VDT_SSPL, VDT_VDW, Vgrid_ctor(), Vgrid_dtor(), Vgrid_writeDX(), Vgrid_writeUHBD(), Vpmg_fillArray(), sPBEparm::writefmt, sPBEparm::writestem, sPBEparm::writetype, sVpmgp::xcent, sVpmgp::ycent, and sVpmgp::zcent.
Referenced by main().
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.
nosh | Parameters from input file | |
com | The communications object | |
fname | The target XML file name | |
totEnergy | An array with per-calc total energies (in kT) | |
qfEnergy | An array with per-calc charge-potential energies (in kT) | |
qmEnergy | An array with per-calc mobile energies (in kT) | |
dielEnergy | An array with per-calc polarization energies (in kT) | |
nenergy | An array containing the number of atoms per-calc | |
atomEnergy | An array containing per-atom energies (in KT) per calc | |
nforce | An array containing the number of forces calculated per-calc | |
atomForce | An array containing per-atom forces per calc |
References sPBEparm::bcfl, BCFL_FOCUS, BCFL_MDH, BCFL_MEM, BCFL_SDH, BCFL_ZERO, sNOsh::bogus, sNOsh::calc, sPBEparm::calcenergy, sPBEparm::calcforce, sMGparm::dime, sNOsh::elec2calc, sNOsh::elecname, sMGparm::glen, sMGparm::grid, sPBEparm::ionc, sPBEparm::ionq, sPBEparm::ionr, MCT_AUTO, MCT_DUMMY, MCT_MANUAL, MCT_PARALLEL, sNOsh_calc::mgparm, sPBEparm::molid, sNOsh::nelec, sPBEparm::nion, sNOsh::nprint, NPT_ENERGY, PBE_LPBE, PBE_NPBE, sNOsh_calc::pbeparm, sPBEparm::pbetype, PCE_COMPS, PCE_TOTAL, PCF_TOTAL, sPBEparm::pdie, sNOsh::printcalc, sNOsh::printnarg, sNOsh::printop, sNOsh::printwhat, sPBEparm::sdie, sPBEparm::srad, sPBEparm::srfm, sPBEparm::temp, sMGparm::type, Vstring_strcasecmp(), Vunit_kb, and Vunit_Na.
Write out operator matrix from MG calculation to file.
rank | Processor rank (if parallel calculation) | |
nosh | Parameters from input file | |
pbeparm | Generic PBE parameters | |
pmg | MG object |
References sNOsh::bogus, sNOsh::ispara, sNOsh::proc_rank, Vpmg_printColComp(), sPBEparm::writemat, sPBEparm::writematflag, and sPBEparm::writematstem.
Referenced by main().