APBS  1.4.1
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/femparm.h"
74 #include "generic/apolparm.h"
75 #include "generic/valist.h"
76 
79 #define NOSH_MAXMOL 20
80 
83 #define NOSH_MAXCALC 20
84 
87 #define NOSH_MAXPRINT 20
88 
91 #define NOSH_MAXPOP 20
92 
98  NMF_PQR=0,
99  NMF_PDB=1,
101 };
102 
108 
114  NCT_MG=0,
117 };
118 
124 
132 };
133 
139 
151 };
152 
158 
164 struct sNOsh_calc {
170 };
171 
176 typedef struct sNOsh_calc NOsh_calc;
177 
183 struct sNOsh {
184 
188  int ncalc;
193  int nelec;
199  int napol;
202  int ispara;
203  int proc_rank;
204  int proc_size;
205  int bogus;
209  int elec2calc[NOSH_MAXCALC];
217  int apol2calc[NOSH_MAXCALC];
219  int nmol;
220  char molpath[NOSH_MAXMOL][VMAX_ARGLEN];
222  Valist *alist[NOSH_MAXMOL];
224  int gotparm;
225  char parmpath[VMAX_ARGLEN];
227  int ndiel;
228  char dielXpath[NOSH_MAXMOL][VMAX_ARGLEN];
230  char dielYpath[NOSH_MAXMOL][VMAX_ARGLEN];
232  char dielZpath[NOSH_MAXMOL][VMAX_ARGLEN];
235  int nkappa;
236  char kappapath[NOSH_MAXMOL][VMAX_ARGLEN];
238  int npot;
239  char potpath[NOSH_MAXMOL][VMAX_ARGLEN];
241  int ncharge;
242  char chargepath[NOSH_MAXMOL][VMAX_ARGLEN];
244  int nmesh;
245  char meshpath[NOSH_MAXMOL][VMAX_ARGLEN];
247  int nprint;
250  int printnarg[NOSH_MAXPRINT];
251  int printcalc[NOSH_MAXPRINT][NOSH_MAXPOP];
252  int printop[NOSH_MAXPRINT][NOSH_MAXPOP];
254  int parsed;
255  char elecname[NOSH_MAXCALC][VMAX_ARGLEN];
257  char apolname[NOSH_MAXCALC][VMAX_ARGLEN];
259 };
260 
265 typedef struct sNOsh NOsh;
266 
267 /* ///////////////////////////////////////////////////////////////////////////
268  // Class NOsh: Inlineable methods (mcsh.c)
270 #if !defined(VINLINE_NOSH)
278 VEXTERNC char* NOsh_getMolpath(NOsh *thee, int imol);
279 
287 VEXTERNC char* NOsh_getDielXpath(NOsh *thee, int imap);
288 
296 VEXTERNC char* NOsh_getDielYpath(NOsh *thee, int imap);
297 
305 VEXTERNC char* NOsh_getDielZpath(NOsh *thee, int imap);
306 
314 VEXTERNC char* NOsh_getKappapath(NOsh *thee, int imap);
315 
323 VEXTERNC char* NOsh_getPotpath(NOsh *thee, int imap);
324 
332 VEXTERNC char* NOsh_getChargepath(NOsh *thee, int imap);
333 
341 VEXTERNC NOsh_calc* NOsh_getCalc(NOsh *thee, int icalc);
342 
350 VEXTERNC int NOsh_getDielfmt(NOsh *thee, int imap);
351 
359 VEXTERNC int NOsh_getKappafmt(NOsh *thee, int imap);
360 
368 VEXTERNC int NOsh_getPotfmt(NOsh *thee, int imap);
369 
377 VEXTERNC int NOsh_getChargefmt(NOsh *thee, int imap);
378 
379 #else
380 
381 # define NOsh_getMolpath(thee, imol) ((thee)->molpath[(imol)])
382 # define NOsh_getDielXpath(thee, imol) ((thee)->dielXpath[(imol)])
383 # define NOsh_getDielYpath(thee, imol) ((thee)->dielYpath[(imol)])
384 # define NOsh_getDielZpath(thee, imol) ((thee)->dielZpath[(imol)])
385 # define NOsh_getKappapath(thee, imol) ((thee)->kappapath[(imol)])
386 # define NOsh_getPotpath(thee, imol) ((thee)->potpath[(imol)])
387 # define NOsh_getChargepath(thee, imol) ((thee)->chargepath[(imol)])
388 # define NOsh_getCalc(thee, icalc) ((thee)->calc[(icalc)])
389 # define NOsh_getDielfmt(thee, imap) ((thee)->dielfmt[(imap)])
390 # define NOsh_getKappafmt(thee, imap) ((thee)->kappafmt[(imap)])
391 # define NOsh_getPotfmt(thee, imap) ((thee)->potfmt[(imap)])
392 # define NOsh_getChargefmt(thee, imap) ((thee)->chargefmt[(imap)])
393 
394 #endif
395 
396 
397 /* ///////////////////////////////////////////////////////////////////////////
398  // Class NOsh: Non-inlineable methods (mcsh.c)
400 
408 VEXTERNC NOsh_PrintType NOsh_printWhat(NOsh *thee, int iprint);
409 
419 VEXTERNC char* NOsh_elecname(NOsh *thee, int ielec);
420 
428 VEXTERNC int NOsh_elec2calc(NOsh *thee, int icalc);
429 
437 VEXTERNC int NOsh_apol2calc(NOsh *thee, int icalc);
438 
446 VEXTERNC int NOsh_printNarg(NOsh *thee, int iprint);
447 
456 VEXTERNC int NOsh_printOp(NOsh *thee, int iprint, int iarg);
457 
468 VEXTERNC int NOsh_printCalc(NOsh *thee, int iprint, int iarg);
469 
479 VEXTERNC NOsh* NOsh_ctor(int rank, int size);
480 
487 VEXTERNC NOsh_calc* NOsh_calc_ctor(
488  NOsh_CalcType calcType
489  );
490 
497 VEXTERNC int NOsh_calc_copy(
498  NOsh_calc *thee,
499  NOsh_calc *source
500  );
501 
507 VEXTERNC void NOsh_calc_dtor(NOsh_calc **thee);
508 
519 VEXTERNC int NOsh_ctor2(NOsh *thee, int rank, int size);
520 
526 VEXTERNC void NOsh_dtor(NOsh **thee);
527 
533 VEXTERNC void NOsh_dtor2(NOsh *thee);
534 
543 VEXTERNC int NOsh_parseInput(NOsh *thee, Vio *sock);
544 
554 VEXTERNC int NOsh_parseInputFile(NOsh *thee, char *filename);
555 
565 VEXTERNC int NOsh_setupElecCalc(
566  NOsh *thee,
567  Valist *alist[NOSH_MAXMOL]
568  );
569 
579 VEXTERNC int NOsh_setupApolCalc(
580  NOsh *thee,
581  Valist *alist[NOSH_MAXMOL]
582  );
583 
584 #endif
585 
Contains declarations for class Valist.
MGparm * mgparm
Definition: nosh.h:165
eNOsh_PrintType
NOsh print types.
Definition: nosh.h:144
enum eVdata_Format Vdata_Format
Declaration of the Vdata_Format type as the Vdata_Format enum.
Definition: vhal.h:324
Definition: nosh.h:116
int gotparm
Definition: nosh.h:224
#define NOSH_MAXMOL
Maximum number of molecules in a run.
Definition: nosh.h:79
#define NOSH_MAXPRINT
Maximum number of PRINT statements in a run.
Definition: nosh.h:87
eNOsh_ParmFormat
Parameter file format types.
Definition: nosh.h:129
enum eNOsh_PrintType NOsh_PrintType
Declare NOsh_PrintType type.
Definition: nosh.h:157
int nprint
Definition: nosh.h:247
Definition: nosh.h:99
Contains declarations for class APOLparm.
eNOsh_MolFormat
Molecule file format types.
Definition: nosh.h:97
Definition: nosh.h:98
Contains declarations for class MGparm.
Definition: nosh.h:114
int ncalc
Definition: nosh.h:188
NOsh_CalcType calctype
Definition: nosh.h:169
#define NOSH_MAXPOP
Maximum number of operations in a PRINT statement.
Definition: nosh.h:91
APOLparm * apolparm
Definition: nosh.h:168
int nkappa
Definition: nosh.h:235
PBEparm * pbeparm
Definition: nosh.h:167
int npot
Definition: nosh.h:238
int proc_rank
Definition: nosh.h:203
Definition: nosh.h:115
int nelec
Definition: nosh.h:193
int ncharge
Definition: nosh.h:241
int ndiel
Definition: nosh.h:227
Contains declarations for class Vstring.
Parameter structure for FEM-specific variables from input files.
Definition: femparm.h:133
Definition: nosh.h:130
int napol
Definition: nosh.h:199
eNOsh_CalcType
NOsh calculation types.
Definition: nosh.h:113
Contains generic macro definitions for APBS.
Contains declarations for class PBEparm.
NOsh_ParmFormat parmfmt
Definition: nosh.h:226
Parameter structure for PBE variables from input files.
Definition: pbeparm.h:117
int proc_size
Definition: nosh.h:204
Definition: nosh.h:131
enum eNOsh_ParmFormat NOsh_ParmFormat
Declare NOsh_ParmFormat type.
Definition: nosh.h:138
enum eNOsh_CalcType NOsh_CalcType
Declare NOsh_CalcType type.
Definition: nosh.h:123
Parameter structure for MG-specific variables from input files.
Definition: mgparm.h:114
int nmol
Definition: nosh.h:219
int bogus
Definition: nosh.h:205
Container class for list of atom objects.
Definition: valist.h:78
Class for parsing fixed format input files.
Definition: nosh.h:183
Calculation class for use when parsing fixed format input files.
Definition: nosh.h:164
#define NOSH_MAXCALC
Maximum number of calculations in a run.
Definition: nosh.h:83
enum eNOsh_MolFormat NOsh_MolFormat
Declare NOsh_MolFormat type.
Definition: nosh.h:107
int parsed
Definition: nosh.h:254
int ispara
Definition: nosh.h:202
Definition: nosh.h:100
FEMparm * femparm
Definition: nosh.h:166
Parameter structure for APOL-specific variables from input files.
Definition: apolparm.h:129
int nmesh
Definition: nosh.h:244