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_CalcType {
00097     NCT_MG=0,  
00098     NCT_FEM=1  
00099 };
00100 
00105 typedef enum eNOsh_CalcType NOsh_CalcType;
00106 
00111 enum eNOsh_ParmFormat {
00112     NPF_FLAT=0  
00113 };
00114 
00119 typedef enum eNOsh_ParmFormat NOsh_ParmFormat;
00120 
00125 enum eNOsh_PrintType {
00126     NPT_ENERGY=0, 
00127     NPT_FORCE=1 
00128 };
00129 
00134 typedef enum eNOsh_PrintType NOsh_PrintType;
00135 
00141 struct sNOsh_calc {
00142 
00143     MGparm *mgparm;         
00144     FEMparm *femparm;       
00145     PBEparm *pbeparm;       
00146     NOsh_CalcType calctype; 
00148 };
00149 
00154 typedef struct sNOsh_calc NOsh_calc;
00155 
00161 struct sNOsh {
00162 
00163     NOsh_calc calc[NOSH_MAXCALC];        
00166     int ncalc;                           
00168     int nelec;                           
00170     int ispara;                          
00172     int proc_rank;                       
00174     int proc_size;                       
00176     int bogus;                           
00183     int elec2calc[NOSH_MAXCALC];         
00198     int nmol;  
00199     char molpath[NOSH_MAXMOL][VMAX_ARGLEN];   
00200     NOsh_MolFormat molfmt[NOSH_MAXMOL];  
00201     int gotparm;  
00202     char parmpath[VMAX_ARGLEN];   
00203     NOsh_ParmFormat parmfmt;  
00204     int ndiel;                           
00205     char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00207     char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00209     char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00211     Vdata_Format dielfmt[NOSH_MAXMOL];           
00213     int nkappa;                          
00214     char kappapath[NOSH_MAXMOL][VMAX_ARGLEN];   
00216     Vdata_Format kappafmt[NOSH_MAXMOL];          
00218     int ncharge;                         
00219     char chargepath[NOSH_MAXMOL][VMAX_ARGLEN];   
00221     Vdata_Format chargefmt[NOSH_MAXMOL];         
00223     int nprint;                          
00224     NOsh_PrintType printwhat[NOSH_MAXPRINT];  
00227     int printnarg[NOSH_MAXPRINT];        
00229     int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP]; 
00230     int printop[NOSH_MAXPRINT][NOSH_MAXPOP];  
00232     int parsed;                          
00234     char elecname[NOSH_MAXCALC][VMAX_ARGLEN]; 
00237 };
00238 
00243 typedef struct sNOsh NOsh;
00244 
00245 /* ///////////////////////////////////////////////////////////////////////////
00246 // Class NOsh: Inlineable methods (mcsh.c)
00248 #if !defined(VINLINE_NOSH)
00256     char* NOsh_getMolpath(NOsh *thee, int imol);
00257 
00265     char* NOsh_getDielXpath(NOsh *thee, int imap);
00266 
00274     char* NOsh_getDielYpath(NOsh *thee, int imap);
00275 
00283     char* NOsh_getDielZpath(NOsh *thee, int imap);
00284 
00292     char* NOsh_getKappapath(NOsh *thee, int imap);
00293 
00301     char* NOsh_getChargepath(NOsh *thee, int imap);
00302 
00310     NOsh_calc* NOsh_getCalc(NOsh *thee, int icalc);
00311 
00319     int NOsh_getDielfmt(NOsh *thee, int imap);
00320 
00328     int NOsh_getKappafmt(NOsh *thee, int imap);
00329 
00337     int NOsh_getChargefmt(NOsh *thee, int imap);
00338 
00339 #else
00340 
00341 #   define NOsh_getMolpath(thee, imol) ((thee)->molpath[(imol)])
00342 #   define NOsh_getDielXpath(thee, imol) ((thee)->dielXpath[(imol)])
00343 #   define NOsh_getDielYpath(thee, imol) ((thee)->dielYpath[(imol)])
00344 #   define NOsh_getDielZpath(thee, imol) ((thee)->dielZpath[(imol)])
00345 #   define NOsh_getKappapath(thee, imol) ((thee)->kappapath[(imol)])
00346 #   define NOsh_getChargepath(thee, imol) ((thee)->chargepath[(imol)])
00347 #   define NOsh_getCalc(thee, icalc) ((thee)->calc[(icalc)])
00348 #   define NOsh_getDielfmt(thee, imap) ((thee)->dielfmt[(imap)])
00349 #   define NOsh_getKappafmt(thee, imap) ((thee)->kappafmt[(imap)])
00350 #   define NOsh_getChargefmt(thee, imap) ((thee)->chargefmt[(imap)])
00351 
00352 #endif
00353 
00354 
00355 /* ///////////////////////////////////////////////////////////////////////////
00356 // Class NOsh: Non-inlineable methods (mcsh.c)
00358 
00366 NOsh_PrintType NOsh_printWhat(NOsh *thee, int iprint);
00367 
00377 char* NOsh_elecname(NOsh *thee, int ielec);
00378 
00386 int NOsh_elec2calc(NOsh *thee, int icalc);
00387 
00395 int NOsh_printNarg(NOsh *thee, int iprint);
00396 
00405 int NOsh_printOp(NOsh *thee, int iprint, int iarg);
00406 
00417 int NOsh_printCalc(NOsh *thee, int iprint, int iarg);
00418 
00428 NOsh* NOsh_ctor(int rank, int size);
00429 
00440 int   NOsh_ctor2(NOsh *thee, int rank, int size);
00441 
00447 void  NOsh_dtor(NOsh **thee);
00448 
00454 void  NOsh_dtor2(NOsh *thee);
00455 
00463 int   NOsh_parse(NOsh *thee, Vio *sock);
00464 
00473 int   NOsh_parseFile(NOsh *thee, char *filename);
00474 
00488 int NOsh_setupMGMANUAL(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00489 
00504 int NOsh_setupMGAUTO(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00505 
00520 int NOsh_setupMGPARA(NOsh *thee, MGparm *mgparm, PBEparm *pbeparm);
00521 
00522 
00523 #endif 
00524 
00525 

Generated on Tue Dec 6 10:05:31 2005 for APBS by doxygen 1.3.5