100 #if defined(ENABLE_PBAM) || defined(ENABLE_PBSAM) 129 char *input_path = VNULL,
130 *output_path = VNULL;
158 double realCenter[3];
161 char header[] = {
"\n\n\ 162 ----------------------------------------------------------------------\n\ 163 APBS -- Adaptive Poisson-Boltzmann Solver\n\ 164 Version " PACKAGE_STRING
"\n\ 166 Nathan A. Baker (nathan.baker@pnnl.gov)\n\ 167 Pacific Northwest National Laboratory\n\ 169 Additional contributing authors listed in the code documentation.\n\ 171 Copyright (c) 2010-2014 Battelle Memorial Institute. Developed at the Pacific\n\ 172 Northwest National Laboratory, operated by Battelle Memorial Institute, Pacific\n\ 173 Northwest Division for the U.S. Department of Energy.\n\ 175 Portions Copyright (c) 2002-2010, Washington University in St. Louis.\n\ 176 Portions Copyright (c) 2002-2010, Nathan A. Baker.\n\ 177 Portions Copyright (c) 1999-2002, The Regents of the University of California.\n\ 178 Portions Copyright (c) 1995, Michael Holst.\n\ 179 All rights reserved.\n\ 181 Redistribution and use in source and binary forms, with or without\n\ 182 modification, are permitted provided that the following conditions are met:\n\ 184 * Redistributions of source code must retain the above copyright notice, this\n\ 185 list of conditions and the following disclaimer.\n\ 187 * Redistributions in binary form must reproduce the above copyright notice,\n\ 188 this list of conditions and the following disclaimer in the documentation\n\ 189 and/or other materials provided with the distribution.\n\ 191 * Neither the name of the developer nor the names of its contributors may be\n\ 192 used to endorse or promote products derived from this software without\n\ 193 specific prior written permission.\n\ 195 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n\ 196 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n\ 197 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n\ 198 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n\ 199 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n\ 200 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n\ 201 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n\ 202 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n\ 203 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n\ 204 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\ 205 ----------------------------------------------------------------------\n\ 206 APBS uses FETK (the Finite Element ToolKit) to solve the\n\ 207 Poisson-Boltzmann equation numerically. FETK is a portable collection\n\ 208 of finite element modeling class libraries developed by the Michael Holst\n\ 209 research group and written in an object-oriented form of C. FEtk is\n\ 210 designed to solve general coupled systems of nonlinear partial differential\n\ 211 equations using adaptive finite element methods, inexact Newton methods,\n\ 212 and algebraic multilevel methods. More information about FEtk may be found\n\ 213 at <http://www.FEtk.ORG>.\n\ 214 ----------------------------------------------------------------------\n\ 215 APBS also uses Aqua to solve the Poisson-Boltzmann equation numerically. \n\ 216 Aqua is a modified form of the Holst group PMG library <http://www.FEtk.ORG>\n\ 217 which has been modified by Patrice Koehl\n\ 218 <http://koehllab.genomecenter.ucdavis.edu/> for improved efficiency and\n\ 219 memory usage when solving the Poisson-Boltzmann equation.\n\ 220 ----------------------------------------------------------------------\n\ 221 Please cite your use of APBS as:\n\n\ 222 Baker NA, Sept D, Joseph S, Holst MJ, McCammon JA. Electrostatics of\n\ 223 nanosystems: application to microtubules and the ribosome. Proc.\n\ 224 Natl. Acad. Sci. USA 98, 10037-10041 2001.\n\ 228 ----------------------------------------------------------------------\n\ 229 This driver program calculates electrostatic potentials, energies,\n\ 230 and forces using both multigrid and finite element methods.\n\ 231 It is invoked as:\n\n\ 232 apbs [options] apbs.in\n\n\ 233 where apbs.in is a formatted input file and [options] are:\n\n\ 234 --output-file=<name> Enables output logging to the path\n\ 235 listed in <name>. Uses flat-file\n\ 236 format is --output-format is not used.\n\ 237 --output-format=<type> Specifies format for logging. Options\n\ 238 for type are either \"xml\" or \"flat\".\n\ 239 --help Display this help information.\n\ 240 --version Display the current APBS version.\n\ 241 ----------------------------------------------------------------------\n\n"};
244 VASSERT(Vcom_init(&argc, &argv));
246 rank = Vcom_rank(com);
247 size = Vcom_size(com);
249 Vnm_setIoTag(rank, size);
250 Vnm_tprint( 0,
"Hello world from PE %d\n", rank);
253 mem = Vmem_ctor(
"MAIN");
263 atomForce[i] = VNULL;
274 chargeMap[i] = VNULL;
279 Vnm_tprint( 1,
"%s", header);
282 Vnm_tprint(, 2
"WARNING: APBS was compiled with the --enable-fast option.\n" 283 "WARNING: This mode is experimental and subject to change in future releases.\n" 284 "WARNING: The fast mode enables: Gauess-Seidel Smoothing and \n" 285 "WARNING: Conjugate Gradient Multigrid methods.\n\n");
288 Vnm_tprint( 1,
"This executable compiled on %s at %s\n\n", __DATE__, __TIME__);
290 #if defined(WITH_TINKER) 291 Vnm_tprint( 2,
"This executable was compiled with TINKER support and is not intended for stand-alone execution.\n");
292 Vnm_tprint( 2,
"Please compile another version without TINKER support.\n");
300 if (strncmp(argv[i],
"--", 2) == 0) {
304 Vnm_tprint(2,
"%s\n", PACKAGE_STRING);
307 Vnm_tprint(2,
"%s\n", usage);
309 }
else if (strncmp(argv[i],
"--output-format", 15) == 0) {
310 if (strstr(argv[i],
"xml") != NULL) {
311 Vnm_tprint(2,
"XML output format is now deprecated, please use --output-format=flat instead!\n\n");
314 else if (strstr(argv[i],
"flat") != NULL) {
317 Vnm_tprint(2,
"Invalid output-format type!\n");
320 }
else if (strncmp(argv[i],
"--output-file=", 14) == 0){
321 output_path = strstr(argv[i],
"=");
325 Vnm_tprint(2,
"UNRECOGNIZED COMMAND LINE OPTION %s!\n", argv[i]);
326 Vnm_tprint(2,
"%s\n", usage);
332 if ((input_path == VNULL) && (i != 0))
333 input_path = argv[i];
335 Vnm_tprint(2,
"ERROR -- CALLED WITH TOO MANY ARGUMENTS!\n", \
337 Vnm_tprint(2,
"%s\n", usage);
345 if ((outputformat != 0) && (output_path == NULL)) {
346 Vnm_tprint(2,
"The --output-path variable must be set when using --output-format!\n");
351 if (input_path == NULL) {
352 Vnm_tprint(2,
"ERROR -- APBS input file not specified!\n", argc);
353 Vnm_tprint(2,
"%s\n", usage);
358 if ((size > 1) && (output_path != NULL))
359 printf(output_path,
"%s_%d", output_path, rank);
363 Vnm_tprint( 1,
"Parsing input file %s...\n", input_path);
364 Vnm_tprint( 1,
"rank %d size %d...\n", rank, size);
365 sock = Vio_ctor(
"FILE",
"ASC", VNULL, input_path,
"r");
367 Vnm_tprint(2,
"Error while opening input file %s!\n", input_path);
371 Vnm_tprint( 2,
"Error while parsing input file.\n");
375 Vnm_tprint( 1,
"Parsed input file.\n");
381 Vnm_tprint(2,
"Error reading molecules!\n");
387 Vnm_tprint(2,
"Error setting up ELEC calculations\n");
392 Vnm_tprint(2,
"Error setting up APOL calculations\n");
403 #if defined(DEBUG_MAC_OSX_OCL) 404 #include "mach_chud.h" 411 int ret = initOpenCL();
412 printf(
"OpenCL runtime present - initialized = %i\n",ret);
416 setkOpenCLAvailable_(0);
417 printf(
"OpenCL is not present!\n");
421 #if defined(DEBUG_MAC_OSX_STANDARD) 422 #include "mach_chud.h" 429 if (
loadDielMaps(nosh, dielXMap, dielYMap, dielZMap) != 1) {
430 Vnm_tprint(2,
"Error reading dielectric maps!\n");
434 Vnm_tprint(2,
"Error reading kappa maps!\n");
438 Vnm_tprint(2,
"Error reading potential maps!\n");
442 Vnm_tprint(2,
"Error reading charge maps!\n");
447 Vnm_tprint( 1,
"Preparing to run %d PBE calculations.\n",
449 for (i=0; i<nosh->
ncalc; i++) {
450 Vnm_tprint( 1,
"----------------------------------------\n");
457 for (k=0; k<nosh->
nelec; k++) {
463 Vnm_tprint( 1,
"CALCULATION #%d: MULTIGRID\n", i+1);
465 Vnm_tprint( 1,
"CALCULATION #%d (%s): MULTIGRID\n",
473 Vnm_tprint( 1,
" Setting up problem...\n");
475 if (!
initMG(i, nosh, mgparm, pbeparm, realCenter, pbe,
476 alist, dielXMap, dielYMap, dielZMap, kappaMap,
477 chargeMap, pmgp, pmg, potMap)) {
478 Vnm_tprint( 2,
"Error setting up MG calculation!\n");
488 Vnm_tprint(2,
"Error solving PDE!\n");
493 if (
setPartMG(nosh, mgparm, pmg[i]) != 1) {
494 Vnm_tprint(2,
"Error setting partition info!\n");
500 &(nenergy[i]), &(totEnergy[i]), &(qfEnergy[i]),
501 &(qmEnergy[i]), &(dielEnergy[i]));
504 forceMG(mem, nosh, pbeparm, mgparm, pmg[i], &(nforce[i]),
505 &(atomForce[i]),
alist);
527 for (k=0; k<nosh->
nelec; k++) {
531 Vnm_tprint( 1,
"CALCULATION #%d: FINITE ELEMENT\n", i+1);
533 Vnm_tprint( 1,
"CALCULATION #%d (%s): FINITE ELEMENT\n", i+1, nosh->
elecname[k+1]);
541 Vnm_tprint(2,
"#################### WARNING ###################\n");
542 Vnm_tprint(2,
"## FE support is currently very experimental! ##\n");
543 Vnm_tprint(2,
"#################### WARNING ###################\n");
546 Vnm_tprint( 1,
" Setting up problem...\n");
552 Vnm_tprint( 2,
"Error setting up FE calculation!\n");
567 Vnm_tprint( 2,
"Error pre-refining mesh!\n");
572 Vnm_tprint(2,
"\n\nWARNING! DO NOT EXPECT PERFORMANCE OUT OF THE APBS/FEtk\n");
573 Vnm_tprint(2,
"INTERFACE AT THIS TIME. THE FINITE ELEMENT SOLVER IS\n");
574 Vnm_tprint(2,
"CURRENTLY NOT OPTIMIZED FOR THE PB EQUATION. IF YOU WANT\n");
575 Vnm_tprint(2,
"PERFORMANCE, PLEASE USE THE MULTIGRID-BASED METHODS, E.G.\n");
576 Vnm_tprint(2,
"MG-AUTO, MG-PARA, and MG-MANUAL (SEE DOCS.)\n\n");
577 Vnm_tprint(1,
" Beginning solve-estimate-refine cycle:\n");
579 for (isolve=0; isolve<feparm->
maxsolve; isolve++) {
580 Vnm_tprint(1,
" Solve #%d...\n", isolve);
583 if (!
solveFE(i, pbeparm, feparm, fetk)) {
584 Vnm_tprint(2,
"ERROR SOLVING EQUATION!\n");
589 if (!
energyFE(nosh, i, fetk, &(nenergy[i]),
590 &(totEnergy[i]), &(qfEnergy[i]),
591 &(qmEnergy[i]), &(dielEnergy[i]))) {
592 Vnm_tprint(2,
"ERROR SOLVING EQUATION!\n");
598 if (isolve < (feparm->
maxsolve)-1) {
604 bytesTotal = Vmem_bytesTotal();
605 highWater = Vmem_highWaterTotal();
606 Vnm_tprint(1,
" Current memory use: %g MB\n",
607 ((
double)bytesTotal/(1024.)/(1024.)));
608 Vnm_tprint(1,
" High-water memory use: %g MB\n",
609 ((
double)highWater/(1024.)/(1024.)));
612 Vnm_tprint(1,
" Writing FEM data to files.\n");
616 Vnm_tprint(2,
" Error while writing FEM data!\n");
619 Vnm_print(2,
"Error! APBS not compiled with FEtk!\n");
629 for (k=0; k<nosh->
napol; k++) {
636 Vnm_tprint( 1,
"CALCULATION #%d: APOLAR\n", i+1);
638 Vnm_tprint( 1,
"CALCULATION #%d (%s): APOLAR\n",
645 rc =
initAPOL(nosh, mem, param, apolparm, &(nforce[i]), &(atomForce[i]),
647 Vnm_print(0,
"initAPOL: Time elapsed: %f\n", ((
double)clock() - ts) / CLOCKS_PER_SEC);
649 Vnm_tprint(2,
"Error calculating apolar solvation quantities!\n");
659 for (k=0; k<nosh->
nelec; k++) {
665 Vnm_tprint( 1,
"CALCULATION #%d: BOUNDARY ELEMENT\n", i+1);
667 Vnm_tprint( 1,
"CALCULATION #%d (%s): BOUNDARY ELEMENT\n",
675 Vnm_tprint( 1,
" Setting up problem...\n");
677 if (!initBEM(i,nosh, bemparm, pbeparm, pbe)) {
678 Vnm_tprint( 2,
"Error setting up BEM calculation!\n");
683 printBEMPARM(bemparm);
687 if (solveBEM(
alist, nosh, pbeparm, bemparm, bemparm->
type) != 1) {
688 Vnm_tprint(2,
"Error solving PDE!\n");
694 &(nenergy[i]), &(totEnergy[i]), &(qfEnergy[i]),
695 &(qmEnergy[i]), &(dielEnergy[i]));
698 forceBEM(nosh, pbeparm, bemparm, &(nforce[i]),
699 &(atomForce[i]),
alist);
702 writedataBEM(rank, nosh, pbeparm);
705 writematBEM(rank, nosh, pbeparm);
716 Vnm_print(2,
"Error! APBS not compiled with BEM!\n");
723 #ifdef ENABLE_GEOFLOW 726 for (k=0; k<nosh->
nelec; k++) {
732 Vnm_tprint( 1,
"CALCULATION #%d: GEOMETRIC FLOW\n", i+1);
734 Vnm_tprint( 1,
"CALCULATION #%d (%s): GEOMETRIC FLOW\n",
743 Vnm_tprint( 1,
" Setting up problem...\n");
747 if (solveGeometricFlow(
alist, nosh, pbeparm, apolparm, geoflowparm) != 1) {
748 Vnm_tprint(2,
"Error solving GEOFLOW!\n");
756 Vnm_print(2,
"Error! APBS not compiled with GEOFLOW!\n");
765 Vnm_tprint( 1,
"Made it to start\n");
766 for (k=0; k<nosh->
nelec; k++) {
772 Vnm_tprint( 1,
"CALCULATION #%d: PBAM\n", i+1);
774 Vnm_tprint( 1,
"CALCULATION #%d (%s): PBAM\n",
782 Vnm_tprint( 1,
" Setting up problem...\n");
786 if (solvePBAM(
alist, nosh, pbeparm, pbamparm) != 1) {
787 Vnm_tprint(2,
"Error solving PBAM!\n");
795 Vnm_print(2,
"Error! APBS not compiled with PBAM!\n");
801 Vnm_tprint( 1,
"Made it to start\n");
802 for (k=0; k<nosh->
nelec; k++) {
808 Vnm_tprint( 1,
"CALCULATION #%d: PBSAM\n", i+1);
810 Vnm_tprint( 1,
"CALCULATION #%d (%s): PBSAM\n",
819 Vnm_tprint( 1,
" Setting up problem...\n");
823 if (solvePBSAM(
alist, nosh, pbeparm, pbamparm, pbsamparm) != 1) {
824 Vnm_tprint(2,
"Error solving PBSAM!\n");
832 Vnm_print(2,
"Error! APBS not compiled with PBSAM!\n");
837 Vnm_tprint(2,
" Unknown calculation type (%d)!\n", nosh->
calc[i]->
calctype);
849 Vnm_tprint( 1,
"----------------------------------------\n");
850 Vnm_tprint( 1,
"PRINT STATEMENTS\n");
852 for (i=0; i<nosh->
nprint; i++) {
868 Vnm_tprint( 2,
"Undefined PRINT keyword!\n");
872 Vnm_tprint( 1,
"----------------------------------------\n");
877 Vnm_tprint(2,
" Writing data to flat file %s...\n\n", output_path);
878 writedataFlat(nosh, com, output_path, totEnergy, qfEnergy, qmEnergy,
879 dielEnergy, nenergy, atomEnergy, nforce, atomForce);
884 for (i=0; i<nosh->
ncalc; i++) {
885 if (nenergy[i] > 0) Vmem_free(mem, nenergy[i],
sizeof(
double),
886 (
void **)&(atomEnergy[i]));
891 Vnm_tprint( 1,
"CLEANING UP AND SHUTTING DOWN...\n");
895 killMG(nosh, pbe, pmgp, pmg);
897 killFE(nosh, pbe, fetk, gm);
906 bytesTotal = Vmem_bytesTotal();
907 highWater = Vmem_highWaterTotal();
908 Vnm_tprint( 1,
"Final memory usage: %4.3f MB total, %4.3f MB high water\n",
909 (
double)(bytesTotal)/(1024.*1024.),
910 (
double)(highWater)/(1024.*1024.));
917 Vnm_tprint(1,
"\n\n");
918 Vnm_tprint( 1,
"Thanks for using APBS!\n\n");
920 #if defined(DEBUG_MAC_OSX_OCL) 921 mets_(&mbeg,
"Main Program CL");
923 #if defined(DEBUG_MAC_OSX_STANDARD) 924 mets_(&mbeg,
"Main Program Standard");
VPUBLIC int NOsh_setupApolCalc(NOsh *thee, Valist *alist[NOSH_MAXMOL])
Setup the series of non-polar calculations.
Parameter structure for GEOFLOW-specific variables from input files.
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.
Parameter structure for PBAM-specific variables from input files.
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.
GEOFLOWparm * geoflowparm
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.
Parameter structure for PBSAM-specific variables from input files.
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 BEM-specific variables from input files.
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.