00001 00052 #ifndef _VPMG_H_ 00053 #define _VPMG_H_ 00054 00055 /* Generic headers */ 00056 #include "maloc/maloc.h" 00057 #include "apbs/vhal.h" 00058 00059 /* Headers specific to this file */ 00060 #include "apbs/vpmgp.h" 00061 #include "apbs/vacc.h" 00062 #include "apbs/vcap.h" 00063 #include "apbs/vpbe.h" 00064 #include "apbs/vgrid.h" 00065 #include "apbs/mgparm.h" 00066 #include "apbs/pbeparm.h" 00067 00072 #define VPMGMAXPART 2000 00073 00083 struct sVpmg { 00084 00085 Vmem *vmem; 00086 Vpmgp *pmgp; 00087 Vpbe *pbe; 00089 double *epsx; 00090 double *epsy; 00091 double *epsz; 00092 double *kappa; 00093 double *charge; 00095 int *iparm; 00096 double *rparm; 00097 int *iwork; 00098 double *rwork; 00099 double *a1cf; 00101 double *a2cf; 00103 double *a3cf; 00105 double *ccf; 00106 double *fcf; 00107 double *tcf; 00108 double *u; 00109 double *xf; 00110 double *yf; 00111 double *zf; 00112 double *gxcf; 00113 double *gycf; 00114 double *gzcf; 00115 double *pvec; 00116 double extDiEnergy; 00118 double extQmEnergy; 00120 double extQfEnergy; 00122 double extNpEnergy; 00124 Vsurf_Meth surfMeth; 00125 double splineWin; 00126 Vchrg_Meth chargeMeth; 00128 int filled; 00130 int useDielXMap; 00132 Vgrid *dielXMap; 00133 int useDielYMap; 00135 Vgrid *dielYMap; 00136 int useDielZMap; 00138 Vgrid *dielZMap; 00139 int useKappaMap; 00141 Vgrid *kappaMap; 00142 int useChargeMap; 00144 Vgrid *chargeMap; 00145 }; 00146 00151 typedef struct sVpmg Vpmg; 00152 00153 /* ///////////////////////////////////////////////////////////////////////// 00156 #if !defined(VINLINE_VPMG) 00157 00164 unsigned long int Vpmg_memChk( 00165 Vpmg *thee 00166 ); 00167 00168 #else /* if defined(VINLINE_VPMG) */ 00169 00170 # define Vpmg_memChk(thee) (Vmem_bytes((thee)->vmem)) 00171 00172 #endif /* if !defined(VINLINE_VPMG) */ 00173 00174 /* ///////////////////////////////////////////////////////////////////////// 00177 00182 Vpmg* Vpmg_ctor( 00183 Vpmgp *parms, 00184 Vpbe *pbe, 00185 int focusFlag, 00186 Vpmg *pmgOLD, 00187 MGparm *mgparm, 00189 PBEparm_calcEnergy energyFlag 00191 ); 00192 00200 int Vpmg_ctor2( 00201 Vpmg *thee, 00202 Vpmgp *parms, 00203 Vpbe *pbe, 00204 int focusFlag, 00205 Vpmg *pmgOLD, 00207 MGparm *mgparm, 00209 PBEparm_calcEnergy energyFlag 00212 ); 00213 00218 void Vpmg_dtor( 00219 Vpmg **thee 00221 ); 00222 00227 void Vpmg_dtor2( 00228 Vpmg *thee 00229 ); 00230 00236 int Vpmg_fillco( 00237 Vpmg *thee, 00238 Vsurf_Meth surfMeth, 00239 double splineWin, 00241 Vchrg_Meth chargeMeth, 00242 int useDielXMap, 00243 Vgrid *dielXMap, 00244 int useDielYMap, 00245 Vgrid *dielYMap, 00246 int useDielZMap, 00247 Vgrid *dielZMap, 00248 int useKappaMap, 00249 Vgrid *kappaMap, 00250 int useChargeMap, 00251 Vgrid *chargeMap 00252 ); 00253 00259 int Vpmg_solve( 00260 Vpmg *thee 00261 ); 00262 00274 int Vpmg_solveLaplace( 00275 Vpmg *thee 00276 ); 00277 00287 double Vpmg_energy( 00288 Vpmg *thee, 00289 int extFlag 00293 ); 00294 00312 double Vpmg_qfEnergy( 00313 Vpmg *thee, 00314 int extFlag 00318 ); 00319 00339 double Vpmg_qfAtomEnergy( 00340 Vpmg *thee, 00341 Vatom *atom 00342 ); 00343 00368 double Vpmg_qmEnergy( 00369 Vpmg *thee, 00370 int extFlag 00374 ); 00375 00376 00395 double Vpmg_dielEnergy( 00396 Vpmg *thee, 00397 int extFlag 00401 ); 00402 00403 00430 double Vpmg_npEnergy( 00431 Vpmg *thee, 00432 int extFlag 00436 ); 00437 00454 double Vpmg_dielGradNorm( 00455 Vpmg *thee 00456 ); 00457 00469 int Vpmg_force( 00470 Vpmg *thee, 00471 double *force, 00473 int atomID, 00474 Vsurf_Meth srfm, 00475 Vchrg_Meth chgm 00476 ); 00477 00489 int Vpmg_qfForce( 00490 Vpmg *thee, 00491 double *force, 00493 int atomID, 00494 Vchrg_Meth chgm 00495 ); 00496 00508 int Vpmg_dbnpForce( 00509 Vpmg *thee, 00510 double *dbForce, 00512 double *npForce, 00514 int atomID, 00515 Vsurf_Meth srfm 00516 ); 00517 00529 int Vpmg_ibForce( 00530 Vpmg *thee, 00531 double *force, 00533 int atomID, 00534 Vsurf_Meth srfm 00535 ); 00536 00542 void Vpmg_setPart( 00543 Vpmg *thee, 00544 double lowerCorner[3], 00545 double upperCorner[3], 00546 int bflags[6] 00550 ); 00551 00556 void Vpmg_unsetPart( 00557 Vpmg *thee 00558 ); 00559 00565 int Vpmg_fillArray( 00566 Vpmg *thee, 00567 double *vec, 00569 Vdata_Type type, 00570 double parm, 00571 Vhal_PBEType pbetype 00572 ); 00573 00580 void Vpmg_printColComp( 00581 Vpmg *thee, 00582 char path[72], 00583 char title[72], 00584 char mxtype[3], 00592 int flag 00596 ); 00597 00598 #endif /* ifndef _VPMG_H_ */ 00599