• Main Page
  • Related Pages
  • Modules
  • Data Structures
  • Files
  • File List
  • Globals

src/generic/apbs/nosh.h

Go to the documentation of this file.
00001 
00054 #ifndef _NOSH_H_
00055 #define _NOSH_H_
00056 
00057 /* Generic headers */
00058 #include "maloc/maloc.h"
00059 #include "apbs/vhal.h"
00060 
00061 /* Headers specific to this file */
00062 #include "apbs/pbeparm.h"
00063 #include "apbs/mgparm.h"
00064 #include "apbs/femparm.h"
00065 #include "apbs/apolparm.h"
00066 #include "apbs/valist.h"
00067 
00070 #define NOSH_MAXMOL 20
00071 
00074 #define NOSH_MAXCALC 20
00075 
00078 #define NOSH_MAXPRINT 20
00079 
00082 #define NOSH_MAXPOP 20
00083 
00088 enum eNOsh_MolFormat {
00089     NMF_PQR=0,  
00090     NMF_PDB=1,  
00091     NMF_XML=2   
00092 };
00093 
00098 typedef enum eNOsh_MolFormat NOsh_MolFormat;
00099 
00104 enum eNOsh_CalcType {
00105     NCT_MG=0,  
00106     NCT_FEM=1, 
00107  NCT_APOL=2 
00108 };
00109 
00114 typedef enum eNOsh_CalcType NOsh_CalcType;
00115 
00120 enum eNOsh_ParmFormat {
00121     NPF_FLAT=0,  
00122     NPF_XML=1    
00123 };
00124 
00129 typedef enum eNOsh_ParmFormat NOsh_ParmFormat;
00130 
00135 enum eNOsh_PrintType {
00136     NPT_ENERGY=0, 
00137     NPT_FORCE=1, 
00138  NPT_ELECENERGY, 
00139     NPT_ELECFORCE, 
00140  NPT_APOLENERGY, 
00141     NPT_APOLFORCE 
00142 };
00143 
00148 typedef enum eNOsh_PrintType NOsh_PrintType;
00149 
00155 struct sNOsh_calc {
00156  MGparm *mgparm;         
00157  FEMparm *femparm;       
00158  PBEparm *pbeparm;       
00159  APOLparm *apolparm;  
00160  NOsh_CalcType calctype; 
00161 };
00162 
00167 typedef struct sNOsh_calc NOsh_calc;
00168 
00174 struct sNOsh {
00175  
00176  NOsh_calc *calc[NOSH_MAXCALC];  
00179     int ncalc;  
00181  NOsh_calc *elec[NOSH_MAXCALC];  
00184     int nelec;  
00187  NOsh_calc *apol[NOSH_MAXCALC];  
00190     int napol;  
00193     int ispara;  
00194     int proc_rank;  
00195     int proc_size;  
00196     int bogus;  
00200     int elec2calc[NOSH_MAXCALC];  
00208  int apol2calc[NOSH_MAXCALC];  
00210     int nmol;  
00211     char molpath[NOSH_MAXMOL][VMAX_ARGLEN];   
00212     NOsh_MolFormat molfmt[NOSH_MAXMOL];  
00213  Valist *alist[NOSH_MAXMOL];  
00215     int gotparm;  
00216     char parmpath[VMAX_ARGLEN];   
00217     NOsh_ParmFormat parmfmt;  
00218     int ndiel;  
00219     char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN];  
00221     char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN];  
00223     char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN];  
00225     Vdata_Format dielfmt[NOSH_MAXMOL];  
00226     int nkappa;  
00227     char kappapath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00228     Vdata_Format kappafmt[NOSH_MAXMOL];  
00229  int npot;  
00230     char potpath[NOSH_MAXMOL][VMAX_ARGLEN]; 
00231     Vdata_Format potfmt[NOSH_MAXMOL];  
00232     int ncharge;  
00233     char chargepath[NOSH_MAXMOL][VMAX_ARGLEN];   
00234     Vdata_Format chargefmt[NOSH_MAXMOL];  
00235  int nmesh;  
00236  char meshpath[NOSH_MAXMOL][VMAX_ARGLEN];   
00237     Vdata_Format meshfmt[NOSH_MAXMOL];  
00238     int nprint;  
00239     NOsh_PrintType printwhat[NOSH_MAXPRINT];  
00241     int printnarg[NOSH_MAXPRINT];  
00242     int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP]; 
00243     int printop[NOSH_MAXPRINT][NOSH_MAXPOP];  
00245     int parsed;  
00246     char elecname[NOSH_MAXCALC][VMAX_ARGLEN]; 
00248  char apolname[NOSH_MAXCALC][VMAX_ARGLEN]; 
00250 };
00251 
00256 typedef struct sNOsh NOsh;
00257 
00258 /* ///////////////////////////////////////////////////////////////////////////
00259    // Class NOsh: Inlineable methods (mcsh.c)
00261 #if !defined(VINLINE_NOSH)
00269 VEXTERNC char* NOsh_getMolpath(NOsh *thee, int imol);
00270 
00278 VEXTERNC char* NOsh_getDielXpath(NOsh *thee, int imap);
00279 
00287 VEXTERNC char* NOsh_getDielYpath(NOsh *thee, int imap);
00288 
00296 VEXTERNC char* NOsh_getDielZpath(NOsh *thee, int imap);
00297 
00305 VEXTERNC char* NOsh_getKappapath(NOsh *thee, int imap);
00306 
00314 VEXTERNC char* NOsh_getPotpath(NOsh *thee, int imap);
00315 
00323 VEXTERNC char* NOsh_getChargepath(NOsh *thee, int imap);
00324 
00332 VEXTERNC NOsh_calc* NOsh_getCalc(NOsh *thee, int icalc);
00333 
00341 VEXTERNC int NOsh_getDielfmt(NOsh *thee, int imap);
00342 
00350 VEXTERNC int NOsh_getKappafmt(NOsh *thee, int imap);
00351 
00359 VEXTERNC int NOsh_getPotfmt(NOsh *thee, int imap);
00360 
00368 VEXTERNC int NOsh_getChargefmt(NOsh *thee, int imap);
00369 
00370 #else
00371 
00372 #   define NOsh_getMolpath(thee, imol) ((thee)->molpath[(imol)])
00373 #   define NOsh_getDielXpath(thee, imol) ((thee)->dielXpath[(imol)])
00374 #   define NOsh_getDielYpath(thee, imol) ((thee)->dielYpath[(imol)])
00375 #   define NOsh_getDielZpath(thee, imol) ((thee)->dielZpath[(imol)])
00376 #   define NOsh_getKappapath(thee, imol) ((thee)->kappapath[(imol)])
00377 #   define NOsh_getPotpath(thee, imol) ((thee)->potpath[(imol)])
00378 #   define NOsh_getChargepath(thee, imol) ((thee)->chargepath[(imol)])
00379 #   define NOsh_getCalc(thee, icalc) ((thee)->calc[(icalc)])
00380 #   define NOsh_getDielfmt(thee, imap) ((thee)->dielfmt[(imap)])
00381 #   define NOsh_getKappafmt(thee, imap) ((thee)->kappafmt[(imap)])
00382 #   define NOsh_getPotfmt(thee, imap) ((thee)->potfmt[(imap)])
00383 #   define NOsh_getChargefmt(thee, imap) ((thee)->chargefmt[(imap)])
00384 
00385 #endif
00386 
00387 
00388 /* ///////////////////////////////////////////////////////////////////////////
00389    // Class NOsh: Non-inlineable methods (mcsh.c)
00391 
00399 VEXTERNC NOsh_PrintType NOsh_printWhat(NOsh *thee, int iprint);
00400 
00410 VEXTERNC char* NOsh_elecname(NOsh *thee, int ielec);
00411 
00419 VEXTERNC int NOsh_elec2calc(NOsh *thee, int icalc);
00420 
00428 VEXTERNC int NOsh_apol2calc(NOsh *thee, int icalc);
00429 
00437 VEXTERNC int NOsh_printNarg(NOsh *thee, int iprint);
00438 
00447 VEXTERNC int NOsh_printOp(NOsh *thee, int iprint, int iarg);
00448 
00459 VEXTERNC int NOsh_printCalc(NOsh *thee, int iprint, int iarg);
00460 
00470 VEXTERNC NOsh* NOsh_ctor(int rank, int size);
00471 
00478 VEXTERNC NOsh_calc* NOsh_calc_ctor(
00479          NOsh_CalcType calcType
00480          );
00481 
00488 VEXTERNC int NOsh_calc_copy(
00489        NOsh_calc *thee,
00490        NOsh_calc *source
00491        );
00492 
00498 VEXTERNC void  NOsh_calc_dtor(NOsh_calc **thee);
00499 
00510 VEXTERNC int   NOsh_ctor2(NOsh *thee, int rank, int size);
00511 
00517 VEXTERNC void  NOsh_dtor(NOsh **thee);
00518 
00524 VEXTERNC void  NOsh_dtor2(NOsh *thee);
00525 
00534 VEXTERNC int   NOsh_parseInput(NOsh *thee, Vio *sock);
00535 
00545 VEXTERNC int   NOsh_parseInputFile(NOsh *thee, char *filename);
00546 
00556 VEXTERNC int NOsh_setupElecCalc(
00557        NOsh *thee, 
00558        Valist *alist[NOSH_MAXMOL] 
00559        );
00560 
00570 VEXTERNC int NOsh_setupApolCalc(
00571         NOsh *thee, 
00572         Valist *alist[NOSH_MAXMOL] 
00573         );
00574 
00575 #endif 
00576 

Generated on Wed Oct 20 2010 12:01:33 for APBS by  doxygen 1.7.2