00001 00060 #ifndef _VPARAM_H_ 00061 #define _VPARAM_H_ 00062 00063 /* Generic headers */ 00064 #include "maloc/maloc.h" 00065 #include "apbs/vhal.h" 00066 #include "apbs/vunit.h" 00067 #include "apbs/vstring.h" 00068 00085 struct sVparam_AtomData { 00086 char atomName[VMAX_ARGLEN]; 00087 char resName[VMAX_ARGLEN]; 00088 double charge; 00089 double radius; 00090 double epsilon; 00092 }; 00093 00099 typedef struct sVparam_AtomData Vparam_AtomData; 00100 00107 struct Vparam_ResData { 00108 Vmem *vmem; 00109 char name[VMAX_ARGLEN]; 00110 int nAtomData; 00112 Vparam_AtomData *atomData; 00113 }; 00114 00120 typedef struct Vparam_ResData Vparam_ResData; 00121 00128 struct Vparam { 00129 00130 Vmem *vmem; 00131 int nResData; 00133 Vparam_ResData *resData; 00134 }; 00135 00140 typedef struct Vparam Vparam; 00141 00142 /* /////////////////////////////////////////////////////////////////////////// 00143 // Class Vparam: Inlineable methods (vparam.c) 00145 00146 #if !defined(VINLINE_VPARAM) 00147 00154 unsigned long int Vparam_memChk(Vparam *thee); 00155 00156 #else /* if defined(VINLINE_VPARAM) */ 00157 00158 # define Vparam_memChk(thee) (Vmem_bytes((thee)->vmem)) 00159 00160 #endif /* if !defined(VINLINE_VPARAM) */ 00161 00162 /* /////////////////////////////////////////////////////////////////////////// 00163 // Class Vparam: Non-Inlineable methods (vparam.c) 00165 00170 Vparam_AtomData* Vparam_AtomData_ctor(); 00171 00177 int Vparam_AtomData_ctor2(Vparam_AtomData *thee); 00178 00183 void Vparam_AtomData_dtor(Vparam_AtomData **thee); 00184 00189 void Vparam_AtomData_dtor2(Vparam_AtomData *thee); 00190 00198 void Vparam_AtomData_copyTo(Vparam_AtomData *thee, 00199 Vparam_AtomData *dest); 00200 00208 void Vparam_ResData_copyTo(Vparam_ResData *thee, 00209 Vparam_ResData *dest); 00210 00218 void Vparam_AtomData_copyFrom(Vparam_AtomData *thee, 00219 Vparam_AtomData *src); 00220 00226 Vparam_ResData* Vparam_ResData_ctor(Vmem *mem); 00227 00234 int Vparam_ResData_ctor2(Vparam_ResData *thee, Vmem *mem); 00235 00240 void Vparam_ResData_dtor(Vparam_ResData **thee); 00241 00246 void Vparam_ResData_dtor2(Vparam_ResData *thee); 00247 00252 Vparam* Vparam_ctor(); 00253 00259 int Vparam_ctor2(Vparam *thee); 00260 00265 void Vparam_dtor(Vparam **thee); 00266 00271 void Vparam_dtor2(Vparam *thee); 00272 00283 Vparam_ResData* Vparam_getResData(Vparam *thee, 00284 char resName[VMAX_ARGLEN]); 00285 00297 Vparam_AtomData* Vparam_getAtomData(Vparam *thee, 00298 char resName[VMAX_ARGLEN], char atomName[VMAX_ARGLEN]); 00299 00328 int Vparam_readFlatFile(Vparam *thee, const char *iodev, 00329 const char *iofmt, const char *thost, const char *fname); 00330 00341 int Vparam_readXMLFile(Vparam *thee, const char *iodev, 00342 const char *iofmt, const char *thost, const char *fname); 00343 00344 #endif /* ifndef _VPARAM_H_ */ 00345