62 VPRIVATE
int NOsh_parseREAD(
66 VPRIVATE
int NOsh_parsePRINT(
70 VPRIVATE
int NOsh_parseELEC(
75 VPRIVATE
int NOsh_parseAPOLAR(
80 VEXTERNC
int NOsh_parseFEM(
86 VEXTERNC
int NOsh_parseMG(
92 VEXTERNC
int NOsh_parseBEM(
98 VEXTERNC
int NOsh_parseGEOFLOW(
104 VEXTERNC
int NOsh_parsePBAM(
110 VEXTERNC
int NOsh_parsePBSAM(
116 VEXTERNC
int NOsh_parseAPOL(
122 VPRIVATE
int NOsh_setupCalcMG(
128 VPRIVATE
int NOsh_setupCalcMGAUTO(
133 VPRIVATE
int NOsh_setupCalcMGMANUAL(
138 VPRIVATE
int NOsh_setupCalcMGPARA(
143 VPRIVATE
int NOsh_setupCalcFEM(
148 VPRIVATE
int NOsh_setupCalcFEMANUAL(
153 VPRIVATE
int NOsh_setupCalcBEM(
158 VPRIVATE
int NOsh_setupCalcGEOFLOW(
163 VPRIVATE
int NOsh_setupCalcPBAM(
168 VPRIVATE
int NOsh_setupCalcPBSAM(
173 VPRIVATE
int NOsh_setupCalcBEMMANUAL(
178 VPRIVATE
int NOsh_setupCalcGEOFLOWMANUAL(
183 VPRIVATE
int NOsh_setupCalcPBAMAUTO(
188 VPRIVATE
int NOsh_setupCalcPBSAMAUTO(
193 VPRIVATE
int NOsh_setupCalcAPOL(
198 #if !defined(VINLINE_NOSH) 201 VASSERT(thee != VNULL);
202 VASSERT(imol < thee->nmol);
206 VASSERT(thee != VNULL);
207 VASSERT(imol < thee->nmol);
211 VASSERT(thee != VNULL);
212 VASSERT(imol < thee->nmol);
216 VASSERT(thee != VNULL);
217 VASSERT(imol < thee->nmol);
221 VASSERT(thee != VNULL);
222 VASSERT(imol < thee->nmol);
226 VASSERT(thee != VNULL);
227 VASSERT(imol < thee->nmol);
231 VASSERT(thee != VNULL);
232 VASSERT(imol < thee->nmol);
236 VASSERT(thee != VNULL);
237 VASSERT(icalc < thee->ncalc);
238 return thee->
calc[icalc];
241 VASSERT(thee != VNULL);
242 VASSERT(i < thee->ndiel);
246 VASSERT(thee != VNULL);
247 VASSERT(i < thee->nkappa);
251 VASSERT(thee != VNULL);
252 VASSERT(i < thee->npot);
256 VASSERT(thee != VNULL);
257 VASSERT(i < thee->ncharge);
265 VASSERT(thee != VNULL);
266 VASSERT(iprint < thee->nprint);
271 VASSERT(thee != VNULL);
272 VASSERT(iprint < thee->nprint);
277 VASSERT(thee != VNULL);
278 VASSERT(icalc < thee->ncalc);
283 VASSERT(thee != VNULL);
284 VASSERT(icalc < thee->ncalc);
289 VASSERT(thee != VNULL);
290 VASSERT(ielec < thee->nelec + 1);
295 VASSERT(thee != VNULL);
296 VASSERT(iprint < thee->nprint);
297 VASSERT(iarg < thee->printnarg[iprint]);
298 return thee->
printop[iprint][iarg];
302 VASSERT(thee != VNULL);
303 VASSERT(iprint < thee->nprint);
304 VASSERT(iarg < thee->printnarg[iprint]);
312 thee = (
NOsh*)Vmem_malloc(VNULL, 1,
sizeof(
NOsh) );
313 VASSERT( thee != VNULL);
323 if (thee == VNULL)
return 0;
340 thee->
calc[i] = VNULL;
341 thee->
elec[i] = VNULL;
342 thee->
apol[i] = VNULL;
345 thee->
alist[i] = VNULL;
355 if ((*thee) != VNULL) {
357 Vmem_free(VNULL, 1,
sizeof(
NOsh), (
void **)thee);
414 Vnm_print(2,
"NOsh_calc_ctor: unknown calculation type (%d)!\n",
429 if (calc == VNULL)
return;
456 Vnm_print(2,
"NOsh_calc_ctor: unknown calculation type (%d)!\n",
462 Vmem_free(VNULL, 1,
sizeof(
NOsh_calc), (
void **)thee);
472 VASSERT(thee != VNULL);
473 VASSERT(source != VNULL);
475 if (source->
mgparm != VNULL)
506 sock = Vio_ctor(
"FILE",
"ASC", VNULL, filename,
"r");
520 char tok[VMAX_BUFSIZE];
523 Vnm_print(2,
"NOsh_parseInput: Got NULL thee!\n");
528 Vnm_print(2,
"NOsh_parseInput: Got pointer to NULL socket!\n");
529 Vnm_print(2,
"NOsh_parseInput: The specified input file was not found!\n");
534 Vnm_print(2,
"NOsh_parseInput: Already parsed an input file!\n");
538 if (Vio_accept(sock, 0) < 0) {
539 Vnm_print(2,
"NOsh_parseInput: Problem reading from socket!\n");
548 Vnm_print(0,
"NOsh_parseInput: Starting file parsing...\n");
549 while (Vio_scanf(sock,
"%s", tok) == 1) {
566 Vnm_print(0,
"NOsh: Parsing READ section\n");
567 if (!NOsh_parseREAD(thee, sock))
return 0;
568 Vnm_print(0,
"NOsh: Done parsing READ section \ 569 (nmol=%d, ndiel=%d, nkappa=%d, ncharge=%d, npot=%d)\n", thee->
nmol, thee->
ndiel,
572 Vnm_print(0,
"NOsh: Parsing PRINT section\n");
573 if (!NOsh_parsePRINT(thee, sock))
return 0;
574 Vnm_print(0,
"NOsh: Done parsing PRINT section\n");
576 Vnm_print(0,
"NOsh: Parsing ELEC section\n");
577 if (!NOsh_parseELEC(thee, sock))
return 0;
578 Vnm_print(0,
"NOsh: Done parsing ELEC section (nelec = %d)\n",
581 Vnm_print(0,
"NOsh: Parsing APOLAR section\n");
582 if (!NOsh_parseAPOLAR(thee, sock))
return 0;
583 Vnm_print(0,
"NOsh: Done parsing APOLAR section (nelec = %d)\n",
586 Vnm_print(0,
"NOsh: Done parsing file (got QUIT)\n");
589 Vnm_print(2,
"NOsh_parseInput: Ignoring undefined keyword %s!\n", tok);
598 VPRIVATE
int NOsh_parseREAD_MOL(
NOsh *thee, Vio *sock) {
600 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
603 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
606 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
609 while (tok[strlen(tok)-1] !=
'"') {
612 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
615 strncpy(strnew, str+1, strlen(str)-2);
618 Vnm_print(0,
"NOsh: Storing molecule %d path %s\n",
621 strncpy(thee->
molpath[thee->
nmol], tok, VMAX_ARGLEN);
625 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
628 while (tok[strlen(tok)-1] !=
'"') {
631 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
634 strncpy(strnew, str+1, strlen(str)-2);
637 Vnm_print(0,
"NOsh: Storing molecule %d path %s\n",
640 strncpy(thee->
molpath[thee->
nmol], tok, VMAX_ARGLEN);
644 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
647 while (tok[strlen(tok)-1] !=
'"') {
650 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
653 strncpy(strnew, str+1, strlen(str)-2);
656 Vnm_print(0,
"NOsh: Storing molecule %d path %s\n",
659 strncpy(thee->
molpath[thee->
nmol], tok, VMAX_ARGLEN);
662 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined mol format \ 670 Vnm_print(2,
"NOsh_parseREAD_MOL: Ran out of tokens while parsing READ section!\n");
675 VPRIVATE
int NOsh_parseREAD_PARM(
NOsh *thee, Vio *sock) {
677 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
680 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
683 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
686 while (tok[strlen(tok)-1] !=
'"') {
689 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
692 strncpy(strnew, str+1, strlen(str)-2);
696 Vnm_print(2,
"NOsh: Hey! You already specified a parameterfile (%s)!\n", thee->
parmpath);
697 Vnm_print(2,
"NOsh: I'm going to ignore this one (%s)!\n", tok);
701 strncpy(thee->
parmpath, tok, VMAX_ARGLEN);
705 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
708 while (tok[strlen(tok)-1] !=
'"') {
711 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
714 strncpy(strnew, str+1, strlen(str)-2);
718 Vnm_print(2,
"NOsh: Hey! You already specified a parameterfile (%s)!\n", thee->
parmpath);
719 Vnm_print(2,
"NOsh: I'm going to ignore this one (%s)!\n", tok);
723 strncpy(thee->
parmpath, tok, VMAX_ARGLEN);
727 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined parm format \ 734 Vnm_print(2,
"NOsh_parseREAD_PARM: Ran out of tokens while parsing READ section!\n");
739 VPRIVATE
int NOsh_parseREAD_DIEL(
NOsh *thee, Vio *sock) {
741 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
744 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
753 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined format \ 758 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
761 while (tok[strlen(tok)-1] !=
'"') {
764 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
767 strncpy(strnew, str+1, strlen(str)-2);
770 Vnm_print(0,
"NOsh: Storing x-shifted dielectric map %d path \ 771 %s\n", thee->
ndiel, tok);
773 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
774 Vnm_print(0,
"NOsh: Storing y-shifted dielectric map %d path \ 775 %s\n", thee->
ndiel, tok);
777 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
778 Vnm_print(0,
"NOsh: Storing z-shifted dielectric map %d path \ 779 %s\n", thee->
ndiel, tok);
787 Vnm_print(2,
"NOsh_parseREAD_DIEL: Ran out of tokens while parsing READ \ 793 VPRIVATE
int NOsh_parseREAD_KAPPA(
NOsh *thee, Vio *sock) {
795 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
798 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
807 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined format \ 812 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
815 while (tok[strlen(tok)-1] !=
'"') {
818 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
821 strncpy(strnew, str+1, strlen(str)-2);
824 Vnm_print(0,
"NOsh: Storing kappa map %d path %s\n",
833 Vnm_print(2,
"NOsh_parseREAD: Ran out of tokens while parsing READ \ 839 VPRIVATE
int NOsh_parseREAD_POTENTIAL(
NOsh *thee, Vio *sock) {
841 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
844 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
852 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined format \ 857 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
860 while (tok[strlen(tok)-1] !=
'"') {
863 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
866 strncpy(strnew, str+1, strlen(str)-2);
869 Vnm_print(0,
"NOsh: Storing potential map %d path %s\n",
872 strncpy(thee->
potpath[thee->
npot], tok, VMAX_ARGLEN);
878 Vnm_print(2,
"NOsh_parseREAD: Ran out of tokens while parsing READ \ 884 VPRIVATE
int NOsh_parseREAD_CHARGE(
NOsh *thee, Vio *sock) {
886 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
889 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
898 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined format \ 903 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
906 while (tok[strlen(tok)-1] !=
'"') {
909 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
912 strncpy(strnew, str+1, strlen(str)-2);
915 Vnm_print(0,
"NOsh: Storing charge map %d path %s\n",
924 Vnm_print(2,
"NOsh_parseREAD: Ran out of tokens while parsing READ \ 930 VPRIVATE
int NOsh_parseREAD_MESH(
NOsh *thee, Vio *sock) {
932 char tok[VMAX_BUFSIZE], str[VMAX_BUFSIZE]=
"", strnew[VMAX_BUFSIZE]=
"";
935 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
938 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
941 while (tok[strlen(tok)-1] !=
'"') {
944 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
947 strncpy(strnew, str+1, strlen(str)-2);
950 Vnm_print(0,
"NOsh: Storing mesh %d path %s\n",
956 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined mesh format \ 963 Vnm_print(2,
"NOsh_parseREAD: Ran out of tokens while parsing READ \ 970 VPRIVATE
int NOsh_parseREAD(
NOsh *thee, Vio *sock) {
972 char tok[VMAX_BUFSIZE];
975 Vnm_print(2,
"NOsh_parseREAD: Got NULL thee!\n");
980 Vnm_print(2,
"NOsh_parseREAD: Got pointer to NULL socket!\n");
985 Vnm_print(2,
"NOsh_parseREAD: Already parsed an input file!\n");
990 while (Vio_scanf(sock,
"%s", tok) == 1) {
992 Vnm_print(0,
"NOsh: Done parsing READ section\n");
995 NOsh_parseREAD_MOL(thee, sock);
997 NOsh_parseREAD_PARM(thee,sock);
999 NOsh_parseREAD_DIEL(thee,sock);
1001 NOsh_parseREAD_KAPPA(thee,sock);
1003 NOsh_parseREAD_POTENTIAL(thee,sock);
1005 NOsh_parseREAD_CHARGE(thee,sock);
1007 NOsh_parseREAD_MESH(thee,sock);
1009 Vnm_print(2,
"NOsh_parseREAD: Ignoring undefined keyword %s!\n",
1015 Vnm_print(2,
"NOsh_parseREAD: Ran out of tokens while parsing READ \ 1021 VPRIVATE
int NOsh_parsePRINT(
NOsh *thee, Vio *sock) {
1023 char tok[VMAX_BUFSIZE];
1024 char name[VMAX_BUFSIZE];
1025 int ti, idx, expect, ielec, iapol;
1027 if (thee == VNULL) {
1028 Vnm_print(2,
"NOsh_parsePRINT: Got NULL thee!\n");
1032 if (sock == VNULL) {
1033 Vnm_print(2,
"NOsh_parsePRINT: Got pointer to NULL socket!\n");
1038 Vnm_print(2,
"NOsh_parsePRINT: Already parsed an input file!\n");
1044 Vnm_print(2,
"NOsh_parsePRINT: Exceeded max number (%d) of PRINT \ 1052 VJMPERR1(Vio_scanf(sock,
"%s", tok) == 1);
1072 Vnm_print(2,
"NOsh_parsePRINT: Undefined keyword %s while parsing \ 1073 PRINT section!\n", tok);
1080 while (Vio_scanf(sock,
"%s", tok) == 1) {
1087 Vnm_print(0,
"NOsh: Done parsing PRINT section\n");
1090 Vnm_print(2,
"NOsh_parsePRINT: Got premature END to PRINT!\n");
1096 if ((sscanf(tok,
"%d", &ti) == 1) &&
1102 Vnm_print(2,
"NOsh_parsePRINT: Syntax error in PRINT \ 1103 section while reading %s!\n", tok);
1113 Vnm_print(2,
"NOsh_parsePRINT: Exceeded max number \ 1114 (%d) of arguments for PRINT section!\n",
1119 Vnm_print(2,
"NOsh_parsePRINT: Syntax error in PRINT \ 1120 section while reading %s!\n", tok);
1130 Vnm_print(2,
"NOsh_parseREAD: Exceeded max number \ 1131 (%d) of arguments for PRINT section!\n",
1136 Vnm_print(2,
"NOsh_parsePRINT: Syntax error in PRINT \ 1137 section while reading %s!\n", tok);
1141 }
else if (sscanf(tok,
"%s", name) == 1) {
1143 for (ielec=0; ielec<thee->
nelec; ielec++) {
1150 for (iapol=0; iapol<thee->
napol; iapol++) {
1158 Vnm_print(2,
"No ELEC or APOL statement has been named %s!\n",
1163 Vnm_print(2,
"NOsh_parsePRINT: Syntax error in PRINT \ 1164 section while reading %s!\n", tok);
1169 Vnm_print(2,
"NOsh_parsePRINT: Undefined keyword %s while \ 1170 parsing PRINT section!\n", tok);
1181 Vnm_print(2,
"NOsh_parsePRINT: Ran out of tokens while parsing PRINT \ 1187 VPRIVATE
int NOsh_parseELEC(
NOsh *thee, Vio *sock) {
1191 char tok[VMAX_BUFSIZE];
1193 if (thee == VNULL) {
1194 Vnm_print(2,
"NOsh_parseELEC: Got NULL thee!\n");
1198 if (sock == VNULL) {
1199 Vnm_print(2,
"NOsh_parseELEC: Got pointer to NULL socket!\n");
1204 Vnm_print(2,
"NOsh_parseELEC: Already parsed an input file!\n");
1211 Vnm_print(2,
"NOsh: Too many electrostatics calculations in this \ 1213 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
1219 if (Vio_scanf(sock,
"%s", tok) == 1) {
1221 Vio_scanf(sock,
"%s", tok);
1223 if (Vio_scanf(sock,
"%s", tok) != 1) {
1224 Vnm_print(2,
"NOsh_parseELEC: Ran out of tokens while reading \ 1234 return NOsh_parseMG(thee, sock, calc);
1240 return NOsh_parseMG(thee, sock, calc);
1246 return NOsh_parseMG(thee, sock, calc);
1252 return NOsh_parseMG(thee, sock, calc);
1258 return NOsh_parseFEM(thee, sock, calc);
1264 return NOsh_parseBEM(thee, sock, calc);
1271 Vnm_print(2,
"Geoflow currently does not support geoflow-manual please use geoflow-auto instead!\n");
1274 Vnm_print(2,
"Geoflow currently does not support geoflow-none please use geoflow-auto instead!\n");
1281 return NOsh_parseGEOFLOW(thee, sock, calc);
1287 return NOsh_parsePBAM(thee, sock, calc);
1293 return NOsh_parsePBSAM(thee, sock, calc);
1295 Vnm_print(2,
"NOsh_parseELEC: The method (\"mg\",\"fem\", \"bem\", \"geoflow\" \"pbam\", \"pbsam\") or \ 1296 \"name\" must be the first keyword in the ELEC section\n");
1301 Vnm_print(2,
"NOsh_parseELEC: Ran out of tokens while reading ELEC section!\n");
1306 VPRIVATE
int NOsh_parseAPOLAR(
NOsh *thee, Vio *sock) {
1310 char tok[VMAX_BUFSIZE];
1312 if (thee == VNULL) {
1313 Vnm_print(2,
"NOsh_parseAPOLAR: Got NULL thee!\n");
1317 if (sock == VNULL) {
1318 Vnm_print(2,
"NOsh_parseAPOLAR: Got pointer to NULL socket!\n");
1323 Vnm_print(2,
"NOsh_parseAPOLAR: Already parsed an input file!\n");
1330 Vnm_print(2,
"NOsh: Too many non-polar calculations in this \ 1332 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
1338 if (Vio_scanf(sock,
"%s", tok) == 1) {
1340 Vio_scanf(sock,
"%s", tok);
1347 return NOsh_parseAPOL(thee, sock, calc);
1376 VASSERT(thee != VNULL);
1377 for (imol=0; imol<thee->
nmol; imol++) {
1378 thee->
alist[imol] = alist[imol];
1382 for (ielec=0; ielec<(thee->
nelec); ielec++) {
1384 elec = thee->
elec[ielec];
1389 Vnm_print(2,
"NOsh_setupElecCalc: Calculation of forces disabled because surface \ 1399 VASSERT(mgparm != VNULL);
1401 VASSERT(mgparm->
centmol >= 0);
1404 VASSERT(mymol != VNULL);
1405 for (i=0; i<3; i++) {
1413 VASSERT(mymol != VNULL);
1414 for (i=0; i<3; i++) {
1422 VASSERT(mymol != VNULL);
1423 for (i=0; i<3; i++) {
1427 NOsh_setupCalcMG(thee, elec);
1430 NOsh_setupCalcFEM(thee, elec);
1433 NOsh_setupCalcPBAM(thee, elec);
1436 NOsh_setupCalcPBSAM(thee, elec);
1439 NOsh_setupCalcBEM(thee, elec);
1442 NOsh_setupCalcGEOFLOW(thee, elec);
1445 Vnm_print(2,
"NOsh_setupCalc: Invalid calculation type (%d)!\n",
1454 Vnm_print(0,
"NOsh_setupCalc: Mapping ELEC statement %d (%d) to \ 1455 calculation %d (%d)\n", ielec, ielec+1, thee->
elec2calc[ielec],
1470 VASSERT(thee != VNULL);
1471 for (imol=0; imol<thee->
nmol; imol++) {
1472 thee->
alist[imol] = alist[imol];
1475 for (iapol=0; iapol<(thee->
napol); iapol++) {
1477 calc = thee->
apol[iapol];
1482 NOsh_setupCalcAPOL(thee, calc);
1486 Vnm_print(2,
"NOsh_setupCalc: Invalid calculation type (%d)!\n", calc->
calctype);
1493 Vnm_print(0,
"NOsh_setupCalc: Mapping APOL statement %d (%d) to calculation %d (%d)\n", iapol, iapol+1, thee->
apol2calc[iapol], thee->
apol2calc[iapol]+1);
1503 VPUBLIC
int NOsh_parseMG(
1509 char tok[VMAX_BUFSIZE];
1515 if (thee == VNULL) {
1516 Vnm_print(2,
"NOsh: Got NULL thee!\n");
1519 if (sock == VNULL) {
1520 Vnm_print(2,
"NOsh: Got pointer to NULL socket!\n");
1523 if (elec == VNULL) {
1524 Vnm_print(2,
"NOsh: Got pointer to NULL elec object!\n");
1528 if (mgparm == VNULL) {
1529 Vnm_print(2,
"NOsh: Got pointer to NULL mgparm object!\n");
1533 if (pbeparm == VNULL) {
1534 Vnm_print(2,
"NOsh: Got pointer to NULL pbeparm object!\n");
1538 Vnm_print(0,
"NOsh_parseMG: Parsing parameters for MG calculation\n");
1551 while (Vio_scanf(sock,
"%s", tok) == 1) {
1553 Vnm_print(0,
"NOsh_parseMG: Parsing %s...\n", tok);
1566 Vnm_print(0,
"NOsh_parseMG: parsePBE error!\n");
1568 }
else if (rc == 0) {
1572 Vnm_print(0,
"NOsh_parseMG: parseMG error!\n");
1574 }
else if (rc == 0) {
1576 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
1584 if (rc == -1)
return 0;
1585 if (rc == 0)
return 0;
1589 Vnm_print(2,
"NOsh: MG parameters not set correctly!\n");
1596 VPRIVATE
int NOsh_setupCalcMG(
1603 VASSERT(thee != VNULL);
1604 VASSERT(calc != VNULL);
1606 VASSERT(mgparm != VNULL);
1611 switch (mgparm->
type) {
1613 return NOsh_setupCalcMGMANUAL(thee, calc);
1615 return NOsh_setupCalcMGMANUAL(thee, calc);
1617 return NOsh_setupCalcMGAUTO(thee, calc);
1619 return NOsh_setupCalcMGPARA(thee, calc);
1621 Vnm_print(2,
"NOsh_setupCalcMG: undefined MG calculation type (%d)!\n",
1631 VPRIVATE
int NOsh_setupCalcBEM(
1638 VASSERT(thee != VNULL);
1639 VASSERT(calc != VNULL);
1641 VASSERT(bemparm != VNULL);
1646 switch (bemparm->
type) {
1648 return NOsh_setupCalcBEMMANUAL(thee, calc);
1650 Vnm_print(2,
"NOsh_setupCalcBEM: undefined BEM calculation type (%d)!\n",
1659 VPRIVATE
int NOsh_setupCalcGEOFLOW(
NOsh *thee,
NOsh_calc *calc) {
1663 VASSERT(thee != VNULL);
1664 VASSERT(calc != VNULL);
1666 VASSERT(parm != VNULL);
1672 return NOsh_setupCalcGEOFLOWMANUAL(thee, calc);
1674 Vnm_print(2,
"NOsh_setupCalcGEOFLOW: undefined GEOFLOW calculation type (%d)!\n", parm->
type);
1679 VPRIVATE
int NOsh_setupCalcPBAM(
NOsh *thee,
NOsh_calc *calc){
1683 VASSERT(thee!=VNULL);
1684 VASSERT(calc!=VNULL);
1686 VASSERT(parm!=VNULL);
1689 return NOsh_setupCalcPBAMAUTO(thee, calc);
1691 Vnm_print(2,
"NOsh_setupCalcPBAM: undefined PBAM calculation type (%d)!\n", parm->
type);
1697 VPRIVATE
int NOsh_setupCalcPBSAM(
NOsh *thee,
NOsh_calc *calc){
1701 VASSERT(thee!=VNULL);
1702 VASSERT(calc!=VNULL);
1704 VASSERT(parm!=VNULL);
1707 return NOsh_setupCalcPBSAMAUTO(thee, calc);
1709 Vnm_print(2,
"NOsh_setupCalcPBSAM: undefined PBSAM calculation type (%d)!\n", parm->
type);
1715 VPRIVATE
int NOsh_setupCalcFEM(
1720 VASSERT(thee != VNULL);
1721 VASSERT(calc != VNULL);
1722 VASSERT(calc->
femparm != VNULL);
1728 return NOsh_setupCalcFEMANUAL(thee, calc);
1730 Vnm_print(2,
"NOsh_parseFEM: unknown calculation type (%d)!\n",
1740 VPRIVATE
int NOsh_setupCalcMGMANUAL(
1749 if (thee == VNULL) {
1750 Vnm_print(2,
"NOsh_setupCalcMGMANUAL: Got NULL thee!\n");
1753 if (elec == VNULL) {
1754 Vnm_print(2,
"NOsh_setupCalcMGMANUAL: Got NULL calc!\n");
1758 if (mgparm == VNULL) {
1759 Vnm_print(2,
"NOsh_setupCalcMGMANUAL: Got NULL mgparm -- was this calculation \ 1764 if (pbeparm == VNULL) {
1765 Vnm_print(2,
"NOsh_setupCalcMGMANUAL: Got NULL pbeparm -- was this calculation \ 1773 mgparm->
grid[0] = mgparm->
glen[0]/((double)(mgparm->
dime[0]-1));
1774 mgparm->
grid[1] = mgparm->
glen[1]/((double)(mgparm->
dime[1]-1));
1775 mgparm->
grid[2] = mgparm->
glen[2]/((double)(mgparm->
dime[2]-1));
1779 mgparm->
glen[0] = mgparm->
grid[0]*((double)(mgparm->
dime[0]-1));
1780 mgparm->
glen[1] = mgparm->
grid[1]*((double)(mgparm->
dime[1]-1));
1781 mgparm->
glen[2] = mgparm->
grid[2]*((double)(mgparm->
dime[2]-1));
1788 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
1789 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
1808 VPUBLIC
int NOsh_setupCalcMGAUTO(
1815 double fgrid[3], cgrid[3];
1816 double d[3], minf[3], maxf[3], minc[3], maxc[3];
1817 double redfrac, redrat[3], td;
1818 int ifocus, nfocus, tnfocus[3];
1830 if (thee == VNULL) {
1831 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Got NULL thee!\n");
1834 if (elec == VNULL) {
1835 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Got NULL elec!\n");
1838 if (elec->
mgparm == VNULL) {
1839 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Got NULL mgparm!\n");
1843 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Got NULL pbeparm!\n");
1847 Vnm_print(0,
"NOsh_setupCalcMGAUTO(%s, %d): coarse grid center = %g %g %g\n",
1852 Vnm_print(0,
"NOsh_setupCalcMGAUTO(%s, %d): fine grid center = %g %g %g\n",
1859 for (j=0; j<3; j++) {
1864 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): Coarse grid spacing = %g, %g, %g\n",
1865 __FILE__, __LINE__, cgrid[0], cgrid[1], cgrid[2]);
1866 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): Fine grid spacing = %g, %g, %g\n",
1867 __FILE__, __LINE__, fgrid[0], fgrid[1], fgrid[2]);
1868 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): Displacement between fine and \ 1869 coarse grids = %g, %g, %g\n", __FILE__, __LINE__, d[0], d[1], d[2]);
1873 for (j=0; j<3; j++) {
1874 if (fgrid[j]/cgrid[j] <
VREDFRAC) {
1875 redfrac = fgrid[j]/cgrid[j];
1877 tnfocus[j] = (int)ceil(td) + 1;
1878 }
else tnfocus[j] = 2;
1880 nfocus = VMAX2(VMAX2(tnfocus[0], tnfocus[1]), tnfocus[2]);
1884 for (j=0; j<3; j++) {
1885 redrat[j] = VPOW((fgrid[j]/cgrid[j]), 1.0/((
double)nfocus-1.0));
1887 Vnm_print(0,
"NOsh: %d levels of focusing with %g, %g, %g reductions\n",
1888 nfocus, redrat[0], redrat[1], redrat[2]);
1893 Vnm_print(2,
"NOsh: Require more calculations than max (%d)!\n",
1898 for (ifocus=0; ifocus<nfocus; ifocus++) {
1901 icalc = thee->
ncalc;
1906 calcf = thee->
calc[icalc];
1909 calcc = thee->
calc[icalc-1];
1919 for (j=0; j<3; j++) {
1924 for (j=0; j<3; j++) {
1936 for (j=0; j<3; j++) {
1939 }
else if (ifocus == (nfocus-1)) {
1942 for (j=0; j<3; j++) {
1951 for (j=0; j<3; j++) {
1962 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): starting mesh \ 1963 repositioning.\n", __FILE__, __LINE__);
1964 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): coarse mesh center = \ 1965 %g %g %g\n", __FILE__, __LINE__,
1969 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): coarse mesh upper corner = \ 1970 %g %g %g\n", __FILE__, __LINE__,
1974 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): coarse mesh lower corner = \ 1975 %g %g %g\n", __FILE__, __LINE__,
1979 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): initial fine mesh upper corner = \ 1980 %g %g %g\n", __FILE__, __LINE__,
1984 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): initial fine mesh lower corner = \ 1985 %g %g %g\n", __FILE__, __LINE__,
1989 for (j=0; j<3; j++) {
1996 d[j] = minc[j] - minf[j];
1997 if (d[j] >= VSMALL) {
1998 if (ifocus == (nfocus-1)) {
1999 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Error! Finest \ 2000 mesh has fallen off the coarser meshes!\n");
2001 Vnm_print(2,
"NOsh_setupCalcMGAUTO: difference in min %d-\ 2002 direction = %g\n", j, d[j]);
2003 Vnm_print(2,
"NOsh_setupCalcMGAUTO: min fine = %g %g %g\n",
2004 minf[0], minf[1], minf[2]);
2005 Vnm_print(2,
"NOsh_setupCalcMGAUTO: min coarse = %g %g %g\n",
2006 minc[0], minc[1], minc[2]);
2009 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): ifocus = %d, \ 2010 fixing mesh min violation (%g in %d-direction).\n", __FILE__, __LINE__, ifocus,
2021 d[j] = maxf[j] - maxc[j];
2022 if (d[j] >= VSMALL) {
2023 if (ifocus == (nfocus-1)) {
2024 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Error! Finest \ 2025 mesh has fallen off the coarser meshes!\n");
2026 Vnm_print(2,
"NOsh_setupCalcMGAUTO: difference in %d-\ 2027 direction = %g\n", j, d[j]);
2033 Vnm_print(2,
"NOsh_setupCalcMGAUTO: Error! Both \ 2034 ends of the finer mesh do not fit in the bigger mesh!\n");
2037 Vnm_print(0,
"NOsh_setupCalcMGAUTO(%s, %d): ifocus = %d, \ 2038 fixing mesh max violation (%g in %d-direction).\n", __FILE__, __LINE__, ifocus,
2045 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): final fine mesh upper corner = \ 2046 %g %g %g\n", __FILE__, __LINE__,
2050 Vnm_print(0,
"NOsh_setupCalcMGAUTO (%s, %d): final fine mesh lower corner = \ 2051 %g %g %g\n", __FILE__, __LINE__,
2066 Vnm_print(0,
"NOsh_setupMGAUTO: Resetting boundary flags\n");
2068 for (j=0; j<3; j++) {
2083 VPUBLIC
int NOsh_setupCalcMGPARA(
2093 double hx, hy, hzed;
2094 double xofrac, yofrac, zofrac;
2095 int rank, size, npx, npy, npz, nproc, ip, jp, kp;
2096 int xeffGlob, yeffGlob, zeffGlob, xDisj, yDisj, zDisj;
2097 int xigminDisj, xigmaxDisj, yigminDisj, yigmaxDisj, zigminDisj, zigmaxDisj;
2098 int xigminOlap, xigmaxOlap, yigminOlap, yigmaxOlap, zigminOlap, zigmaxOlap;
2099 int xOlapReg, yOlapReg, zOlapReg;
2100 double xlenDisj, ylenDisj, zlenDisj;
2101 double xcentDisj, ycentDisj, zcentDisj;
2102 double xcentOlap, ycentOlap, zcentOlap;
2103 double xlenOlap, ylenOlap, zlenOlap;
2104 double xminOlap, xmaxOlap, yminOlap, ymaxOlap, zminOlap, zmaxOlap;
2105 double xminDisj, xmaxDisj, yminDisj, ymaxDisj, zminDisj, zmaxDisj;
2106 double xcent, ycent, zcent;
2109 VASSERT(thee != VNULL);
2110 VASSERT(elec != VNULL);
2112 VASSERT(mgparm != VNULL);
2116 npx = mgparm->
pdime[0];
2117 npy = mgparm->
pdime[1];
2118 npz = mgparm->
pdime[2];
2119 nproc = npx*npy*npz;
2127 Vnm_tprint(2,
"NOsh_setupCalcMGPARA: Oops! You're trying to perform \ 2128 an 'mg-para' (parallel) calculation\n");
2129 Vnm_tprint(2,
"NOsh_setupCalcMGPARA: with a version of APBS that wasn't \ 2130 compiled with MPI!\n");
2131 Vnm_tprint(2,
"NOsh_setupCalcMGPARA: Perhaps you meant to use the \ 2133 Vnm_tprint(2,
"NOsh_setupCalcMGPARA: Bailing out!\n");
2141 Vnm_print(0,
"NOsh_setupCalcMGPARA: Hello from processor %d of %d\n", rank,
2146 if (rank > (nproc-1)) {
2147 Vnm_print(2,
"NOsh_setupMGPARA: There are more processors available than\ 2148 the %d you requested.\n", nproc);
2149 Vnm_print(2,
"NOsh_setupMGPARA: Eliminating processor %d\n", rank);
2157 Vnm_print(2,
"NOsh_setupMGPARA: There are too few processors (%d) to \ 2158 satisfy requirements (%d)\n", size, nproc);
2162 Vnm_print(0,
"NOsh_setupMGPARA: Hello (again) from processor %d of %d\n",
2167 rank = mgparm->
async;
2174 if (rank > (nproc-1)) {
2175 Vnm_print(2,
"NOsh_setupMGPARA: The processor id you requested (%d) \ 2176 is not within the range of processors available (0-%d)\n", rank, (nproc-1));
2182 kp = (int)floor(rank/(npx*npy));
2183 jp = (int)floor((rank-kp*npx*npy)/npx);
2184 ip = rank - kp*npx*npy - jp*npx;
2185 Vnm_print(0,
"NOsh_setupMGPARA: Hello world from PE (%d, %d, %d)\n",
2189 if (npx == 1) xofrac = 0.0;
2190 else xofrac =
ofrac;
2191 if (npy == 1) yofrac = 0.0;
2192 else yofrac =
ofrac;
2193 if (npz == 1) zofrac = 0.0;
2194 else zofrac =
ofrac;
2197 xDisj = (int)
VFLOOR(mgparm->
dime[0]/(1 + 2*xofrac) + 0.5);
2198 xeffGlob = npx*xDisj;
2199 hx = mgparm->
fglen[0]/(double)(xeffGlob-1);
2200 yDisj = (int)
VFLOOR(mgparm->
dime[1]/(1 + 2*yofrac) + 0.5);
2201 yeffGlob = npy*yDisj;
2202 hy = mgparm->
fglen[1]/(double)(yeffGlob-1);
2203 zDisj = (int)
VFLOOR(mgparm->
dime[2]/(1 + 2*zofrac) + 0.5);
2204 zeffGlob = npz*zDisj;
2205 hzed = mgparm->
fglen[2]/(double)(zeffGlob-1);
2206 Vnm_print(0,
"NOsh_setupMGPARA: Global Grid size = (%d, %d, %d)\n",
2207 xeffGlob, yeffGlob, zeffGlob);
2208 Vnm_print(0,
"NOsh_setupMGPARA: Global Grid Spacing = (%.3f, %.3f, %.3f)\n",
2210 Vnm_print(0,
"NOsh_setupMGPARA: Processor Grid Size = (%d, %d, %d)\n",
2211 xDisj, yDisj, zDisj);
2214 xigminDisj = ip*xDisj;
2215 xigmaxDisj = xigminDisj + xDisj - 1;
2216 yigminDisj = jp*yDisj;
2217 yigmaxDisj = yigminDisj + yDisj - 1;
2218 zigminDisj = kp*zDisj;
2219 zigmaxDisj = zigminDisj + zDisj - 1;
2220 Vnm_print(0,
"NOsh_setupMGPARA: Min Grid Points for this proc. (%d, %d, %d)\n",
2221 xigminDisj, yigminDisj, zigminDisj);
2222 Vnm_print(0,
"NOsh_setupMGPARA: Max Grid Points for this proc. (%d, %d, %d)\n",
2223 xigmaxDisj, yigmaxDisj, zigmaxDisj);
2227 xminDisj = VMAX2(hx*(xigminDisj-0.5), 0.0);
2228 xmaxDisj = VMIN2(hx*(xigmaxDisj+0.5), mgparm->
fglen[0]);
2229 xlenDisj = xmaxDisj - xminDisj;
2230 yminDisj = VMAX2(hy*(yigminDisj-0.5), 0.0);
2231 ymaxDisj = VMIN2(hy*(yigmaxDisj+0.5), mgparm->
fglen[1]);
2232 ylenDisj = ymaxDisj - yminDisj;
2233 zminDisj = VMAX2(hzed*(zigminDisj-0.5), 0.0);
2234 zmaxDisj = VMIN2(hzed*(zigmaxDisj+0.5), mgparm->
fglen[2]);
2235 zlenDisj = zmaxDisj - zminDisj;
2237 xcent = 0.5*mgparm->
fglen[0];
2238 ycent = 0.5*mgparm->
fglen[1];
2239 zcent = 0.5*mgparm->
fglen[2];
2241 xcentDisj = xminDisj + 0.5*xlenDisj - xcent;
2242 ycentDisj = yminDisj + 0.5*ylenDisj - ycent;
2243 zcentDisj = zminDisj + 0.5*zlenDisj - zcent;
2244 if (VABS(xcentDisj) < VSMALL) xcentDisj = 0.0;
2245 if (VABS(ycentDisj) < VSMALL) ycentDisj = 0.0;
2246 if (VABS(zcentDisj) < VSMALL) zcentDisj = 0.0;
2248 Vnm_print(0,
"NOsh_setupMGPARA: Disj part length = (%g, %g, %g)\n",
2249 xlenDisj, ylenDisj, zlenDisj);
2250 Vnm_print(0,
"NOsh_setupMGPARA: Disj part center displacement = (%g, %g, %g)\n",
2251 xcentDisj, ycentDisj, zcentDisj);
2257 if (npx != 1) xOlapReg = (int)
VFLOOR(xofrac*mgparm->
fglen[0]/npx/hx + 0.5) + 1;
2258 if (npy != 1) yOlapReg = (int)
VFLOOR(yofrac*mgparm->
fglen[1]/npy/hy + 0.5) + 1;
2259 if (npz != 1) zOlapReg = (int)
VFLOOR(zofrac*mgparm->
fglen[2]/npz/hzed + 0.5) + 1;
2261 Vnm_print(0,
"NOsh_setupMGPARA: No. of Grid Points in Overlap (%d, %d, %d)\n",
2262 xOlapReg, yOlapReg, zOlapReg);
2264 if (ip == 0) xigminOlap = 0;
2265 else if (ip == (npx - 1)) xigminOlap = xeffGlob - mgparm->
dime[0];
2266 else xigminOlap = xigminDisj - xOlapReg;
2267 xigmaxOlap = xigminOlap + mgparm->
dime[0] - 1;
2269 if (jp == 0) yigminOlap = 0;
2270 else if (jp == (npy - 1)) yigminOlap = yeffGlob - mgparm->
dime[1];
2271 else yigminOlap = yigminDisj - yOlapReg;
2272 yigmaxOlap = yigminOlap + mgparm->
dime[1] - 1;
2274 if (kp == 0) zigminOlap = 0;
2275 else if (kp == (npz - 1)) zigminOlap = zeffGlob - mgparm->
dime[2];
2276 else zigminOlap = zigminDisj - zOlapReg;
2277 zigmaxOlap = zigminOlap + mgparm->
dime[2] - 1;
2279 Vnm_print(0,
"NOsh_setupMGPARA: Min Grid Points with Overlap (%d, %d, %d)\n",
2280 xigminOlap, yigminOlap, zigminOlap);
2281 Vnm_print(0,
"NOsh_setupMGPARA: Max Grid Points with Overlap (%d, %d, %d)\n",
2282 xigmaxOlap, yigmaxOlap, zigmaxOlap);
2284 xminOlap = hx * xigminOlap;
2285 xmaxOlap = hx * xigmaxOlap;
2286 yminOlap = hy * yigminOlap;
2287 ymaxOlap = hy * yigmaxOlap;
2288 zminOlap = hzed * zigminOlap;
2289 zmaxOlap = hzed * zigmaxOlap;
2291 xlenOlap = xmaxOlap - xminOlap;
2292 ylenOlap = ymaxOlap - yminOlap;
2293 zlenOlap = zmaxOlap - zminOlap;
2295 xcentOlap = (xminOlap + 0.5*xlenOlap) - xcent;
2296 ycentOlap = (yminOlap + 0.5*ylenOlap) - ycent;
2297 zcentOlap = (zminOlap + 0.5*zlenOlap) - zcent;
2298 if (VABS(xcentOlap) < VSMALL) xcentOlap = 0.0;
2299 if (VABS(ycentOlap) < VSMALL) ycentOlap = 0.0;
2300 if (VABS(zcentOlap) < VSMALL) zcentOlap = 0.0;
2302 Vnm_print(0,
"NOsh_setupMGPARA: Olap part length = (%g, %g, %g)\n",
2303 xlenOlap, ylenOlap, zlenOlap);
2304 Vnm_print(0,
"NOsh_setupMGPARA: Olap part center displacement = (%g, %g, %g)\n",
2305 xcentOlap, ycentOlap, zcentOlap);
2325 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[LEFT] = %d\n",
2327 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[RIGHT] = %d\n",
2329 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[FRONT] = %d\n",
2331 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[BACK] = %d\n",
2333 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[UP] = %d\n",
2335 Vnm_print(0,
"NOsh_setupMGPARA: partDisjOwnSide[DOWN] = %d\n",
2339 mgparm->
fglen[0] = xlenOlap;
2340 mgparm->
fglen[1] = ylenOlap;
2341 mgparm->
fglen[2] = zlenOlap;
2348 mgparm->
fcenter[0] += xcentOlap;
2349 mgparm->
fcenter[1] += ycentOlap;
2350 mgparm->
fcenter[2] += zcentOlap;
2352 Vnm_print(0,
"NOsh_setupCalcMGPARA (%s, %d): Set up *relative* partition \ 2353 centers...\n", __FILE__, __LINE__);
2354 Vnm_print(0,
"NOsh_setupCalcMGPARA (%s, %d): Absolute centers will be set \ 2355 in NOsh_setupMGAUTO\n", __FILE__, __LINE__);
2356 Vnm_print(0,
"NOsh_setupCalcMGPARA (%s, %d): partDisjCenter = %g %g %g\n",
2361 Vnm_print(0,
"NOsh_setupCalcMGPARA (%s, %d): ccenter = %g %g %g\n",
2366 Vnm_print(0,
"NOsh_setupCalcMGPARA (%s, %d): fcenter = %g %g %g\n",
2374 return NOsh_setupCalcMGAUTO(thee, elec);
2378 VPUBLIC
int NOsh_parseFEM(
2384 char tok[VMAX_BUFSIZE];
2391 if (thee == VNULL) {
2392 Vnm_print(2,
"NOsh_parseFEM: Got NULL thee!\n");
2395 if (sock == VNULL) {
2396 Vnm_print(2,
"NOsh_parseFEM: Got pointer to NULL socket!\n");
2399 if (elec == VNULL) {
2400 Vnm_print(2,
"NOsh_parseFEM: Got pointer to NULL elec object!\n");
2404 if (feparm == VNULL) {
2405 Vnm_print(2,
"NOsh_parseFEM: Got pointer to NULL feparm object!\n");
2409 if (feparm == VNULL) {
2410 Vnm_print(2,
"NOsh_parseFEM: Got pointer to NULL pbeparm object!\n");
2414 Vnm_print(0,
"NOsh_parseFEM: Parsing parameters for FEM calculation\n");
2418 while (Vio_scanf(sock,
"%s", tok) == 1) {
2420 Vnm_print(0,
"NOsh_parseFEM: Parsing %s...\n", tok);
2433 Vnm_print(0,
"NOsh_parseFEM: parsePBE error!\n");
2435 }
else if (rc == 0) {
2439 Vnm_print(0,
"NOsh_parseFEM: parseMG error!\n");
2441 }
else if (vrc == VRC_WARNING) {
2443 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
2451 if (rc == -1)
return 0;
2452 if (rc == 0)
return 0;
2456 Vnm_print(2,
"NOsh: FEM parameters not set correctly!\n");
2464 VPRIVATE
int NOsh_setupCalcFEMANUAL(
2473 VASSERT(thee != VNULL);
2474 VASSERT(elec != VNULL);
2476 VASSERT(feparm != VNULL);
2485 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2486 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2501 VPUBLIC
int NOsh_parseAPOL(
2507 char tok[VMAX_BUFSIZE];
2512 if (thee == VNULL) {
2513 Vnm_print(2,
"NOsh_parseAPOL: Got NULL thee!\n");
2516 if (sock == VNULL) {
2517 Vnm_print(2,
"NOsh_parseAPOL: Got pointer to NULL socket!\n");
2520 if (elec == VNULL) {
2521 Vnm_print(2,
"NOsh_parseAPOL: Got pointer to NULL elec object!\n");
2525 if (apolparm == VNULL) {
2526 Vnm_print(2,
"NOsh_parseAPOL: Got pointer to NULL apolparm object!\n");
2530 Vnm_print(0,
"NOsh_parseAPOL: Parsing parameters for APOL calculation\n");
2534 while (Vio_scanf(sock,
"%s", tok) == 1) {
2536 Vnm_print(0,
"NOsh_parseAPOL: Parsing %s...\n", tok);
2548 Vnm_print(0,
"NOsh_parseFEM: parseMG error!\n");
2550 }
else if (rc == 0) {
2552 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
2560 if (rc == -1)
return 0;
2561 if (rc == 0)
return 0;
2565 Vnm_print(2,
"NOsh: APOL parameters not set correctly!\n");
2574 VPRIVATE
int NOsh_setupCalcAPOL(
2581 VASSERT(thee != VNULL);
2582 VASSERT(apol != VNULL);
2589 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2590 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2605 VPRIVATE
int NOsh_setupCalcBEMMANUAL(
2614 if (thee == VNULL) {
2615 Vnm_print(2,
"NOsh_setupCalcBEMMANUAL: Got NULL thee!\n");
2618 if (elec == VNULL) {
2619 Vnm_print(2,
"NOsh_setupCalcBEMMANUAL: Got NULL calc!\n");
2623 if (bemparm == VNULL) {
2624 Vnm_print(2,
"NOsh_setupCalcBEMMANUAL: Got NULL bemparm -- was this calculation \ 2629 if (pbeparm == VNULL) {
2630 Vnm_print(2,
"NOsh_setupCalcBEMMANUAL: Got NULL pbeparm -- was this calculation \ 2644 if (bemparm->
setmac == 0) {
2652 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2653 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2670 VPRIVATE
int NOsh_setupCalcGEOFLOWMANUAL(
2680 if (thee == VNULL) {
2681 Vnm_print(2,
"NOsh_setupCalcGEOFLOWMANUAL: Got NULL thee!\n");
2684 if (elec == VNULL) {
2685 Vnm_print(2,
"NOsh_setupCalcGEOFLOWMANUAL: Got NULL calc!\n");
2689 if (parm == VNULL) {
2690 Vnm_print(2,
"NOsh_setupCalcGEOFLOWMANUAL: Got NULL geoflowparm -- was this calculation \ 2695 if (parm == VNULL) {
2696 Vnm_print(2,
"NOsh_setupCalcGEOFLOWMANUAL: Got NULL apolparm -- was this calculation \ 2701 if (pbeparm == VNULL) {
2702 Vnm_print(2,
"NOsh_setupCalcGEOFLOWMANUAL: Got NULL pbeparm -- was this calculation \ 2711 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2712 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2728 VPRIVATE
int NOsh_setupCalcPBAMAUTO(
2737 if (thee == VNULL) {
2738 Vnm_print(2,
"NOsh_setupCalcPBAMAUTO: Got NULL thee!\n");
2741 if (elec == VNULL) {
2742 Vnm_print(2,
"NOsh_setupCalcPBAMAUTO: Got NULL calc!\n");
2746 if (parm == VNULL) {
2747 Vnm_print(2,
"NOsh_setupCalcPBAMAUTO: Got NULL pbamparm -- was this calculation \ 2752 if (pbeparm == VNULL) {
2753 Vnm_print(2,
"NOsh_setupCalcPBAMAUTO: Got NULL pbeparm -- was this calculation \ 2762 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2763 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2779 VPRIVATE
int NOsh_setupCalcPBSAMAUTO(
2789 if (thee == VNULL) {
2790 Vnm_print(2,
"NOsh_setupCalcPBSAMAUTO: Got NULL thee!\n");
2793 if (elec == VNULL) {
2794 Vnm_print(2,
"NOsh_setupCalcPBSAMAUTO: Got NULL calc!\n");
2798 if (parm == VNULL) {
2799 Vnm_print(2,
"NOsh_setupCalcPBSAMAUTO: Got NULL pbamparm -- was this calculation \ 2804 if (samparm == VNULL) {
2805 Vnm_print(2,
"NOsh_setupCalcPBSAMAUTO: Got NULL pbsamparm -- was this calculation \ 2810 if (pbeparm == VNULL) {
2811 Vnm_print(2,
"NOsh_setupCalcPBAMAUTO: Got NULL pbeparm -- was this calculation \ 2820 Vnm_print(2,
"NOsh: Too many calculations in this run!\n");
2821 Vnm_print(2,
"NOsh: Current max is %d; ignoring this calculation\n",
2838 VPUBLIC
int NOsh_parseBEM(
2844 char tok[VMAX_BUFSIZE];
2850 if (thee == VNULL) {
2851 Vnm_print(2,
"NOsh: Got NULL thee!\n");
2854 if (sock == VNULL) {
2855 Vnm_print(2,
"NOsh: Got pointer to NULL socket!\n");
2858 if (elec == VNULL) {
2859 Vnm_print(2,
"NOsh: Got pointer to NULL elec object!\n");
2863 if (bemparm == VNULL) {
2864 Vnm_print(2,
"NOsh: Got pointer to NULL bemparm object!\n");
2868 if (pbeparm == VNULL) {
2869 Vnm_print(2,
"NOsh: Got pointer to NULL pbeparm object!\n");
2873 Vnm_print(0,
"NOsh_parseBEM: Parsing parameters for BEM calculation\n");
2878 while (Vio_scanf(sock,
"%s", tok) == 1) {
2880 Vnm_print(0,
"NOsh_parseBEM: Parsing %s...\n", tok);
2893 Vnm_print(0,
"NOsh_parseBEM: parsePBE error!\n");
2895 }
else if (rc == 0) {
2899 Vnm_print(0,
"NOsh_parseBEM: parseBEM error!\n");
2901 }
else if (rc == 0) {
2903 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
2911 if (rc == -1)
return 0;
2912 if (rc == 0)
return 0;
2916 Vnm_print(2,
"NOsh: BEM parameters not set correctly!\n");
2923 VPUBLIC
int NOsh_parseGEOFLOW(
2929 char tok[VMAX_BUFSIZE];
2936 if (thee == VNULL) {
2937 Vnm_print(2,
"NOsh: Got NULL thee!\n");
2940 if (sock == VNULL) {
2941 Vnm_print(2,
"NOsh: Got pointer to NULL socket!\n");
2944 if (elec == VNULL) {
2945 Vnm_print(2,
"NOsh: Got pointer to NULL elec object!\n");
2949 if (parm == VNULL) {
2950 Vnm_print(2,
"NOsh: Got pointer to NULL geoflowparm object!\n");
2954 if (parm == VNULL) {
2955 Vnm_print(2,
"NOsh: Got pointer to NULL apolparm object!\n");
2959 if (pbeparm == VNULL) {
2960 Vnm_print(2,
"NOsh: Got pointer to NULL pbeparm object!\n");
2964 Vnm_print(0,
"NOsh_parseGEOFLOW: Parsing parameters for GEOFLOW calculation\n");
2969 while (Vio_scanf(sock,
"%s", tok) == 1) {
2971 Vnm_print(0,
"NOsh_parseGEOFLOW: Parsing %s...\n", tok);
2983 Vnm_print(2,
"parseGEOFLOW: WARNING! ion not implemented for geometric flow!\n");
2989 Vnm_print(0,
"NOsh_parseGEOFLOW: parsePBE error!\n");
2991 }
else if (rc == 0) {
2995 Vnm_print(0,
"NOsh_parseAPOL: parseAPOL error!\n");
2997 }
else if (rc == 0) {
3000 Vnm_print(0,
"NOsh_parseGEOFLOW: parseGEOFLOW error!\n");
3002 }
else if (rc == 0) {
3004 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
3018 if (rc == -1)
return 0;
3019 if (rc == 0)
return 0;
3023 Vnm_print(2,
"NOsh: GEOFLOW parameters not set correctly!\n");
3028 Vnm_print(2,
"NOsh_parseGEOFLOW: Geoflow currently only supports mdh boundary conditions!\n");
3029 Vnm_print(2,
"NOsh_parseGEOFLOW: please change bcfl keyword.\n");
3037 VPUBLIC
int NOsh_parsePBAM(
3043 char tok[VMAX_BUFSIZE];
3049 if (thee == VNULL) {
3050 Vnm_print(2,
"NOsh: Got NULL thee!\n");
3053 if (sock == VNULL) {
3054 Vnm_print(2,
"NOsh: Got pointer to NULL socket!\n");
3057 if (elec == VNULL) {
3058 Vnm_print(2,
"NOsh: Got pointer to NULL elec object!\n");
3062 if (parm == VNULL) {
3063 Vnm_print(2,
"NOsh: Got pointer to NULL pbam object!\n");
3067 if (pbeparm == VNULL) {
3068 Vnm_print(2,
"NOsh: Got pointer to NULL pbeparm object!\n");
3071 Vnm_print(0,
"NOsh_parsePBAM: Parsing parameters for PBAM calculation\n");
3075 while (Vio_scanf(sock,
"%s", tok) == 1) {
3077 Vnm_print(0,
"NOsh_parsePBAM: Parsing %s...\n", tok);
3088 Vnm_print(2,
"parsePBAM: WARNING! ion not implemented for PBAM!\n");
3094 Vnm_print(0,
"NOsh_parsePBAM: parsePBE error!\n");
3096 }
else if (rc == 0) {
3099 Vnm_print(0,
"NOsh_parsePBAM: parsePBAM error!\n");
3101 }
else if (rc == 0) {
3103 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
3120 if (rc == -1)
return 0;
3121 if (rc == 0)
return 0;
3125 Vnm_print(2,
"NOsh: PBAM parameters not set correctly!\n");
3131 VPUBLIC
int NOsh_parsePBSAM(
3137 char tok[VMAX_BUFSIZE];
3144 if (thee == VNULL) {
3145 Vnm_print(2,
"NOsh: Got NULL thee!\n");
3148 if (sock == VNULL) {
3149 Vnm_print(2,
"NOsh: Got pointer to NULL socket!\n");
3152 if (elec == VNULL) {
3153 Vnm_print(2,
"NOsh: Got pointer to NULL elec object!\n");
3157 if (parm == VNULL) {
3158 Vnm_print(2,
"NOsh: Got pointer to NULL pbam object!\n");
3162 if (samparm == VNULL) {
3163 Vnm_print(2,
"NOsh: Got pointer to NULL pbsam object!\n");
3167 if (pbeparm == VNULL) {
3168 Vnm_print(2,
"NOsh: Got pointer to NULL pbeparm object!\n");
3171 Vnm_print(0,
"NOsh_parsePBSAM: Parsing parameters for PBSAM calculation\n");
3175 while (Vio_scanf(sock,
"%s", tok) == 1) {
3177 Vnm_print(0,
"NOsh_parsePBSAM: Parsing %s...\n", tok);
3189 Vnm_print(2,
"parsePBSAM: WARNING! ion not implemented for PBSAM!\n");
3195 Vnm_print(0,
"NOsh_parsePBSAM: parsePBE error!\n");
3197 }
else if (rc == 0) {
3200 Vnm_print(0,
"NOsh_parsePBSAM: parsePBAM error!\n");
3202 }
else if ( rc == 0 ) {
3205 Vnm_print(0,
"NOsh_parsePBSAM: parsePBSAM error!\n");
3207 }
else if (rc == 0) {
3209 Vnm_print(2,
"NOsh: Unrecognized keyword: %s\n", tok);
3226 if (rc == -1)
return 0;
3227 if (rc == 0)
return 0;
3233 Vnm_print(2,
"NOsh: PBSAM parameters not set correctly!\n");
VPUBLIC Vrc_Codes MGparm_parseToken(MGparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
VPUBLIC FEMparm * FEMparm_ctor(FEMparm_CalcType type)
Construct FEMparm.
VPUBLIC int NOsh_setupApolCalc(NOsh *thee, Valist *alist[NOSH_MAXMOL])
Setup the series of non-polar calculations.
Vdata_Format meshfmt[NOSH_MAXMOL]
#define VFLOOR(value)
Wrapped floor to fix floating point issues in the Intel compiler.
VPUBLIC int NOsh_apol2calc(NOsh *thee, int icalc)
Return the name of an apol statement.
VPUBLIC int NOsh_printNarg(NOsh *thee, int iprint)
Return number of arguments to PRINT statement (.
Parameter structure for GEOFLOW-specific variables from input files.
enum eVdata_Format Vdata_Format
Declaration of the Vdata_Format type as the Vdata_Format enum.
int apol2calc[NOSH_MAXCALC]
VPUBLIC char * NOsh_getPotpath(NOsh *thee, int imol)
Returns path to specified potential map.
VPUBLIC Vrc_Codes APOLparm_parseToken(APOLparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
#define NOSH_MAXMOL
Maximum number of molecules in a run.
VPUBLIC int NOsh_ctor2(NOsh *thee, int rank, int size)
FORTRAN stub to construct NOsh.
Vdata_Format dielfmt[NOSH_MAXMOL]
#define NOSH_MAXPRINT
Maximum number of PRINT statements in a run.
#define VAPBS_DOWN
Face definition for a volume.
VPUBLIC Vrc_Codes PBSAMparm_check(PBSAMparm *thee)
Consistency check for parameter values stored in object.
char potpath[NOSH_MAXMOL][VMAX_ARGLEN]
Parameter structure for PBAM-specific variables from input files.
VPUBLIC char * NOsh_getDielXpath(NOsh *thee, int imol)
Returns path to specified x-shifted dielectric map.
NOsh_PrintType printwhat[NOSH_MAXPRINT]
enum eNOsh_PrintType NOsh_PrintType
Declare NOsh_PrintType type.
VPUBLIC void MGparm_dtor(MGparm **thee)
Object destructor.
VPUBLIC void NOsh_dtor(NOsh **thee)
Object destructor.
char elecname[NOSH_MAXCALC][VMAX_ARGLEN]
VPUBLIC void FEMparm_copy(FEMparm *thee, FEMparm *source)
Copy target object into thee.
VPUBLIC void PBSAMparm_dtor(PBSAMparm **thee)
Object destructor.
VPUBLIC void BEMparm_copy(BEMparm *thee, BEMparm *parm)
Copy object info into thee.
VPUBLIC PBEparm * PBEparm_ctor()
Construct PBEparm object.
NOsh_calc * calc[NOSH_MAXCALC]
Contains declarations for class NOsh.
VPRIVATE char * MCcommChars
Comment characters for socket reads.
VPUBLIC void PBAMparm_dtor(PBAMparm **thee)
Object destructor.
VPUBLIC Vrc_Codes FEMparm_parseToken(FEMparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
GEOFLOWparm_CalcType type
VPUBLIC BEMparm * BEMparm_ctor(BEMparm_CalcType type)
Construct BEMparm object.
#define VAPBS_UP
Face definition for a volume.
GEOFLOWparm * geoflowparm
VPUBLIC void PBSAMparm_copy(PBSAMparm *thee, PBSAMparm *parm)
copy PBSAMparm object int thee.
VPUBLIC int FEMparm_check(FEMparm *thee)
Consistency check for parameter values stored in object.
VPUBLIC int NOsh_parseInputFile(NOsh *thee, char *filename)
Parse an input file only from a file.
VPUBLIC void NOsh_calc_dtor(NOsh_calc **thee)
Object destructor.
char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN]
VPUBLIC void FEMparm_dtor(FEMparm **thee)
Object destructor.
VPUBLIC Vrc_Codes APOLparm_check(APOLparm *thee)
Consistency check for parameter values stored in object.
#define NOSH_MAXPOP
Maximum number of operations in a PRINT statement.
VPUBLIC NOsh_PrintType NOsh_printWhat(NOsh *thee, int iprint)
Return an integer ID of the observable to print (.
VPUBLIC void BEMparm_dtor(BEMparm **thee)
Object destructor.
VPUBLIC char * NOsh_getDielZpath(NOsh *thee, int imol)
Returns path to specified z-shifted dielectric map.
VPUBLIC MGparm * MGparm_ctor(MGparm_CalcType type)
Construct MGparm object.
Vdata_Format potfmt[NOSH_MAXMOL]
VPUBLIC NOsh_calc * NOsh_getCalc(NOsh *thee, int icalc)
Returns specified calculation object.
NOsh_calc * elec[NOSH_MAXCALC]
VPUBLIC int PBEparm_parseToken(PBEparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse a keyword from an input file.
VPUBLIC void PBAMparm_copy(PBAMparm *thee, PBAMparm *parm)
copy PBAMparm object int thee.
Vdata_Format kappafmt[NOSH_MAXMOL]
VPUBLIC void MGparm_copy(MGparm *thee, MGparm *parm)
Copy MGparm object into thee.
VPUBLIC Vrc_Codes GEOFLOWparm_parseToken(GEOFLOWparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
Parameter structure for PBSAM-specific variables from input files.
VPUBLIC Vrc_Codes GEOFLOWparm_check(GEOFLOWparm *thee)
Consistency check for parameter values stored in object.
#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 int Vstring_strcasecmp(const char *s1, const char *s2)
Case-insensitive string comparison (BSD standard)
VPUBLIC Vrc_Codes PBSAMparm_parseToken(PBSAMparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
VPUBLIC void GEOFLOWparm_copy(GEOFLOWparm *thee, GEOFLOWparm *parm)
copy GEOFLOWparm object int thee.
VPUBLIC int Vstring_isdigit(const char *tok)
A modified sscanf that examines the complete string.
VPUBLIC void PBEparm_copy(PBEparm *thee, PBEparm *parm)
Copy PBEparm object into thee.
Parameter structure for BEM-specific variables from input files.
VPUBLIC int NOsh_printOp(NOsh *thee, int iprint, int iarg)
Return integer ID for specified operation (.
Parameter structure for FEM-specific variables from input files.
VPUBLIC void APOLparm_copy(APOLparm *thee, APOLparm *source)
Copy target object into thee.
VPUBLIC void PBEparm_dtor(PBEparm **thee)
Object destructor.
VPUBLIC int NOsh_getPotfmt(NOsh *thee, int i)
Returns format of specified potential map.
int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP]
VPUBLIC int PBEparm_check(PBEparm *thee)
Consistency check for parameter values stored in object.
#define VAPBS_BACK
Face definition for a volume.
NOsh_MolFormat molfmt[NOSH_MAXMOL]
char chargepath[NOSH_MAXMOL][VMAX_ARGLEN]
Valist * alist[NOSH_MAXMOL]
VPUBLIC Vrc_Codes MGparm_check(MGparm *thee)
Consistency check for parameter values stored in object.
Parameter structure for PBE variables from input files.
VPUBLIC Vrc_Codes PBAMparm_parseToken(PBAMparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
enum eNOsh_ParmFormat NOsh_ParmFormat
Declare NOsh_ParmFormat type.
#define VAPBS_FRONT
Face definition for a volume.
PBEparm_calcForce calcforce
int printnarg[NOSH_MAXPRINT]
enum eNOsh_CalcType NOsh_CalcType
Declare NOsh_CalcType type.
NOsh_calc * apol[NOSH_MAXCALC]
char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN]
VPUBLIC PBAMparm * PBAMparm_ctor(PBAMparm_CalcType type)
Construct PBAMparm object.
Parameter structure for MG-specific variables from input files.
Vdata_Format chargefmt[NOSH_MAXMOL]
VPUBLIC char * NOsh_getMolpath(NOsh *thee, int imol)
Returns path to specified molecule.
VPUBLIC void NOsh_dtor2(NOsh *thee)
FORTRAN stub for object destructor.
VPUBLIC NOsh * NOsh_ctor(int rank, int size)
Construct NOsh.
VPUBLIC APOLparm * APOLparm_ctor()
Construct APOLparm.
VPUBLIC void APOLparm_dtor(APOLparm **thee)
Object destructor.
Container class for list of atom objects.
VPUBLIC int NOsh_getChargefmt(NOsh *thee, int i)
Returns format of specified charge map.
VPUBLIC char * NOsh_getKappapath(NOsh *thee, int imol)
Returns path to specified kappa map.
VPUBLIC int NOsh_printCalc(NOsh *thee, int iprint, int iarg)
Return calculation ID for specified PRINT statement (.
Class for parsing fixed format input files.
char meshpath[NOSH_MAXMOL][VMAX_ARGLEN]
Calculation class for use when parsing fixed format input files.
int elec2calc[NOSH_MAXCALC]
VPUBLIC char * NOsh_getDielYpath(NOsh *thee, int imol)
Returns path to specified y-shifted dielectric map.
VPUBLIC char * NOsh_elecname(NOsh *thee, int ielec)
Return an integer mapping of an ELEC statement to a calculation ID (.
#define NOSH_MAXCALC
Maximum number of calculations in a run.
VPUBLIC Vrc_Codes PBAMparm_check(PBAMparm *thee)
Consistency check for parameter values stored in object.
enum eNOsh_MolFormat NOsh_MolFormat
Declare NOsh_MolFormat type.
VPUBLIC void GEOFLOWparm_dtor(GEOFLOWparm **thee)
Object destructor.
VPUBLIC int NOsh_calc_copy(NOsh_calc *thee, NOsh_calc *source)
Copy NOsh_calc object into thee.
VPUBLIC NOsh_calc * NOsh_calc_ctor(NOsh_CalcType calctype)
Construct NOsh_calc.
char parmpath[VMAX_ARGLEN]
VPUBLIC Vrc_Codes BEMparm_parseToken(BEMparm *thee, char tok[VMAX_BUFSIZE], Vio *sock)
Parse an MG keyword from an input file.
VPUBLIC Vrc_Codes BEMparm_check(BEMparm *thee)
Consistency check for parameter values stored in object.
int printop[NOSH_MAXPRINT][NOSH_MAXPOP]
char molpath[NOSH_MAXMOL][VMAX_ARGLEN]
VPUBLIC int NOsh_getKappafmt(NOsh *thee, int i)
Returns format of specified kappa map.
VPRIVATE char * MCwhiteChars
Whitespace characters for socket reads.
VPUBLIC int NOsh_elec2calc(NOsh *thee, int icalc)
Return the name of an elec statement.
char apolname[NOSH_MAXCALC][VMAX_ARGLEN]
VPUBLIC char * NOsh_getChargepath(NOsh *thee, int imol)
Returns path to specified charge distribution map.
Parameter structure for APOL-specific variables from input files.
VPUBLIC PBSAMparm * PBSAMparm_ctor(PBSAMparm_CalcType type)
Construct PBSAMparm object.
VPUBLIC int NOsh_getDielfmt(NOsh *thee, int i)
Returns format of specified dielectric map.
#define VREDFRAC
Maximum reduction of grid spacing during a focusing calculation.
VPUBLIC GEOFLOWparm * GEOFLOWparm_ctor(GEOFLOWparm_CalcType type)
Construct GEOFLOWparm object.
#define VAPBS_LEFT
Face definition for a volume.
#define VAPBS_RIGHT
Face definition for a volume.
char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN]
char kappapath[NOSH_MAXMOL][VMAX_ARGLEN]