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 00070 #define VPMGMAXPART 2000 00071 00081 struct sVpmg { 00082 00083 Vmem *vmem; 00084 Vpmgp *pmgp; 00085 Vpbe *pbe; 00087 int *iparm; 00088 double *rparm; 00089 int *iwork; 00090 double *rwork; 00091 double *a1cf; 00092 double *a2cf; 00093 double *a3cf; 00094 double *ccf; 00095 double *fcf; 00096 double *tcf; 00097 double *u; 00098 double *xf; 00099 double *yf; 00100 double *zf; 00101 double *gxcf; 00102 double *gycf; 00103 double *gzcf; 00104 int *pvec; 00105 double extDiEnergy; 00108 double extQmEnergy; 00111 double extQfEnergy; 00114 double extNpEnergy; 00117 Vsurf_Meth surfMeth; 00118 double splineWin; 00119 Vchrg_Meth chargeMeth; 00120 int filled; 00122 int useDielXMap; 00124 Vgrid *dielXMap; 00125 int useDielYMap; 00127 Vgrid *dielYMap; 00128 int useDielZMap; 00130 Vgrid *dielZMap; 00131 int useKappaMap; 00133 Vgrid *kappaMap; 00134 int useChargeMap; 00136 Vgrid *chargeMap; 00137 }; 00138 00143 typedef struct sVpmg Vpmg; 00144 00145 /* 00146 00147 00148 #if !defined(VINLINE_VPMG) 00149 00157 int Vpmg_memChk(Vpmg *thee); 00158 00159 #else /* if defined(VINLINE_VPMG) */ 00160 00161 # define Vpmg_memChk(thee) (Vmem_bytes((thee)->vmem)) 00162 00163 #endif /* if !defined(VINLINE_VPMG) */ 00164 00165 /* 00166 00167 00168 00175 Vpmg* Vpmg_ctor(Vpmgp *parms, Vpbe *pbe); 00176 00185 int Vpmg_ctor2(Vpmg *thee, Vpmgp *parms, Vpbe *pbe); 00186 00207 Vpmg* Vpmg_ctorFocus(Vpmgp *parms, Vpbe *pbe, Vpmg *pmgOLD, 00208 int energyFlag); 00209 00231 int Vpmg_ctor2Focus(Vpmg *thee, Vpmgp *parms, Vpbe *pbe, Vpmg *pmgOLD, 00232 int energyFlag); 00233 00239 void Vpmg_dtor(Vpmg **thee); 00240 00246 void Vpmg_dtor2(Vpmg *thee); 00247 00280 void Vpmg_fillco(Vpmg *thee, 00281 Vsurf_Meth surfMeth, double splineWin, Vchrg_Meth chargeMeth, 00282 int useDielXMap, Vgrid *dielXMap, 00283 int useDielYMap, Vgrid *dielYMap, 00284 int useDielZMap, Vgrid *dielZMap, 00285 int useKappaMap, Vgrid *kappaMap, 00286 int useChargeMap, Vgrid *chargeMap); 00287 00293 void Vpmg_solve(Vpmg *thee); 00294 00310 double Vpmg_energy(Vpmg *thee, int extFlag); 00311 00335 double Vpmg_qfEnergy(Vpmg *thee, int extFlag); 00336 00358 double Vpmg_qfAtomEnergy(Vpmg *thee, Vatom *atom); 00359 00390 double Vpmg_qmEnergy(Vpmg *thee, int extFlag); 00391 00416 double Vpmg_dielEnergy(Vpmg *thee, int extFlag); 00417 00450 double Vpmg_npEnergy(Vpmg *thee, int extFlag); 00451 00469 double Vpmg_dielGradNorm(Vpmg *thee); 00470 00489 void Vpmg_force(Vpmg *thee, double *force, int atomID, 00490 Vsurf_Meth srfm, Vchrg_Meth chgm); 00491 00509 void Vpmg_qfForce(Vpmg *thee, double *force, int atomID, 00510 Vchrg_Meth chgm); 00511 00532 void Vpmg_dbnpForce(Vpmg *thee, double *dbForce, double *npForce, 00533 int atomID, Vsurf_Meth srfm); 00534 00553 void Vpmg_ibForce(Vpmg *thee, double *force, int atomID, 00554 Vsurf_Meth srfm); 00555 00568 void Vpmg_setPart(Vpmg *thee, double lowerCorner[3], 00569 double upperCorner[3], int bflags[6]); 00570 00576 void Vpmg_unsetPart(Vpmg *thee); 00577 00587 void Vpmg_fillArray(Vpmg *thee, double *vec, Vdata_Type type, 00588 double parm); 00589 00609 void Vpmg_printColComp(Vpmg *thee, char path[72], char title[72], 00610 char mxtype[3], int flag); 00611 00612 #endif /* ifndef _VPMG_H_ */ 00613