00001 00049 #ifndef _VPARAM_H_ 00050 #define _VPARAM_H_ 00051 00052 /* Generic headers */ 00053 #include "maloc/maloc.h" 00054 #include "apbs/vhal.h" 00055 #include "apbs/vunit.h" 00056 #include "apbs/vstring.h" 00057 00074 struct sVparam_AtomData { 00075 char atomName[VMAX_ARGLEN]; 00076 char resName[VMAX_ARGLEN]; 00077 double charge; 00078 double radius; 00079 double epsilon; 00081 }; 00082 00088 typedef struct sVparam_AtomData Vparam_AtomData; 00089 00096 struct Vparam_ResData { 00097 Vmem *vmem; 00098 char name[VMAX_ARGLEN]; 00099 int nAtomData; 00101 Vparam_AtomData *atomData; 00102 }; 00103 00109 typedef struct Vparam_ResData Vparam_ResData; 00110 00117 struct Vparam { 00118 00119 Vmem *vmem; 00120 int nResData; 00122 Vparam_ResData *resData; 00123 }; 00124 00129 typedef struct Vparam Vparam; 00130 00131 /* /////////////////////////////////////////////////////////////////////////// 00132 // Class Vparam: Inlineable methods (vparam.c) 00134 00135 #if !defined(VINLINE_VPARAM) 00136 00143 unsigned long int Vparam_memChk(Vparam *thee); 00144 00145 #else /* if defined(VINLINE_VPARAM) */ 00146 00147 # define Vparam_memChk(thee) (Vmem_bytes((thee)->vmem)) 00148 00149 #endif /* if !defined(VINLINE_VPARAM) */ 00150 00151 /* /////////////////////////////////////////////////////////////////////////// 00152 // Class Vparam: Non-Inlineable methods (vparam.c) 00154 00159 Vparam_AtomData* Vparam_AtomData_ctor(); 00160 00166 int Vparam_AtomData_ctor2(Vparam_AtomData *thee); 00167 00172 void Vparam_AtomData_dtor(Vparam_AtomData **thee); 00173 00178 void Vparam_AtomData_dtor2(Vparam_AtomData *thee); 00179 00187 void Vparam_AtomData_copyTo(Vparam_AtomData *thee, 00188 Vparam_AtomData *dest); 00189 00197 void Vparam_AtomData_copyFrom(Vparam_AtomData *thee, 00198 Vparam_AtomData *src); 00199 00205 Vparam_ResData* Vparam_ResData_ctor(Vmem *mem); 00206 00213 int Vparam_ResData_ctor2(Vparam_ResData *thee, Vmem *mem); 00214 00219 void Vparam_ResData_dtor(Vparam_ResData **thee); 00220 00225 void Vparam_ResData_dtor2(Vparam_ResData *thee); 00226 00231 Vparam* Vparam_ctor(); 00232 00238 int Vparam_ctor2(Vparam *thee); 00239 00244 void Vparam_dtor(Vparam **thee); 00245 00250 void Vparam_dtor2(Vparam *thee); 00251 00262 Vparam_ResData* Vparam_getResData(Vparam *thee, 00263 char resName[VMAX_ARGLEN]); 00264 00276 Vparam_AtomData* Vparam_getAtomData(Vparam *thee, 00277 char resName[VMAX_ARGLEN], char atomName[VMAX_ARGLEN]); 00278 00307 int Vparam_readFlatFile(Vparam *thee, const char *iodev, 00308 const char *iofmt, const char *thost, const char *fname); 00309 00310 #endif /* ifndef _VPARAM_H_ */ 00311