00001 00072 #ifndef _VPARAM_H_ 00073 #define _VPARAM_H_ 00074 00075 /* Generic headers */ 00076 #include "maloc/maloc.h" 00077 #include "apbs/vhal.h" 00078 #include "apbs/vunit.h" 00079 #include "apbs/vstring.h" 00080 00097 struct sVparam_AtomData { 00098 char atomName[VMAX_ARGLEN]; 00099 char resName[VMAX_ARGLEN]; 00100 double charge; 00101 double radius; 00102 double epsilon; 00104 }; 00105 00111 typedef struct sVparam_AtomData Vparam_AtomData; 00112 00119 struct Vparam_ResData { 00120 Vmem *vmem; 00121 char name[VMAX_ARGLEN]; 00122 int nAtomData; 00124 Vparam_AtomData *atomData; 00125 }; 00126 00132 typedef struct Vparam_ResData Vparam_ResData; 00133 00140 struct Vparam { 00141 00142 Vmem *vmem; 00143 int nResData; 00145 Vparam_ResData *resData; 00146 }; 00147 00152 typedef struct Vparam Vparam; 00153 00154 /* /////////////////////////////////////////////////////////////////////////// 00155 // Class Vparam: Inlineable methods (vparam.c) 00157 00158 #if !defined(VINLINE_VPARAM) 00159 00166 unsigned long int Vparam_memChk(Vparam *thee); 00167 00168 #else /* if defined(VINLINE_VPARAM) */ 00169 00170 # define Vparam_memChk(thee) (Vmem_bytes((thee)->vmem)) 00171 00172 #endif /* if !defined(VINLINE_VPARAM) */ 00173 00174 /* /////////////////////////////////////////////////////////////////////////// 00175 // Class Vparam: Non-Inlineable methods (vparam.c) 00177 00182 Vparam_AtomData* Vparam_AtomData_ctor(); 00183 00189 int Vparam_AtomData_ctor2(Vparam_AtomData *thee); 00190 00195 void Vparam_AtomData_dtor(Vparam_AtomData **thee); 00196 00201 void Vparam_AtomData_dtor2(Vparam_AtomData *thee); 00202 00210 void Vparam_AtomData_copyTo(Vparam_AtomData *thee, 00211 Vparam_AtomData *dest); 00212 00220 void Vparam_ResData_copyTo(Vparam_ResData *thee, 00221 Vparam_ResData *dest); 00222 00230 void Vparam_AtomData_copyFrom(Vparam_AtomData *thee, 00231 Vparam_AtomData *src); 00232 00238 Vparam_ResData* Vparam_ResData_ctor(Vmem *mem); 00239 00246 int Vparam_ResData_ctor2(Vparam_ResData *thee, Vmem *mem); 00247 00252 void Vparam_ResData_dtor(Vparam_ResData **thee); 00253 00258 void Vparam_ResData_dtor2(Vparam_ResData *thee); 00259 00264 Vparam* Vparam_ctor(); 00265 00271 int Vparam_ctor2(Vparam *thee); 00272 00277 void Vparam_dtor(Vparam **thee); 00278 00283 void Vparam_dtor2(Vparam *thee); 00284 00295 Vparam_ResData* Vparam_getResData(Vparam *thee, 00296 char resName[VMAX_ARGLEN]); 00297 00309 Vparam_AtomData* Vparam_getAtomData(Vparam *thee, 00310 char resName[VMAX_ARGLEN], char atomName[VMAX_ARGLEN]); 00311 00340 int Vparam_readFlatFile(Vparam *thee, const char *iodev, 00341 const char *iofmt, const char *thost, const char *fname); 00342 00353 int Vparam_readXMLFile(Vparam *thee, const char *iodev, 00354 const char *iofmt, const char *thost, const char *fname); 00355 00356 #endif /* ifndef _VPARAM_H_ */ 00357