00001 00063 #ifndef _VPMG_H_ 00064 #define _VPMG_H_ 00065 00066 /* Generic headers */ 00067 #include "maloc/maloc.h" 00068 #include "apbs/vhal.h" 00069 00070 /* Headers specific to this file */ 00071 #include "apbs/vpmgp.h" 00072 #include "apbs/vacc.h" 00073 #include "apbs/vcap.h" 00074 #include "apbs/vpbe.h" 00075 #include "apbs/vgrid.h" 00076 #include "apbs/mgparm.h" 00077 #include "apbs/pbeparm.h" 00078 00083 #define VPMGMAXPART 2000 00084 00094 struct sVpmg { 00095 00096 Vmem *vmem; 00097 Vpmgp *pmgp; 00098 Vpbe *pbe; 00100 double *epsx; 00101 double *epsy; 00102 double *epsz; 00103 double *kappa; 00104 double *charge; 00106 int *iparm; 00107 double *rparm; 00108 int *iwork; 00109 double *rwork; 00110 double *a1cf; 00112 double *a2cf; 00114 double *a3cf; 00116 double *ccf; 00117 double *fcf; 00118 double *tcf; 00119 double *u; 00120 double *xf; 00121 double *yf; 00122 double *zf; 00123 double *gxcf; 00124 double *gycf; 00125 double *gzcf; 00126 double *pvec; 00127 double extDiEnergy; 00129 double extQmEnergy; 00131 double extQfEnergy; 00133 double extNpEnergy; 00135 Vsurf_Meth surfMeth; 00136 double splineWin; 00137 Vchrg_Meth chargeMeth; 00138 Vchrg_Src chargeSrc; 00140 int filled; 00142 int useDielXMap; 00144 Vgrid *dielXMap; 00145 int useDielYMap; 00147 Vgrid *dielYMap; 00148 int useDielZMap; 00150 Vgrid *dielZMap; 00151 int useKappaMap; 00153 Vgrid *kappaMap; 00154 int useChargeMap; 00156 Vgrid *chargeMap; 00157 }; 00158 00163 typedef struct sVpmg Vpmg; 00164 00165 /* ///////////////////////////////////////////////////////////////////////// 00168 #if !defined(VINLINE_VPMG) 00169 00176 unsigned long int Vpmg_memChk( 00177 Vpmg *thee 00178 ); 00179 00180 #else /* if defined(VINLINE_VPMG) */ 00181 00182 # define Vpmg_memChk(thee) (Vmem_bytes((thee)->vmem)) 00183 00184 #endif /* if !defined(VINLINE_VPMG) */ 00185 00186 /* ///////////////////////////////////////////////////////////////////////// 00189 00194 Vpmg* Vpmg_ctor( 00195 Vpmgp *parms, 00196 Vpbe *pbe, 00197 int focusFlag, 00198 Vpmg *pmgOLD, 00199 MGparm *mgparm, 00200 PBEparm_calcEnergy energyFlag 00201 ); 00202 00210 int Vpmg_ctor2( 00211 Vpmg *thee, 00212 Vpmgp *parms, 00213 Vpbe *pbe, 00214 int focusFlag, 00215 Vpmg *pmgOLD, 00217 MGparm *mgparm, 00219 PBEparm_calcEnergy energyFlag 00222 ); 00223 00228 void Vpmg_dtor( 00229 Vpmg **thee 00231 ); 00232 00237 void Vpmg_dtor2( 00238 Vpmg *thee 00239 ); 00240 00246 int Vpmg_fillco( 00247 Vpmg *thee, 00248 Vsurf_Meth surfMeth, 00249 double splineWin, 00251 Vchrg_Meth chargeMeth, 00252 int useDielXMap, 00253 Vgrid *dielXMap, 00254 int useDielYMap, 00255 Vgrid *dielYMap, 00256 int useDielZMap, 00257 Vgrid *dielZMap, 00258 int useKappaMap, 00259 Vgrid *kappaMap, 00260 int useChargeMap, 00261 Vgrid *chargeMap 00262 ); 00263 00269 int Vpmg_solve( 00270 Vpmg *thee 00271 ); 00272 00284 int Vpmg_solveLaplace( 00285 Vpmg *thee 00286 ); 00287 00297 double Vpmg_energy( 00298 Vpmg *thee, 00299 int extFlag 00303 ); 00304 00322 double Vpmg_qfEnergy( 00323 Vpmg *thee, 00324 int extFlag 00328 ); 00329 00349 double Vpmg_qfAtomEnergy( 00350 Vpmg *thee, 00351 Vatom *atom 00352 ); 00353 00378 double Vpmg_qmEnergy( 00379 Vpmg *thee, 00380 int extFlag 00384 ); 00385 00386 00405 double Vpmg_dielEnergy( 00406 Vpmg *thee, 00407 int extFlag 00411 ); 00412 00413 00430 double Vpmg_dielGradNorm( 00431 Vpmg *thee 00432 ); 00433 00445 int Vpmg_force( 00446 Vpmg *thee, 00447 double *force, 00449 int atomID, 00450 Vsurf_Meth srfm, 00451 Vchrg_Meth chgm 00452 ); 00453 00465 int Vpmg_qfForce( 00466 Vpmg *thee, 00467 double *force, 00469 int atomID, 00470 Vchrg_Meth chgm 00471 ); 00472 00484 int Vpmg_dbForce( 00485 Vpmg *thee, 00486 double *dbForce, 00488 int atomID, 00489 Vsurf_Meth srfm 00490 ); 00491 00503 int Vpmg_ibForce( 00504 Vpmg *thee, 00505 double *force, 00507 int atomID, 00508 Vsurf_Meth srfm 00509 ); 00510 00516 void Vpmg_setPart( 00517 Vpmg *thee, 00518 double lowerCorner[3], 00519 double upperCorner[3], 00520 int bflags[6] 00524 ); 00525 00530 void Vpmg_unsetPart( 00531 Vpmg *thee 00532 ); 00533 00539 int Vpmg_fillArray( 00540 Vpmg *thee, 00541 double *vec, 00543 Vdata_Type type, 00544 double parm, 00545 Vhal_PBEType pbetype 00546 ); 00547 00553 VPUBLIC void Vpmg_fieldSpline4( 00554 Vpmg *thee, 00555 int atomID, 00556 double field[3] 00557 ); 00558 00566 double Vpmg_qfPermanentMultipoleEnergy( 00567 Vpmg *thee, 00568 int atomID 00569 ); 00570 00576 void Vpmg_qfPermanentMultipoleForce( 00577 Vpmg *thee, 00578 int atomID, 00579 double force[3], 00580 double torque[3] 00581 ); 00582 00587 void Vpmg_ibPermanentMultipoleForce( 00588 Vpmg *thee, 00589 int atomID, 00590 double force[3] 00591 ); 00592 00597 void Vpmg_dbPermanentMultipoleForce( 00598 Vpmg *thee, 00599 int atomID, 00600 double force[3] 00601 ); 00602 00609 void Vpmg_qfDirectPolForce( 00610 Vpmg *thee, 00611 Vgrid *perm, 00612 Vgrid *induced, 00613 int atomID, 00614 double force[3], 00615 double torque[3] 00616 ); 00617 00626 void Vpmg_qfNLDirectPolForce( 00627 Vpmg *thee, 00628 Vgrid *perm, 00629 Vgrid *nlInduced, 00630 int atomID, 00631 double force[3], 00632 double torque[3] 00633 ); 00634 00642 void Vpmg_ibDirectPolForce( 00643 Vpmg *thee, 00644 Vgrid *perm, 00645 Vgrid *induced, 00646 int atomID, 00647 double force[3] 00648 ); 00649 00658 void Vpmg_ibNLDirectPolForce( 00659 Vpmg *thee, 00660 Vgrid *perm, 00661 Vgrid *nlInduced, 00662 int atomID, 00663 double force[3] 00664 ); 00665 00673 void Vpmg_dbDirectPolForce( 00674 Vpmg *thee, 00675 Vgrid *perm, 00676 Vgrid *induced, 00677 int atomID, 00678 double force[3] 00679 ); 00680 00689 void Vpmg_dbNLDirectPolForce( 00690 Vpmg *thee, 00691 Vgrid *perm, 00692 Vgrid *nlInduced, 00693 int atomID, 00694 double force[3] 00695 ); 00696 00703 void Vpmg_qfMutualPolForce( 00704 Vpmg *thee, 00705 Vgrid *induced, 00706 Vgrid *nlInduced, 00707 int atomID, 00708 double force[3] 00709 ); 00710 00718 void Vpmg_ibMutualPolForce( 00719 Vpmg *thee, 00720 Vgrid *induced, 00721 Vgrid *nlInduced, 00722 int atomID, 00723 double force[3] 00724 ); 00725 00733 void Vpmg_dbMutualPolForce( 00734 Vpmg *thee, 00735 Vgrid *induced, 00736 Vgrid *nlInduced, 00737 int atomID, 00738 double force[3] 00739 ); 00740 00747 void Vpmg_printColComp( 00748 Vpmg *thee, 00749 char path[72], 00750 char title[72], 00751 char mxtype[3], 00759 int flag 00763 ); 00764 00765 #endif /* ifndef _VPMG_H_ */ 00766 00767