00001 00075 #ifndef _VPMG_H_ 00076 #define _VPMG_H_ 00077 00078 /* Generic headers */ 00079 #include "maloc/maloc.h" 00080 #include "apbs/vhal.h" 00081 00082 /* Headers specific to this file */ 00083 #include "apbs/vpmgp.h" 00084 #include "apbs/vacc.h" 00085 #include "apbs/vcap.h" 00086 #include "apbs/vpbe.h" 00087 #include "apbs/vgrid.h" 00088 #include "apbs/mgparm.h" 00089 #include "apbs/pbeparm.h" 00090 00095 #define VPMGMAXPART 2000 00096 00106 struct sVpmg { 00107 00108 Vmem *vmem; 00109 Vpmgp *pmgp; 00110 Vpbe *pbe; 00112 double *epsx; 00113 double *epsy; 00114 double *epsz; 00115 double *kappa; 00116 double *charge; 00118 int *iparm; 00119 double *rparm; 00120 int *iwork; 00121 double *rwork; 00122 double *a1cf; 00124 double *a2cf; 00126 double *a3cf; 00128 double *ccf; 00129 double *fcf; 00130 double *tcf; 00131 double *u; 00132 double *xf; 00133 double *yf; 00134 double *zf; 00135 double *gxcf; 00136 double *gycf; 00137 double *gzcf; 00138 double *pvec; 00139 double extDiEnergy; 00141 double extQmEnergy; 00143 double extQfEnergy; 00145 double extNpEnergy; 00147 Vsurf_Meth surfMeth; 00148 double splineWin; 00149 Vchrg_Meth chargeMeth; 00150 Vchrg_Src chargeSrc; 00152 int filled; 00154 int useDielXMap; 00156 Vgrid *dielXMap; 00157 int useDielYMap; 00159 Vgrid *dielYMap; 00160 int useDielZMap; 00162 Vgrid *dielZMap; 00163 int useKappaMap; 00165 Vgrid *kappaMap; 00166 int useChargeMap; 00168 Vgrid *chargeMap; 00169 }; 00170 00175 typedef struct sVpmg Vpmg; 00176 00177 /* ///////////////////////////////////////////////////////////////////////// 00180 #if !defined(VINLINE_VPMG) 00181 00188 unsigned long int Vpmg_memChk( 00189 Vpmg *thee 00190 ); 00191 00192 #else /* if defined(VINLINE_VPMG) */ 00193 00194 # define Vpmg_memChk(thee) (Vmem_bytes((thee)->vmem)) 00195 00196 #endif /* if !defined(VINLINE_VPMG) */ 00197 00198 /* ///////////////////////////////////////////////////////////////////////// 00201 00206 Vpmg* Vpmg_ctor( 00207 Vpmgp *parms, 00208 Vpbe *pbe, 00209 int focusFlag, 00210 Vpmg *pmgOLD, 00211 MGparm *mgparm, 00213 PBEparm_calcEnergy energyFlag 00215 ); 00216 00224 int Vpmg_ctor2( 00225 Vpmg *thee, 00226 Vpmgp *parms, 00227 Vpbe *pbe, 00228 int focusFlag, 00229 Vpmg *pmgOLD, 00231 MGparm *mgparm, 00233 PBEparm_calcEnergy energyFlag 00236 ); 00237 00242 void Vpmg_dtor( 00243 Vpmg **thee 00245 ); 00246 00251 void Vpmg_dtor2( 00252 Vpmg *thee 00253 ); 00254 00260 int Vpmg_fillco( 00261 Vpmg *thee, 00262 Vsurf_Meth surfMeth, 00263 double splineWin, 00265 Vchrg_Meth chargeMeth, 00266 int useDielXMap, 00267 Vgrid *dielXMap, 00268 int useDielYMap, 00269 Vgrid *dielYMap, 00270 int useDielZMap, 00271 Vgrid *dielZMap, 00272 int useKappaMap, 00273 Vgrid *kappaMap, 00274 int useChargeMap, 00275 Vgrid *chargeMap 00276 ); 00277 00283 int Vpmg_solve( 00284 Vpmg *thee 00285 ); 00286 00298 int Vpmg_solveLaplace( 00299 Vpmg *thee 00300 ); 00301 00311 double Vpmg_energy( 00312 Vpmg *thee, 00313 int extFlag 00317 ); 00318 00336 double Vpmg_qfEnergy( 00337 Vpmg *thee, 00338 int extFlag 00342 ); 00343 00363 double Vpmg_qfAtomEnergy( 00364 Vpmg *thee, 00365 Vatom *atom 00366 ); 00367 00392 double Vpmg_qmEnergy( 00393 Vpmg *thee, 00394 int extFlag 00398 ); 00399 00400 00419 double Vpmg_dielEnergy( 00420 Vpmg *thee, 00421 int extFlag 00425 ); 00426 00427 00444 double Vpmg_dielGradNorm( 00445 Vpmg *thee 00446 ); 00447 00459 int Vpmg_force( 00460 Vpmg *thee, 00461 double *force, 00463 int atomID, 00464 Vsurf_Meth srfm, 00465 Vchrg_Meth chgm 00466 ); 00467 00479 int Vpmg_qfForce( 00480 Vpmg *thee, 00481 double *force, 00483 int atomID, 00484 Vchrg_Meth chgm 00485 ); 00486 00498 int Vpmg_dbForce( 00499 Vpmg *thee, 00500 double *dbForce, 00502 int atomID, 00503 Vsurf_Meth srfm 00504 ); 00505 00517 int Vpmg_ibForce( 00518 Vpmg *thee, 00519 double *force, 00521 int atomID, 00522 Vsurf_Meth srfm 00523 ); 00524 00530 void Vpmg_setPart( 00531 Vpmg *thee, 00532 double lowerCorner[3], 00533 double upperCorner[3], 00534 int bflags[6] 00538 ); 00539 00544 void Vpmg_unsetPart( 00545 Vpmg *thee 00546 ); 00547 00553 int Vpmg_fillArray( 00554 Vpmg *thee, 00555 double *vec, 00557 Vdata_Type type, 00558 double parm, 00559 Vhal_PBEType pbetype 00560 ); 00561 00567 VPUBLIC void Vpmg_fieldSpline4( 00568 Vpmg *thee, 00569 int atomID, 00570 double field[3] 00571 ); 00572 00580 double Vpmg_qfPermanentMultipoleEnergy( 00581 Vpmg *thee, 00582 int atomID 00583 ); 00584 00590 void Vpmg_qfPermanentMultipoleForce( 00591 Vpmg *thee, 00592 int atomID, 00593 double force[3], 00594 double torque[3] 00595 ); 00596 00601 void Vpmg_ibPermanentMultipoleForce( 00602 Vpmg *thee, 00603 int atomID, 00604 double force[3] 00605 ); 00606 00611 void Vpmg_dbPermanentMultipoleForce( 00612 Vpmg *thee, 00613 int atomID, 00614 double force[3] 00615 ); 00616 00623 void Vpmg_qfDirectPolForce( 00624 Vpmg *thee, 00625 Vgrid *perm, 00626 Vgrid *induced, 00627 int atomID, 00628 double force[3], 00629 double torque[3] 00630 ); 00631 00640 void Vpmg_qfNLDirectPolForce( 00641 Vpmg *thee, 00642 Vgrid *perm, 00643 Vgrid *nlInduced, 00644 int atomID, 00645 double force[3], 00646 double torque[3] 00647 ); 00648 00656 void Vpmg_ibDirectPolForce( 00657 Vpmg *thee, 00658 Vgrid *perm, 00659 Vgrid *induced, 00660 int atomID, 00661 double force[3] 00662 ); 00663 00672 void Vpmg_ibNLDirectPolForce( 00673 Vpmg *thee, 00674 Vgrid *perm, 00675 Vgrid *nlInduced, 00676 int atomID, 00677 double force[3] 00678 ); 00679 00687 void Vpmg_dbDirectPolForce( 00688 Vpmg *thee, 00689 Vgrid *perm, 00690 Vgrid *induced, 00691 int atomID, 00692 double force[3] 00693 ); 00694 00703 void Vpmg_dbNLDirectPolForce( 00704 Vpmg *thee, 00705 Vgrid *perm, 00706 Vgrid *nlInduced, 00707 int atomID, 00708 double force[3] 00709 ); 00710 00717 void Vpmg_qfMutualPolForce( 00718 Vpmg *thee, 00719 Vgrid *induced, 00720 Vgrid *nlInduced, 00721 int atomID, 00722 double force[3] 00723 ); 00724 00732 void Vpmg_ibMutualPolForce( 00733 Vpmg *thee, 00734 Vgrid *induced, 00735 Vgrid *nlInduced, 00736 int atomID, 00737 double force[3] 00738 ); 00739 00747 void Vpmg_dbMutualPolForce( 00748 Vpmg *thee, 00749 Vgrid *induced, 00750 Vgrid *nlInduced, 00751 int atomID, 00752 double force[3] 00753 ); 00754 00761 void Vpmg_printColComp( 00762 Vpmg *thee, 00763 char path[72], 00764 char title[72], 00765 char mxtype[3], 00773 int flag 00777 ); 00778 00779 #endif /* ifndef _VPMG_H_ */ 00780 00781