APBS  1.5
nosh.h
Go to the documentation of this file.
1 
62 #ifndef _NOSH_H_
63 #define _NOSH_H_
64 
65 #include "apbscfg.h"
66 
67 #include "maloc/maloc.h"
68 
69 #include "generic/vhal.h"
70 #include "generic/vstring.h"
71 #include "generic/pbeparm.h"
72 #include "generic/mgparm.h"
73 #include "generic/apolparm.h"
74 #include "generic/femparm.h"
75 #include "generic/valist.h"
76 #include "generic/bemparm.h"
77 #include "generic/geoflowparm.h"
78 #include "generic/pbamparm.h"
79 #include "generic/pbsamparm.h" //path might change
80 
83 #define NOSH_MAXMOL 20
84 
87 #define NOSH_MAXCALC 20
88 
91 #define NOSH_MAXPRINT 20
92 
95 #define NOSH_MAXPOP 20
96 
105 };
106 
112 
118  NCT_MG=0,
125 };
126 
132 
140 };
141 
147 
159 };
160 
166 
172 struct sNOsh_calc {
182 };
183 
188 typedef struct sNOsh_calc NOsh_calc;
189 
195 struct sNOsh {
196 
200  int ncalc;
205  int nelec;
211  int napol;
214  int ispara;
215  int proc_rank;
216  int proc_size;
217  int bogus;
231  int nmol;
232  char molpath[NOSH_MAXMOL][VMAX_ARGLEN];
236  int gotparm;
237  char parmpath[VMAX_ARGLEN];
239  int ndiel;
240  char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN];
242  char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN];
244  char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN];
247  int nkappa;
248  char kappapath[NOSH_MAXMOL][VMAX_ARGLEN];
250  int npot;
251  char potpath[NOSH_MAXMOL][VMAX_ARGLEN];
253  int ncharge;
254  char chargepath[NOSH_MAXMOL][VMAX_ARGLEN];
256  int nmesh;
257  char meshpath[NOSH_MAXMOL][VMAX_ARGLEN];
259  int nprint;
266  int parsed;
267  char elecname[NOSH_MAXCALC][VMAX_ARGLEN];
269  char apolname[NOSH_MAXCALC][VMAX_ARGLEN];
271 };
272 
277 typedef struct sNOsh NOsh;
278 
279 /* ///////////////////////////////////////////////////////////////////////////
280  // Class NOsh: Inlineable methods (mcsh.c)
282 #if !defined(VINLINE_NOSH)
290 VEXTERNC char* NOsh_getMolpath(NOsh *thee, int imol);
291 
299 VEXTERNC char* NOsh_getDielXpath(NOsh *thee, int imap);
300 
308 VEXTERNC char* NOsh_getDielYpath(NOsh *thee, int imap);
309 
317 VEXTERNC char* NOsh_getDielZpath(NOsh *thee, int imap);
318 
326 VEXTERNC char* NOsh_getKappapath(NOsh *thee, int imap);
327 
335 VEXTERNC char* NOsh_getPotpath(NOsh *thee, int imap);
336 
344 VEXTERNC char* NOsh_getChargepath(NOsh *thee, int imap);
345 
353 VEXTERNC NOsh_calc* NOsh_getCalc(NOsh *thee, int icalc);
354 
362 VEXTERNC int NOsh_getDielfmt(NOsh *thee, int imap);
363 
371 VEXTERNC int NOsh_getKappafmt(NOsh *thee, int imap);
372 
380 VEXTERNC int NOsh_getPotfmt(NOsh *thee, int imap);
381 
389 VEXTERNC int NOsh_getChargefmt(NOsh *thee, int imap);
390 
391 #else
392 
393 # define NOsh_getMolpath(thee, imol) ((thee)->molpath[(imol)])
394 # define NOsh_getDielXpath(thee, imol) ((thee)->dielXpath[(imol)])
395 # define NOsh_getDielYpath(thee, imol) ((thee)->dielYpath[(imol)])
396 # define NOsh_getDielZpath(thee, imol) ((thee)->dielZpath[(imol)])
397 # define NOsh_getKappapath(thee, imol) ((thee)->kappapath[(imol)])
398 # define NOsh_getPotpath(thee, imol) ((thee)->potpath[(imol)])
399 # define NOsh_getChargepath(thee, imol) ((thee)->chargepath[(imol)])
400 # define NOsh_getCalc(thee, icalc) ((thee)->calc[(icalc)])
401 # define NOsh_getDielfmt(thee, imap) ((thee)->dielfmt[(imap)])
402 # define NOsh_getKappafmt(thee, imap) ((thee)->kappafmt[(imap)])
403 # define NOsh_getPotfmt(thee, imap) ((thee)->potfmt[(imap)])
404 # define NOsh_getChargefmt(thee, imap) ((thee)->chargefmt[(imap)])
405 
406 #endif
407 
408 
409 /* ///////////////////////////////////////////////////////////////////////////
410  // Class NOsh: Non-inlineable methods (mcsh.c)
412 
420 VEXTERNC NOsh_PrintType NOsh_printWhat(NOsh *thee, int iprint);
421 
431 VEXTERNC char* NOsh_elecname(NOsh *thee, int ielec);
432 
440 VEXTERNC int NOsh_elec2calc(NOsh *thee, int icalc);
441 
449 VEXTERNC int NOsh_apol2calc(NOsh *thee, int icalc);
450 
458 VEXTERNC int NOsh_printNarg(NOsh *thee, int iprint);
459 
468 VEXTERNC int NOsh_printOp(NOsh *thee, int iprint, int iarg);
469 
480 VEXTERNC int NOsh_printCalc(NOsh *thee, int iprint, int iarg);
481 
491 VEXTERNC NOsh* NOsh_ctor(int rank, int size);
492 
499 VEXTERNC NOsh_calc* NOsh_calc_ctor(
500  NOsh_CalcType calcType
501  );
502 
509 VEXTERNC int NOsh_calc_copy(
510  NOsh_calc *thee,
511  NOsh_calc *source
512  );
513 
519 VEXTERNC void NOsh_calc_dtor(NOsh_calc **thee);
520 
531 VEXTERNC int NOsh_ctor2(NOsh *thee, int rank, int size);
532 
538 VEXTERNC void NOsh_dtor(NOsh **thee);
539 
545 VEXTERNC void NOsh_dtor2(NOsh *thee);
546 
555 VEXTERNC int NOsh_parseInput(NOsh *thee, Vio *sock);
556 
566 VEXTERNC int NOsh_parseInputFile(NOsh *thee, char *filename);
567 
577 VEXTERNC int NOsh_setupElecCalc(
578  NOsh *thee, /**< NOsh object */
580  );
581 
591 VEXTERNC int NOsh_setupApolCalc(
592  NOsh *thee,
594  );
595 
596 #endif
597 
Contains declarations for class Valist.
VEXTERNC int NOsh_setupApolCalc(NOsh *thee, Valist *alist[NOSH_MAXMOL])
Setup the series of non-polar calculations.
Definition: nosh.c:1462
MGparm * mgparm
Definition: nosh.h:173
Vdata_Format meshfmt[NOSH_MAXMOL]
Definition: nosh.h:258
eNOsh_PrintType
NOsh print types.
Definition: nosh.h:152
Parameter structure for GEOFLOW-specific variables from input files.
Definition: geoflowparm.h:98
enum eVdata_Format Vdata_Format
Declaration of the Vdata_Format type as the Vdata_Format enum.
Definition: vhal.h:323
int apol2calc[NOSH_MAXCALC]
Definition: nosh.h:229
Definition: nosh.h:120
int gotparm
Definition: nosh.h:236
#define NOSH_MAXMOL
Maximum number of molecules in a run.
Definition: nosh.h:83
Vdata_Format dielfmt[NOSH_MAXMOL]
Definition: nosh.h:246
#define NOSH_MAXPRINT
Maximum number of PRINT statements in a run.
Definition: nosh.h:91
Definition: nosh.h:123
char potpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:251
Parameter structure for PBAM-specific variables from input files.
Definition: pbamparm.h:105
eNOsh_ParmFormat
Parameter file format types.
Definition: nosh.h:137
NOsh_PrintType printwhat[NOSH_MAXPRINT]
Definition: nosh.h:260
enum eNOsh_PrintType NOsh_PrintType
Declare NOsh_PrintType type.
Definition: nosh.h:165
int nprint
Definition: nosh.h:259
Definition: nosh.h:103
char elecname[NOSH_MAXCALC][VMAX_ARGLEN]
Definition: nosh.h:267
Contains declarations for class APOLparm.
eNOsh_MolFormat
Molecule file format types.
Definition: nosh.h:101
NOsh_calc * calc[NOSH_MAXCALC]
Definition: nosh.h:197
Definition: nosh.h:102
Contains declarations for class PBSAMparm.
GEOFLOWparm * geoflowparm
Definition: nosh.h:176
char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:240
Contains declarations for class MGparm.
Definition: nosh.h:118
PBAMparm * pbamparm
Definition: nosh.h:177
int ncalc
Definition: nosh.h:200
NOsh_CalcType calctype
Definition: nosh.h:181
#define NOSH_MAXPOP
Maximum number of operations in a PRINT statement.
Definition: nosh.h:95
APOLparm * apolparm
Definition: nosh.h:180
int nkappa
Definition: nosh.h:247
Vdata_Format potfmt[NOSH_MAXMOL]
Definition: nosh.h:252
NOsh_calc * elec[NOSH_MAXCALC]
Definition: nosh.h:202
PBEparm * pbeparm
Definition: nosh.h:179
int npot
Definition: nosh.h:250
Contains declarations for class PBAMparm.
int proc_rank
Definition: nosh.h:215
Vdata_Format kappafmt[NOSH_MAXMOL]
Definition: nosh.h:249
Definition: nosh.h:119
Parameter structure for PBSAM-specific variables from input files.
Definition: pbsamparm.h:105
int nelec
Definition: nosh.h:205
int ncharge
Definition: nosh.h:253
int ndiel
Definition: nosh.h:239
Parameter structure for BEM-specific variables from input files.
Definition: bemparm.h:96
Contains declarations for class Vstring.
Parameter structure for FEM-specific variables from input files.
Definition: femparm.h:133
PBSAMparm * pbsamparm
Definition: nosh.h:178
Definition: nosh.h:138
int napol
Definition: nosh.h:211
eNOsh_CalcType
NOsh calculation types.
Definition: nosh.h:117
int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP]
Definition: nosh.h:263
Definition: nosh.h:121
Contains generic macro definitions for APBS.
Contains declarations for class PBEparm.
NOsh_ParmFormat parmfmt
Definition: nosh.h:238
NOsh_MolFormat molfmt[NOSH_MAXMOL]
Definition: nosh.h:233
char chargepath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:254
Valist * alist[NOSH_MAXMOL]
Definition: nosh.h:234
Parameter structure for PBE variables from input files.
Definition: pbeparm.h:117
int proc_size
Definition: nosh.h:216
Definition: nosh.h:139
enum eNOsh_ParmFormat NOsh_ParmFormat
Declare NOsh_ParmFormat type.
Definition: nosh.h:146
Contains declarations for class GEOFLOWparm.
int printnarg[NOSH_MAXPRINT]
Definition: nosh.h:262
enum eNOsh_CalcType NOsh_CalcType
Declare NOsh_CalcType type.
Definition: nosh.h:131
NOsh_calc * apol[NOSH_MAXCALC]
Definition: nosh.h:208
char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:244
Parameter structure for MG-specific variables from input files.
Definition: mgparm.h:114
Vdata_Format chargefmt[NOSH_MAXMOL]
Definition: nosh.h:255
int nmol
Definition: nosh.h:231
int bogus
Definition: nosh.h:217
Container class for list of atom objects.
Definition: valist.h:78
Class for parsing fixed format input files.
Definition: nosh.h:195
char meshpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:257
Calculation class for use when parsing fixed format input files.
Definition: nosh.h:172
int elec2calc[NOSH_MAXCALC]
Definition: nosh.h:221
#define NOSH_MAXCALC
Maximum number of calculations in a run.
Definition: nosh.h:87
enum eNOsh_MolFormat NOsh_MolFormat
Declare NOsh_MolFormat type.
Definition: nosh.h:111
int parsed
Definition: nosh.h:266
char parmpath[VMAX_ARGLEN]
Definition: nosh.h:237
int ispara
Definition: nosh.h:214
int printop[NOSH_MAXPRINT][NOSH_MAXPOP]
Definition: nosh.h:264
char molpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:232
Definition: nosh.h:104
FEMparm * femparm
Definition: nosh.h:174
char apolname[NOSH_MAXCALC][VMAX_ARGLEN]
Definition: nosh.h:269
Parameter structure for APOL-specific variables from input files.
Definition: apolparm.h:129
int nmesh
Definition: nosh.h:256
BEMparm * bemparm
Definition: nosh.h:175
char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:242
char kappapath[NOSH_MAXMOL][VMAX_ARGLEN]
Definition: nosh.h:248