Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

nosh.h

Go to the documentation of this file.
00001 
00049 #ifndef _NOSH_H_
00050 #define _NOSH_H_
00051 
00052 /* Generic headers */
00053 #include "maloc/maloc.h"
00054 #include "apbs/vhal.h"
00055 
00056 /* Headers specific to this file */
00057 #include "apbs/pbeparm.h"
00058 #include "apbs/mgparm.h"
00059 #include "apbs/femparm.h"
00060 
00063 #define NOSH_MAXMOL 20
00064 
00067 #define NOSH_MAXCALC 20
00068 
00071 #define NOSH_MAXPRINT 20
00072 
00075 #define NOSH_MAXPOP 20
00076 
00081 enum eNOsh_MolFormat {
00082     NMF_PQR=0,  
00083     NMF_PDB=1  
00084 };
00085 
00090 typedef enum eNOsh_MolFormat NOsh_MolFormat;
00091 
00096 enum eNOsh_ParmFormat {
00097     NPF_FLAT=0  
00098 };
00099 
00104 typedef enum eNOsh_ParmFormat NOsh_ParmFormat;
00105 
00111 struct sNOsh_calc {
00112 
00113     MGparm *mgparm;         
00114     FEMparm *femparm;       
00115     PBEparm *pbeparm;       
00116     int calctype;           
00118 };
00119 
00124 typedef struct sNOsh_calc NOsh_calc;
00125 
00131 struct sNOsh {
00132 
00133     NOsh_calc calc[NOSH_MAXCALC];        
00136     int ncalc;                           
00138     int nelec;                           
00140     int ispara;                          
00142     int proc_rank;                       
00144     int proc_size;                       
00146     int bogus;                           
00153     int elec2calc[NOSH_MAXCALC];         
00168     int nmol;  
00169     char molpath[NOSH_MAXMOL][VMAX_ARGLEN];   
00170     NOsh_MolFormat molfmt[NOSH_MAXMOL];  
00171     int gotparm;  
00172     char parmpath[VMAX_ARGLEN];   
00173     NOsh_ParmFormat parmfmt;  
00174     int ndiel;                           
00175     char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00177     char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00179     char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00181     Vdata_Format dielfmt[NOSH_MAXMOL];           
00183     int nkappa;                          
00184     char kappapath[NOSH_MAXMOL][VMAX_ARGLEN];   
00186     Vdata_Format kappafmt[NOSH_MAXMOL];          
00188     int ncharge;                         
00189     char chargepath[NOSH_MAXMOL][VMAX_ARGLEN];   
00191     Vdata_Format chargefmt[NOSH_MAXMOL];         
00193     int nprint;                          
00194     int printwhat[NOSH_MAXPRINT];        
00197     int printnarg[NOSH_MAXPRINT];        
00199     int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP]; 
00200     int printop[NOSH_MAXPRINT][NOSH_MAXPOP];  
00202     int parsed;                          
00204     char elecname[NOSH_MAXCALC][VMAX_ARGLEN]; 
00207 };
00208 
00213 typedef struct sNOsh NOsh;
00214 
00215 /* 
00216 // Class NOsh: Inlineable methods (mcsh.c)
00218 #if !defined(VINLINE_NOSH)
00226     char* NOsh_getMolpath(NOsh *thee, int imol);
00227 
00235     char* NOsh_getDielXpath(NOsh *thee, int imap);
00236 
00244     char* NOsh_getDielYpath(NOsh *thee, int imap);
00245 
00253     char* NOsh_getDielZpath(NOsh *thee, int imap);
00254 
00262     char* NOsh_getKappapath(NOsh *thee, int imap);
00263 
00271     char* NOsh_getChargepath(NOsh *thee, int imap);
00272 
00280     NOsh_calc* NOsh_getCalc(NOsh *thee, int icalc);
00281 
00289     int NOsh_getDielfmt(NOsh *thee, int imap);
00290 
00298     int NOsh_getKappafmt(NOsh *thee, int imap);
00299 
00307     int NOsh_getChargefmt(NOsh *thee, int imap);
00308 
00309 #else
00310 
00311 #   define NOsh_getMolpath(thee, imol) ((thee)->molpath[(imol)])
00312 #   define NOsh_getDielXpath(thee, imol) ((thee)->dielXpath[(imol)])
00313 #   define NOsh_getDielYpath(thee, imol) ((thee)->dielYpath[(imol)])
00314 #   define NOsh_getDielZpath(thee, imol) ((thee)->dielZpath[(imol)])
00315 #   define NOsh_getKappapath(thee, imol) ((thee)->kappapath[(imol)])
00316 #   define NOsh_getChargepath(thee, imol) ((thee)->chargepath[(imol)])
00317 #   define NOsh_getCalc(thee, icalc) ((thee)->calc[(icalc)])
00318 #   define NOsh_getDielfmt(thee, imap) ((thee)->dielfmt[(imap)])
00319 #   define NOsh_getKappafmt(thee, imap) ((thee)->kappafmt[(imap)])
00320 #   define NOsh_getChargefmt(thee, imap) ((thee)->chargefmt[(imap)])
00321 
00322 #endif
00323 
00324 
00325 /* 
00326 // Class NOsh: Non-inlineable methods (mcsh.c)
00328 
00336 int NOsh_printWhat(NOsh *thee, int iprint);
00337 
00347 char* NOsh_elecname(NOsh *thee, int ielec);
00348 
00356 int NOsh_elec2calc(NOsh *thee, int icalc);
00357 
00365 int NOsh_printNarg(NOsh *thee, int iprint);
00366 
00375 int NOsh_printOp(NOsh *thee, int iprint, int iarg);
00376 
00387 int NOsh_printCalc(NOsh *thee, int iprint, int iarg);
00388 
00398 NOsh* NOsh_ctor(int rank, int size);
00399 
00410 int   NOsh_ctor2(NOsh *thee, int rank, int size);
00411 
00417 void  NOsh_dtor(NOsh **thee);
00418 
00424 void  NOsh_dtor2(NOsh *thee);
00425 
00433 int   NOsh_parse(NOsh *thee, Vio *sock);
00434 
00443 int   NOsh_parseFile(NOsh *thee, char *filename);
00444 
00458 int NOsh_setupMGMANUAL(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00459 
00474 int NOsh_setupMGAUTO(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00475 
00490 int NOsh_setupMGPARA(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00491 
00492 
00493 #endif 
00494 
00495 

Generated on Tue Feb 17 09:27:01 2004 for APBS by doxygen1.2.18