118 char *input_path = VNULL,
119 *output_path = VNULL;
147 double realCenter[3];
150 char header[] = {
"\n\n\ 151 ----------------------------------------------------------------------\n\ 152 APBS -- Adaptive Poisson-Boltzmann Solver\n\ 153 Version " PACKAGE_STRING
"\n\ 155 Nathan A. Baker (nathan.baker@pnnl.gov)\n\ 156 Pacific Northwest National Laboratory\n\ 158 Additional contributing authors listed in the code documentation.\n\ 160 Copyright (c) 2010-2012 Battelle Memorial Institute. Developed at the Pacific\n\ 161 Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific\n\ 162 Northwest Division for the U.S. Department of Energy.\n\ 164 Portions Copyright (c) 2002-2010, Washington University in St. Louis.\n\ 165 Portions Copyright (c) 2002-2010, Nathan A. Baker.\n\ 166 Portions Copyright (c) 1999-2002, The Regents of the University of California.\n\ 167 Portions Copyright (c) 1995, Michael Holst.\n\ 168 All rights reserved.\n\ 170 Redistribution and use in source and binary forms, with or without\n\ 171 modification, are permitted provided that the following conditions are met:\n\ 173 * Redistributions of source code must retain the above copyright notice, this\n\ 174 list of conditions and the following disclaimer.\n\ 176 * Redistributions in binary form must reproduce the above copyright notice,\n\ 177 this list of conditions and the following disclaimer in the documentation\n\ 178 and/or other materials provided with the distribution.\n\ 180 * Neither the name of the developer nor the names of its contributors may be\n\ 181 used to endorse or promote products derived from this software without\n\ 182 specific prior written permission.\n\ 184 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\ 185 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\ 186 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\ 187 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n\ 188 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\ 189 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\ 190 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n\ 191 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\ 192 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\ 193 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\ 194 ----------------------------------------------------------------------\n\ 195 APBS uses FETK (the Finite Element ToolKit) to solve the\n\ 196 Poisson-Boltzmann equation numerically. FETK is a portable collection\n\ 197 of finite element modeling class libraries developed by the Michael Holst\n\ 198 research group and written in an object-oriented form of C. FEtk is\n\ 199 designed to solve general coupled systems of nonlinear partial differential\n\ 200 equations using adaptive finite element methods, inexact Newton methods,\n\ 201 and algebraic multilevel methods. More information about FEtk may be found\n\ 202 at <http://www.FEtk.ORG>.\n\ 203 ----------------------------------------------------------------------\n\ 204 APBS also uses Aqua to solve the Poisson-Boltzmann equation numerically. \n\ 205 Aqua is a modified form of the Holst group PMG library <http://www.FEtk.ORG>\n\ 206 which has been modified by Patrice Koehl\n\ 207 <http://koehllab.genomecenter.ucdavis.edu/> for improved efficiency and\n\ 208 memory usage when solving the Poisson-Boltzmann equation.\n\ 209 ----------------------------------------------------------------------\n\ 210 Please cite your use of APBS as:\n\n\ 211 Baker NA, Sept D, Joseph S, Holst MJ, McCammon JA. Electrostatics of\n\ 212 nanosystems: application to microtubules and the ribosome. Proc.\n\ 213 Natl. Acad. Sci. USA 98, 10037-10041 2001.\n\ 217 ----------------------------------------------------------------------\n\ 218 This driver program calculates electrostatic potentials, energies,\n\ 219 and forces using both multigrid and finite element methods.\n\ 220 It is invoked as:\n\n\ 221 apbs [options] apbs.in\n\n\ 222 where apbs.in is a formatted input file and [options] are:\n\n\ 223 --output-file=<name> Enables output logging to the path\n\ 224 listed in <name>. Uses flat-file\n\ 225 format is --output-format is not used.\n\ 226 --output-format=<type> Specifies format for logging. Options\n\ 227 for type are either \"xml\" or \"flat\".\n\ 228 --help Display this help information.\n\ 229 --version Display the current APBS version.\n\ 230 ----------------------------------------------------------------------\n\n"};
233 VASSERT(Vcom_init(&argc, &argv));
235 rank = Vcom_rank(com);
236 size = Vcom_size(com);
238 Vnm_setIoTag(rank, size);
239 Vnm_tprint( 0,
"Hello world from PE %d\n", rank);
242 mem = Vmem_ctor(
"MAIN");
252 atomForce[i] = VNULL;
263 chargeMap[i] = VNULL;
268 Vnm_tprint( 1,
"%s", header);
271 Vnm_tprint(, 2
"WARNING: APBS was compiled with the --enable-fast option.\n" 272 "WARNING: This mode is experimental and subject to change in future releases.\n" 273 "WARNING: The fast mode enables: Gauess-Seidel Smoothing and \n" 274 "WARNING: Conjugate Gradient Multigrid methods.\n\n");
277 Vnm_tprint( 1,
"This executable compiled on %s at %s\n\n", __DATE__, __TIME__);
279 #if defined(WITH_TINKER) 280 Vnm_tprint( 2,
"This executable was compiled with TINKER support and is not intended for stand-alone execution.\n");
281 Vnm_tprint( 2,
"Please compile another version without TINKER support.\n");
289 if (strncmp(argv[i],
"--", 2) == 0) {
293 Vnm_tprint(2,
"%s\n", PACKAGE_STRING);
296 Vnm_tprint(2,
"%s\n", usage);
298 }
else if (strncmp(argv[i],
"--output-format", 15) == 0) {
299 if (strstr(argv[i],
"xml") != NULL) {
300 Vnm_tprint(2,
"XML output format is now deprecated, please use --output-format=flat instead!\n\n");
303 else if (strstr(argv[i],
"flat") != NULL) {
306 Vnm_tprint(2,
"Invalid output-format type!\n");
309 }
else if (strncmp(argv[i],
"--output-file=", 14) == 0){
310 output_path = strstr(argv[i],
"=");
314 Vnm_tprint(2,
"UNRECOGNIZED COMMAND LINE OPTION %s!\n", argv[i]);
315 Vnm_tprint(2,
"%s\n", usage);
321 if ((input_path == VNULL) && (i != 0))
322 input_path = argv[i];
324 Vnm_tprint(2,
"ERROR -- CALLED WITH TOO MANY ARGUMENTS!\n", \
326 Vnm_tprint(2,
"%s\n", usage);
334 if ((outputformat != 0) && (output_path == NULL)) {
335 Vnm_tprint(2,
"The --output-path variable must be set when using --output-format!\n");
340 if (input_path == NULL) {
341 Vnm_tprint(2,
"ERROR -- APBS input file not specified!\n", argc);
342 Vnm_tprint(2,
"%s\n", usage);
347 if ((size > 1) && (output_path != NULL))
348 printf(output_path,
"%s_%d", output_path, rank);
352 Vnm_tprint( 1,
"Parsing input file %s...\n", input_path);
353 sock = Vio_ctor(
"FILE",
"ASC", VNULL, input_path,
"r");
355 Vnm_tprint(2,
"Error while opening input file %s!\n", input_path);
359 Vnm_tprint( 2,
"Error while parsing input file.\n");
363 Vnm_tprint( 1,
"Parsed input file.\n");
369 Vnm_tprint(2,
"Error reading molecules!\n");
375 Vnm_tprint(2,
"Error setting up ELEC calculations\n");
380 Vnm_tprint(2,
"Error setting up APOL calculations\n");
391 #if defined(DEBUG_MAC_OSX_OCL) 392 #include "mach_chud.h" 399 int ret = initOpenCL();
400 printf(
"OpenCL runtime present - initialized = %i\n",ret);
404 setkOpenCLAvailable_(0);
405 printf(
"OpenCL is not present!\n");
409 #if defined(DEBUG_MAC_OSX_STANDARD) 410 #include "mach_chud.h" 417 if (
loadDielMaps(nosh, dielXMap, dielYMap, dielZMap) != 1) {
418 Vnm_tprint(2,
"Error reading dielectric maps!\n");
422 Vnm_tprint(2,
"Error reading kappa maps!\n");
426 Vnm_tprint(2,
"Error reading potential maps!\n");
430 Vnm_tprint(2,
"Error reading charge maps!\n");
435 Vnm_tprint( 1,
"Preparing to run %d PBE calculations.\n",
437 for (i=0; i<nosh->
ncalc; i++) {
438 Vnm_tprint( 1,
"----------------------------------------\n");
445 for (k=0; k<nosh->
nelec; k++) {
451 Vnm_tprint( 1,
"CALCULATION #%d: MULTIGRID\n", i+1);
453 Vnm_tprint( 1,
"CALCULATION #%d (%s): MULTIGRID\n",
461 Vnm_tprint( 1,
" Setting up problem...\n");
463 if (!
initMG(i, nosh, mgparm, pbeparm, realCenter, pbe,
464 alist, dielXMap, dielYMap, dielZMap, kappaMap,
465 chargeMap, pmgp, pmg, potMap)) {
466 Vnm_tprint( 2,
"Error setting up MG calculation!\n");
476 Vnm_tprint(2,
"Error solving PDE!\n");
481 if (
setPartMG(nosh, mgparm, pmg[i]) != 1) {
482 Vnm_tprint(2,
"Error setting partition info!\n");
488 &(nenergy[i]), &(totEnergy[i]), &(qfEnergy[i]),
489 &(qmEnergy[i]), &(dielEnergy[i]));
492 forceMG(mem, nosh, pbeparm, mgparm, pmg[i], &(nforce[i]),
493 &(atomForce[i]), alist);
515 for (k=0; k<nosh->
nelec; k++) {
519 Vnm_tprint( 1,
"CALCULATION #%d: FINITE ELEMENT\n", i+1);
521 Vnm_tprint( 1,
"CALCULATION #%d (%s): FINITE ELEMENT\n", i+1, nosh->
elecname[k+1]);
529 Vnm_tprint(2,
"#################### WARNING ###################\n");
530 Vnm_tprint(2,
"## FE support is currently very experimental! ##\n");
531 Vnm_tprint(2,
"#################### WARNING ###################\n");
534 Vnm_tprint( 1,
" Setting up problem...\n");
540 Vnm_tprint( 2,
"Error setting up FE calculation!\n");
555 Vnm_tprint( 2,
"Error pre-refining mesh!\n");
560 Vnm_tprint(2,
"\n\nWARNING! DO NOT EXPECT PERFORMANCE OUT OF THE APBS/FEtk\n");
561 Vnm_tprint(2,
"INTERFACE AT THIS TIME. THE FINITE ELEMENT SOLVER IS\n");
562 Vnm_tprint(2,
"CURRENTLY NOT OPTIMIZED FOR THE PB EQUATION. IF YOU WANT\n");
563 Vnm_tprint(2,
"PERFORMANCE, PLEASE USE THE MULTIGRID-BASED METHODS, E.G.\n");
564 Vnm_tprint(2,
"MG-AUTO, MG-PARA, and MG-MANUAL (SEE DOCS.)\n\n");
565 Vnm_tprint(1,
" Beginning solve-estimate-refine cycle:\n");
567 for (isolve=0; isolve<feparm->
maxsolve; isolve++) {
568 Vnm_tprint(1,
" Solve #%d...\n", isolve);
571 if (!
solveFE(i, pbeparm, feparm, fetk)) {
572 Vnm_tprint(2,
"ERROR SOLVING EQUATION!\n");
577 if (!
energyFE(nosh, i, fetk, &(nenergy[i]),
578 &(totEnergy[i]), &(qfEnergy[i]),
579 &(qmEnergy[i]), &(dielEnergy[i]))) {
580 Vnm_tprint(2,
"ERROR SOLVING EQUATION!\n");
586 if (isolve < (feparm->
maxsolve)-1) {
592 bytesTotal = Vmem_bytesTotal();
593 highWater = Vmem_highWaterTotal();
594 Vnm_tprint(1,
" Current memory use: %g MB\n",
595 ((
double)bytesTotal/(1024.)/(1024.)));
596 Vnm_tprint(1,
" High-water memory use: %g MB\n",
597 ((
double)highWater/(1024.)/(1024.)));
600 Vnm_tprint(1,
" Writing FEM data to files.\n");
604 Vnm_tprint(2,
" Error while writing FEM data!\n");
607 Vnm_print(2,
"Error! APBS not compiled with FEtk!\n");
617 for (k=0; k<nosh->
napol; k++) {
624 Vnm_tprint( 1,
"CALCULATION #%d: APOLAR\n", i+1);
626 Vnm_tprint( 1,
"CALCULATION #%d (%s): APOLAR\n",
633 rc =
initAPOL(nosh, mem, param, apolparm, &(nforce[i]), &(atomForce[i]),
634 alist[(apolparm->
molid)-1]);
635 Vnm_print(0,
"initAPOL: Time elapsed: %f\n", ((
double)clock() - ts) / CLOCKS_PER_SEC);
637 Vnm_tprint(2,
"Error calculating apolar solvation quantities!\n");
642 Vnm_tprint(2,
" Unknown calculation type (%d)!\n",
653 Vnm_tprint( 1,
"----------------------------------------\n");
654 Vnm_tprint( 1,
"PRINT STATEMENTS\n");
656 for (i=0; i<nosh->
nprint; i++) {
672 Vnm_tprint( 2,
"Undefined PRINT keyword!\n");
676 Vnm_tprint( 1,
"----------------------------------------\n");
681 Vnm_tprint(2,
" Writing data to flat file %s...\n\n", output_path);
682 writedataFlat(nosh, com, output_path, totEnergy, qfEnergy, qmEnergy,
683 dielEnergy, nenergy, atomEnergy, nforce, atomForce);
688 for (i=0; i<nosh->
ncalc; i++) {
689 if (nenergy[i] > 0) Vmem_free(mem, nenergy[i],
sizeof(
double),
690 (
void **)&(atomEnergy[i]));
695 Vnm_tprint( 1,
"CLEANING UP AND SHUTTING DOWN...\n");
699 killMG(nosh, pbe, pmgp, pmg);
701 killFE(nosh, pbe, fetk, gm);
710 bytesTotal = Vmem_bytesTotal();
711 highWater = Vmem_highWaterTotal();
712 Vnm_tprint( 1,
"Final memory usage: %4.3f MB total, %4.3f MB high water\n",
713 (
double)(bytesTotal)/(1024.*1024.),
714 (
double)(highWater)/(1024.*1024.));
721 Vnm_tprint(1,
"\n\n");
722 Vnm_tprint( 1,
"Thanks for using APBS!\n\n");
724 #if defined(DEBUG_MAC_OSX_OCL) 725 mets_(&mbeg,
"Main Program CL");
727 #if defined(DEBUG_MAC_OSX_STANDARD) 728 mets_(&mbeg,
"Main Program Standard");
VPUBLIC int NOsh_setupApolCalc(NOsh *thee, Valist *alist[NOSH_MAXMOL])
Setup the series of non-polar calculations.
enum eVoutput_Format Voutput_Format
Declaration of the Voutput_Format type as the VOutput_Format enum.
int apol2calc[NOSH_MAXCALC]
VPUBLIC Vparam * loadParameter(NOsh *nosh)
Loads and returns parameter object.
#define NOSH_MAXMOL
Maximum number of molecules in a run.
Contains public data members for Vpbe class/module.
VPUBLIC int loadChargeMaps(NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
Load the charge maps given in NOsh into grid objects.
NOsh_PrintType printwhat[NOSH_MAXPRINT]
Electrostatic potential oracle for Cartesian mesh data.
#define APBS_TIMER_WALL_CLOCK
APBS total execution timer ID.
VPUBLIC void NOsh_dtor(NOsh **thee)
Object destructor.
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.
char elecname[NOSH_MAXCALC][VMAX_ARGLEN]
VPUBLIC int postRefineFE(int icalc, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
Estimate error, mark mesh, and refine mesh after solve.
NOsh_calc * calc[NOSH_MAXCALC]
Contains public data members for Vpmg class/module.
VPUBLIC int solveMG(NOsh *nosh, Vpmg *pmg, MGparm_CalcType type)
Solve the PBE with MG.
VPUBLIC int writematMG(int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg)
Write out operator matrix from MG calculation to file.
VPUBLIC int setPartMG(NOsh *nosh, MGparm *mgparm, Vpmg *pmg)
Set MG partitions for calculating observables and performing I/O.
Header file for front end auxiliary routines.
VPUBLIC void killChargeMaps(NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
Destroy the loaded charge maps.
VPUBLIC void killForce(Vmem *mem, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC])
Free memory from MG force calculation.
VPUBLIC int loadKappaMaps(NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
Load the kappa maps given in NOsh into grid objects.
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 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], Vgrid *potMap[NOSH_MAXMOL])
Initialize an MG calculation.
VPUBLIC void storeAtomEnergy(Vpmg *pmg, int icalc, double **atomEnergy, int *nenergy)
Store energy in arrays for future use.
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 printApolForce(Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int iprint)
Combine and pretty-print force data.
VPUBLIC void printFEPARM(int icalc, NOsh *nosh, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
Print out FE-specific params loaded from input.
VPUBLIC void killFE(NOsh *nosh, Vpbe *pbe[NOSH_MAXCALC], Vfetk *fetk[NOSH_MAXCALC], Gem *gm[NOSH_MAXMOL])
Kill structures initialized during an FE calculation.
VPUBLIC int printElecEnergy(Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint)
Combine and pretty-print energy data.
VPUBLIC void killKappaMaps(NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
Destroy the loaded kappa maps.
#define VEMBED(rctag)
Allows embedding of RCS ID tags in object files.
VPUBLIC int NOsh_setupElecCalc(NOsh *thee, Valist *alist[NOSH_MAXMOL])
Setup the series of electrostatics calculations.
VPUBLIC int NOsh_parseInput(NOsh *thee, Vio *sock)
Parse an input file from a socket.
VPUBLIC void Vparam_dtor(Vparam **thee)
Destroy object.
VPUBLIC int Vstring_strcasecmp(const char *s1, const char *s2)
Case-insensitive string comparison (BSD standard)
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 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 void printPBEPARM(PBEparm *pbeparm)
Print out generic PBE params loaded from input.
VPUBLIC int writedataMG(int rank, NOsh *nosh, PBEparm *pbeparm, Vpmg *pmg)
Write out observables from MG calculation to file.
Parameter structure for FEM-specific variables from input files.
Structure to hold atomic forces.
Reads and assigns charge/radii parameters.
Contains public data members for Vpmgp class/module.
PBEparm_calcEnergy calcenergy
VPUBLIC int printEnergy(Vcom *com, NOsh *nosh, double totEnergy[NOSH_MAXCALC], int iprint)
Combine and pretty-print energy data (deprecated...see printElecEnergy)
VPUBLIC int loadPotMaps(NOsh *nosh, Vgrid *map[NOSH_MAXMOL])
Load the potential maps given in NOsh into grid objects.
Parameter structure for PBE variables from input files.
VPUBLIC void killMolecules(NOsh *nosh, Valist *alist[NOSH_MAXMOL])
Destroy the loaded molecules.
int main(int argc, char **argv)
The main APBS function.
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.
Parameter structure for MG-specific variables from input files.
VPUBLIC void killDielMaps(NOsh *nosh, Vgrid *dielXMap[NOSH_MAXMOL], Vgrid *dielYMap[NOSH_MAXMOL], Vgrid *dielZMap[NOSH_MAXMOL])
Destroy the loaded dielectric.
VPUBLIC Vrc_Codes 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 int printElecForce(Vcom *com, NOsh *nosh, int nforce[NOSH_MAXCALC], AtomForce *atomForce[NOSH_MAXCALC], int iprint)
Combine and pretty-print force data.
VPUBLIC NOsh * NOsh_ctor(int rank, int size)
Construct NOsh.
VPUBLIC void printMGPARM(MGparm *mgparm, double realCenter[3])
Print out MG-specific params loaded from input.
VPUBLIC int printApolEnergy(NOsh *nosh, int iprint)
Combine and pretty-print energy data.
Container class for list of atom objects.
Class for parsing fixed format input files.
int elec2calc[NOSH_MAXCALC]
Contains public data members for Vfetk class/module.
VPUBLIC int loadMolecules(NOsh *nosh, Vparam *param, Valist *alist[NOSH_MAXMOL])
Load the molecules given in NOsh into atom lists.
#define APBSRC
Return code for APBS during failure.
#define NOSH_MAXCALC
Maximum number of calculations in a run.
VPUBLIC int solveFE(int icalc, PBEparm *pbeparm, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
Solve-estimate-refine.
VPUBLIC void startVio()
Wrapper to start MALOC Vio layer.
char apolname[NOSH_MAXCALC][VMAX_ARGLEN]
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.
Parameter structure for APOL-specific variables from input files.
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 preRefineFE(int icalc, FEMparm *feparm, Vfetk *fetk[NOSH_MAXCALC])
Pre-refine mesh before solve.
VPUBLIC int writedataFE(int rank, NOsh *nosh, PBEparm *pbeparm, Vfetk *fetk)
Write FEM data to files.
VPUBLIC void killEnergy()
Kill arrays allocated for energies.