00001 00067 #ifndef _VPMG_PRIVATE_H_ 00068 #define _VPMG_PRIVATE_H_ 00069 00070 #include "apbscfg.h" 00071 #include "apbs/vpmg.h" 00072 00073 /* /////////////////////////////////////////////////////////////////////////// 00074 // Internal routines 00076 00082 VPRIVATE double bspline2( 00083 double x 00084 ); 00085 00091 VPRIVATE double dbspline2( 00092 double x 00093 ); 00094 00100 VPRIVATE double VFCHI4( 00101 int i, 00102 double f 00103 ); 00104 00110 VPRIVATE double bspline4( 00111 double x 00112 ); 00113 00119 VPRIVATE double dbspline4( 00120 double x 00121 ); 00122 00128 VPRIVATE double d2bspline4( 00129 double x 00130 ); 00131 00137 VPRIVATE double d3bspline4( 00138 double x 00139 ); 00140 00147 VPRIVATE double Vpmg_polarizEnergy( 00148 Vpmg *thee, 00149 int extFlag 00151 ); 00158 VPRIVATE double Vpmg_qfEnergyPoint( 00159 Vpmg *thee, 00160 int extFlag 00162 ); 00163 00169 VPRIVATE double Vpmg_qfEnergyVolume( 00170 Vpmg *thee, 00171 int extFlag 00173 ); 00174 00180 VPRIVATE void Vpmg_splineSelect( 00181 int srfm, 00183 Vacc *acc, 00184 double *gpos, 00185 double win, 00186 double infrad, 00187 Vatom *atom, 00188 double *force 00189 ); 00190 00196 VPRIVATE void focusFillBound( 00197 Vpmg *thee, 00198 Vpmg *pmg 00199 ); 00200 00207 VPRIVATE void bcfl1( 00208 double size, 00209 double *apos, 00210 double charge, 00211 double xkappa, 00212 double pre1, 00213 double *gxcf, 00214 double *gycf, 00215 double *gzcf, 00216 double *xf, 00217 double *yf, 00218 double *zf, 00219 int nx, 00220 int ny, 00221 int nz 00222 ); 00223 00229 VPRIVATE void bcfl2( 00230 double size, 00231 double *apos, 00232 double charge, 00233 double *dipole, 00234 double *quad, 00235 double xkappa, 00236 double eps_p, 00237 double eps_w, 00238 double T, 00239 double *gxcf, 00240 double *gycf, 00241 double *gzcf, 00242 double *xf, 00243 double *yf, 00244 double *zf, 00245 int nx, 00246 int ny, 00247 int nz 00248 ); 00249 00258 VPRIVATE void multipolebc( 00259 double r, 00260 double kappa, 00261 double eps_p, 00262 double eps_w, 00263 double rad, 00264 double tsr[3] 00265 ); 00266 00275 VPRIVATE double bcfl1sp( 00276 double size, 00277 double *apos, 00278 double charge, 00279 double xkappa, 00280 double pre1, 00281 double *pos 00282 ); 00283 00288 VPRIVATE void bcCalc( 00289 Vpmg *thee 00290 ); 00291 00296 VPRIVATE void fillcoCoef( 00297 Vpmg *thee 00298 ); 00299 00304 VPRIVATE void fillcoCoefMap( 00305 Vpmg *thee 00306 ); 00307 00313 VPRIVATE void fillcoCoefMol( 00314 Vpmg *thee 00315 ); 00316 00322 VPRIVATE void fillcoCoefMolIon( 00323 Vpmg *thee 00324 ); 00325 00331 VPRIVATE void fillcoCoefMolDiel( 00332 Vpmg *thee 00333 ); 00334 00340 VPRIVATE void fillcoCoefMolDielNoSmooth( 00341 Vpmg *thee 00342 ); 00343 00357 VPRIVATE void fillcoCoefMolDielSmooth( 00358 Vpmg *thee 00359 ); 00360 00366 VPRIVATE void fillcoCoefSpline( 00367 Vpmg *thee 00368 ); 00369 00375 VPRIVATE void fillcoCoefSpline3( 00376 Vpmg *thee 00377 ); 00378 00384 VPRIVATE void fillcoCoefSpline4( 00385 Vpmg *thee 00386 ); 00387 00393 VPRIVATE Vrc_Codes fillcoCharge( 00394 Vpmg *thee 00395 ); 00396 00402 VPRIVATE Vrc_Codes fillcoChargeMap( 00403 Vpmg *thee 00404 ); 00405 00410 VPRIVATE void fillcoChargeSpline1( 00411 Vpmg *thee 00412 ); 00413 00418 VPRIVATE void fillcoChargeSpline2( 00419 Vpmg *thee 00420 ); 00421 00426 VPRIVATE void fillcoPermanentMultipole( 00427 Vpmg *thee 00428 ); 00429 00434 VPRIVATE void fillcoInducedDipole( 00435 Vpmg *thee 00436 ); 00437 00443 VPRIVATE void fillcoNLInducedDipole( 00444 Vpmg *thee 00445 ); 00446 00453 VPRIVATE void extEnergy( 00454 Vpmg *thee, 00455 Vpmg *pmgOLD, 00456 PBEparm_calcEnergy extFlag, 00457 double partMin[3], 00458 double partMax[3], 00459 int bflags[6] 00460 ); 00461 00466 VPRIVATE void qfForceSpline1( 00467 Vpmg *thee, 00468 double *force, 00469 int atomID 00470 ); 00471 00476 VPRIVATE void qfForceSpline2( 00477 Vpmg *thee, 00478 double *force, 00479 int atomID 00480 ); 00481 00486 VPRIVATE void qfForceSpline4( 00487 Vpmg *thee, 00488 double *force, 00489 int atomID 00490 ); 00491 00492 00500 VPRIVATE void zlapSolve( 00501 Vpmg *thee, 00502 double **solution, 00503 double **source, 00504 double **work1 00505 ); 00506 00513 VPRIVATE void markSphere( 00514 double rtot, 00515 double *tpos, 00516 int nx, 00517 int ny, 00518 int nz, 00519 double hx, 00520 double hy, 00521 double hzed, 00522 double xmin, 00523 double ymin, 00524 double zmin, 00525 double *array, 00526 double markVal 00527 ); 00528 00533 VPRIVATE double Vpmg_qmEnergySMPBE(Vpmg *thee, int extFlag); 00534 VPRIVATE double Vpmg_qmEnergyNONLIN(Vpmg *thee, int extFlag); 00535 00536 /* Added by Vincent Chu 9/13/06 for SMPB */ 00537 #define VCUB(x) ((x)*(x)*(x)) 00538 #define VLOG(x) (log(x)) 00539 00540 #define IJK(i,j,k) (((k)*(nx)*(ny))+((j)*(nx))+(i)) 00541 #define IJKx(j,k,i) (((i)*(ny)*(nz))+((k)*(ny))+(j)) 00542 #define IJKy(i,k,j) (((j)*(nx)*(nz))+((k)*(nx))+(i)) 00543 #define IJKz(i,j,k) (((k)*(nx)*(ny))+((j)*(nx))+(i)) 00544 #define VFCHI(iint,iflt) (1.5+((double)(iint)-(iflt))) 00545 00546 /* /////////////////////////////////////////////////////////////////////////// 00547 // External FORTRAN routines 00549 #define F77BCOLCOMP VF77_MANGLE(bcolcomp, BCOLCOMP) 00550 void F77BCOLCOMP(int *iparm, double *rparm, int *iwork, 00551 double *rwork, double *nzval, int *rowind, int *colptr, int *flag); 00552 00553 #define F77PCOLCOMP VF77_MANGLE(pcolcomp, PCOLCOMP) 00554 void F77PCOLCOMP(int *nrow, int *ncol, int *nonz, 00555 double *nzval, int *rowind, int *colptr, 00556 char *path, char *title, char *mxtype); 00557 00558 #define F77MGSZ VF77_MANGLE(mgsz, MGSZ) 00559 void F77MGSZ(int *mgcoar, int *mgdisc, int *mgsolv, int *nx, int *ny, 00560 int *nz, int *nlev, int *nxc, int *nyc, int *nyz, int *nf, int *nc, 00561 int *narr, int *narrc, int *n_rpc, int *n_iz, int *n_ipc, int *nrwk, 00562 int *niwk); 00563 00564 #define F77PACKMG VF77_MANGLE(packmg, PACKMG) 00565 void F77PACKMG(int *iparm, double *rparm, int *nrwk, int *niwk, 00566 int *nx, int *ny, int *nz, int *nlev, int *nu1, int *nu2, int *mgkey, 00567 int *itmax, int *istop, int *ipcon, int *nonlin, int *mgsmoo, int *mgprol, 00568 int *mgcoar, int *mgsolv, int *mgdisc, int *iinfo, double *errtol, 00569 int *ipkey, double *omegal, double *omegan, int *irite, int *iperf); 00570 00571 #define F77CGMGDRIV VF77_MANGLE(cgmgdriv, CGMGDRIV) 00572 void F77CGMGDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00573 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00574 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00575 double *fcf, double *tcf); 00576 00577 #define F77NEWDRIV VF77_MANGLE(newdriv, NEWDRIV) 00578 void F77NEWDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00579 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00580 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00581 double *fcf, double *tcf); 00582 00583 #define F77MGDRIV VF77_MANGLE(mgdriv, MGDRIV) 00584 void F77MGDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00585 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00586 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00587 double *fcf, double *tcf); 00588 00589 #define F77NCGHSDRIV VF77_MANGLE(ncghsdriv, NCGHSDRIV) 00590 void F77NCGHSDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00591 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00592 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00593 double *fcf, double *tcf); 00594 00595 #define F77NSORDRIV VF77_MANGLE(nsordriv, NSORDRIV) 00596 void F77NSORDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00597 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00598 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00599 double *fcf, double *tcf); 00600 00601 #define F77NGSRBDRIV VF77_MANGLE(ngsrbdriv, NGSRBDRIV) 00602 void F77NGSRBDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00603 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00604 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00605 double *fcf, double *tcf); 00606 00607 #define F77NWJACDRIV VF77_MANGLE(nwjacdriv, NWJACDRIV) 00608 void F77NWJACDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00609 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00610 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00611 double *fcf, double *tcf); 00612 00613 #define F77NRICHDRIV VF77_MANGLE(nrichdriv, NRICHDRIV) 00614 void F77NRICHDRIV(int *iparm, double *rparm, int *iwork, double *rwork, 00615 double *u, double *xf, double *yf, double *zf, double *gxcf, double *gycf, 00616 double *gzcf, double *a1cf, double *a2cf, double *a3cf, double *ccf, 00617 double *fcf, double *tcf); 00618 00619 #define F77TSECND VF77_MANGLE(tsecnd, TSECND) 00620 #define F77VPMGANORM VF77_MANGLE(vpmganorm, VPMGANORM) 00621 #define F77VPMGABAND VF77_MANGLE(vpmgaband, VPMGABAND) 00622 #define F77DPBFA VF77_MANGLE(dpbfa, DPBFA) 00623 #define F77DPBDI VF77_MANGLE(dpbdi, DPBDI) 00624 #define F77EIGDRIV VF77_MANGLE(eigdriv, EIGDRIV) 00625 #define F77ANORMDRIV VF77_MANGLE(anormdriv, ANORMDRIV) 00626 00627 #define F77MYPDEFINIT VF77_MANGLE(mypdefinit, MYPDEFINIT) 00628 void F77MYPDEFINIT(int *nion, double *ionQ, double *ionConc, 00629 int *pbeType,double *smvolume,double *smsize); 00630 00631 #define F77MYPDEFCLEAR VF77_MANGLE(mypdefclear, MYPDEFCLEAR) 00632 void F77MYPDEFCLEAR(); 00633 00634 #endif 00635 00636