Class for parsing for fixed format input files. More...
Data Structures | |
struct | sNOsh_calc |
Calculation class for use when parsing fixed format input files. More... | |
struct | sNOsh |
Class for parsing fixed format input files. More... | |
Files | |
file | nosh.h |
Contains declarations for class NOsh. | |
file | nosh.c |
Class NOsh methods. | |
Defines | |
#define | NOSH_MAXMOL 20 |
Maximum number of molecules in a run. | |
#define | NOSH_MAXCALC 20 |
Maximum number of calculations in a run. | |
#define | NOSH_MAXPRINT 20 |
Maximum number of PRINT statements in a run. | |
#define | NOSH_MAXPOP 20 |
Maximum number of operations in a PRINT statement. | |
Typedefs | |
typedef enum eNOsh_MolFormat | NOsh_MolFormat |
Declare NOsh_MolFormat type. | |
typedef enum eNOsh_CalcType | NOsh_CalcType |
Declare NOsh_CalcType type. | |
typedef enum eNOsh_ParmFormat | NOsh_ParmFormat |
Declare NOsh_ParmFormat type. | |
typedef enum eNOsh_PrintType | NOsh_PrintType |
Declare NOsh_PrintType type. | |
typedef struct sNOsh | NOsh |
Declaration of the NOsh class as the NOsh structure. | |
typedef struct sNOsh_calc | NOsh_calc |
Declaration of the NOsh_calc class as the NOsh_calc structure. | |
Enumerations | |
enum | eNOsh_MolFormat { NMF_PQR = 0, NMF_PDB = 1, NMF_XML = 2 } |
Molecule file format types. More... | |
enum | eNOsh_CalcType { NCT_MG = 0, NCT_FEM = 1, NCT_APOL = 2 } |
NOsh calculation types. More... | |
enum | eNOsh_ParmFormat { NPF_FLAT = 0, NPF_XML = 1 } |
Parameter file format types. More... | |
enum | eNOsh_PrintType { NPT_ENERGY = 0, NPT_FORCE = 1, NPT_ELECENERGY, NPT_ELECFORCE, NPT_APOLENERGY, NPT_APOLFORCE } |
NOsh print types. More... | |
Functions | |
char * | NOsh_getMolpath (NOsh *thee, int imol) |
Returns path to specified molecule. | |
char * | NOsh_getDielXpath (NOsh *thee, int imap) |
Returns path to specified x-shifted dielectric map. | |
char * | NOsh_getDielYpath (NOsh *thee, int imap) |
Returns path to specified y-shifted dielectric map. | |
char * | NOsh_getDielZpath (NOsh *thee, int imap) |
Returns path to specified z-shifted dielectric map. | |
char * | NOsh_getKappapath (NOsh *thee, int imap) |
Returns path to specified kappa map. | |
char * | NOsh_getChargepath (NOsh *thee, int imap) |
Returns path to specified charge distribution map. | |
NOsh_calc * | NOsh_getCalc (NOsh *thee, int icalc) |
Returns specified calculation object. | |
int | NOsh_getDielfmt (NOsh *thee, int imap) |
Returns format of specified dielectric map. | |
int | NOsh_getKappafmt (NOsh *thee, int imap) |
Returns format of specified kappa map. | |
int | NOsh_getChargefmt (NOsh *thee, int imap) |
Returns format of specified charge map. | |
NOsh_PrintType | NOsh_printWhat (NOsh *thee, int iprint) |
Return an integer ID of the observable to print (. | |
char * | NOsh_elecname (NOsh *thee, int ielec) |
Return an integer mapping of an ELEC statement to a calculation ID (. | |
int | NOsh_elec2calc (NOsh *thee, int icalc) |
Return the name of an elec statement. | |
int | NOsh_apol2calc (NOsh *thee, int icalc) |
Return the name of an apol statement. | |
int | NOsh_printNarg (NOsh *thee, int iprint) |
Return number of arguments to PRINT statement (. | |
int | NOsh_printOp (NOsh *thee, int iprint, int iarg) |
Return integer ID for specified operation (. | |
int | NOsh_printCalc (NOsh *thee, int iprint, int iarg) |
Return calculation ID for specified PRINT statement (. | |
NOsh * | NOsh_ctor (int rank, int size) |
Construct NOsh. | |
NOsh_calc * | NOsh_calc_ctor (NOsh_CalcType calcType) |
Construct NOsh_calc. | |
int | NOsh_calc_copy (NOsh_calc *thee, NOsh_calc *source) |
Copy NOsh_calc object into thee. | |
void | NOsh_calc_dtor (NOsh_calc **thee) |
Object destructor. | |
int | NOsh_ctor2 (NOsh *thee, int rank, int size) |
FORTRAN stub to construct NOsh. | |
void | NOsh_dtor (NOsh **thee) |
Object destructor. | |
void | NOsh_dtor2 (NOsh *thee) |
FORTRAN stub for object destructor. | |
int | NOsh_parseInput (NOsh *thee, Vio *sock) |
Parse an input file from a socket. | |
int | NOsh_parseInputFile (NOsh *thee, char *filename) |
Parse an input file only from a file. | |
int | NOsh_setupElecCalc (NOsh *thee, Valist *alist[NOSH_MAXMOL]) |
Setup the series of electrostatics calculations. | |
int | NOsh_setupApolCalc (NOsh *thee, Valist *alist[NOSH_MAXMOL]) |
Setup the series of non-polar calculations. |
Class for parsing for fixed format input files.
enum eNOsh_CalcType |
enum eNOsh_MolFormat |
enum eNOsh_ParmFormat |
enum eNOsh_PrintType |
int NOsh_apol2calc | ( | NOsh * | thee, | |
int | icalc | |||
) |
Return the name of an apol statement.
thee | NOsh object to use | |
icalc | ID of CALC statement |
References sNOsh::apol2calc.
Copy NOsh_calc object into thee.
thee | Target object | |
source | Source object |
References sNOsh_calc::apolparm, APOLparm_copy(), sNOsh_calc::calctype, sNOsh_calc::femparm, FEMparm_copy(), sNOsh_calc::mgparm, MGparm_copy(), sNOsh_calc::pbeparm, and PBEparm_copy().
NOsh_calc* NOsh_calc_ctor | ( | NOsh_CalcType | calcType | ) |
Construct NOsh_calc.
calcType | Calculation type |
References sNOsh_calc::apolparm, APOLparm_ctor(), sNOsh_calc::calctype, FCT_NONE, sNOsh_calc::femparm, FEMparm_ctor(), MCT_NONE, sNOsh_calc::mgparm, MGparm_ctor(), NCT_APOL, NCT_FEM, NCT_MG, sNOsh_calc::pbeparm, and PBEparm_ctor().
void NOsh_calc_dtor | ( | NOsh_calc ** | thee | ) |
Object destructor.
thee | Pointer to memory location of NOsh_calc object |
References sNOsh_calc::apolparm, APOLparm_dtor(), sNOsh_calc::calctype, sNOsh_calc::femparm, FEMparm_dtor(), sNOsh_calc::mgparm, MGparm_dtor(), NCT_APOL, NCT_FEM, NCT_MG, sNOsh_calc::pbeparm, and PBEparm_dtor().
Referenced by NOsh_dtor2().
NOsh* NOsh_ctor | ( | int | rank, | |
int | size | |||
) |
Construct NOsh.
rank | Rank of current processor in parallel calculation (0 if not parallel) | |
size | Number of processors in parallel calculation (1 if not parallel) |
References NOsh_ctor2().
Referenced by main().
int NOsh_ctor2 | ( | NOsh * | thee, | |
int | rank, | |||
int | size | |||
) |
FORTRAN stub to construct NOsh.
thee | Space for NOsh objet | |
rank | Rank of current processor in parallel calculation (0 if not parallel) | |
size | Number of processors in parallel calculation (1 if not parallel) |
References sNOsh::alist, sNOsh::apol, sNOsh::calc, sNOsh::elec, sNOsh::gotparm, sNOsh::ispara, sNOsh::napol, sNOsh::ncalc, sNOsh::ncharge, sNOsh::ndiel, sNOsh::nelec, sNOsh::nkappa, sNOsh::nmol, NOSH_MAXCALC, NOSH_MAXMOL, sNOsh::nprint, sNOsh::parsed, sNOsh::proc_rank, and sNOsh::proc_size.
Referenced by NOsh_ctor().
void NOsh_dtor | ( | NOsh ** | thee | ) |
Object destructor.
thee | Pointer to memory location of NOsh object |
References NOsh_dtor2().
Referenced by main().
void NOsh_dtor2 | ( | NOsh * | thee | ) |
FORTRAN stub for object destructor.
thee | Pointer to NOsh object |
References sNOsh::apol, sNOsh::calc, sNOsh::elec, sNOsh::napol, sNOsh::ncalc, sNOsh::nelec, and NOsh_calc_dtor().
Referenced by NOsh_dtor().
int NOsh_elec2calc | ( | NOsh * | thee, | |
int | icalc | |||
) |
Return the name of an elec statement.
thee | NOsh object to use | |
icalc | ID of CALC statement |
References sNOsh::elec2calc.
char* NOsh_elecname | ( | NOsh * | thee, | |
int | ielec | |||
) |
Return an integer mapping of an ELEC statement to a calculation ID (.
thee | NOsh object to use | |
ielec | ID of ELEC statement |
References sNOsh::elecname.
Returns specified calculation object.
thee | Pointer to NOsh object | |
icalc | Calculation ID of interest |
References sNOsh::calc.
int NOsh_getChargefmt | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns format of specified charge map.
thee | Pointer to NOsh object | |
imap | Calculation ID of interest |
References sNOsh::chargefmt.
char* NOsh_getChargepath | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns path to specified charge distribution map.
thee | Pointer to NOsh object | |
imap | Map ID of interest |
References sNOsh::chargepath.
int NOsh_getDielfmt | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns format of specified dielectric map.
thee | Pointer to NOsh object | |
imap | Calculation ID of interest |
References sNOsh::dielfmt.
char* NOsh_getDielXpath | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns path to specified x-shifted dielectric map.
thee | Pointer to NOsh object | |
imap | Map ID of interest |
References sNOsh::dielXpath.
char* NOsh_getDielYpath | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns path to specified y-shifted dielectric map.
thee | Pointer to NOsh object | |
imap | Map ID of interest |
References sNOsh::dielYpath.
char* NOsh_getDielZpath | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns path to specified z-shifted dielectric map.
thee | Pointer to NOsh object | |
imap | Map ID of interest |
References sNOsh::dielZpath.
int NOsh_getKappafmt | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns format of specified kappa map.
thee | Pointer to NOsh object | |
imap | Calculation ID of interest |
References sNOsh::kappafmt.
char* NOsh_getKappapath | ( | NOsh * | thee, | |
int | imap | |||
) |
Returns path to specified kappa map.
thee | Pointer to NOsh object | |
imap | Map ID of interest |
References sNOsh::kappapath.
char* NOsh_getMolpath | ( | NOsh * | thee, | |
int | imol | |||
) |
Returns path to specified molecule.
thee | Pointer to NOsh object | |
imol | Molecule ID of interest |
References sNOsh::molpath.
int NOsh_parseInput | ( | NOsh * | thee, | |
Vio * | sock | |||
) |
Parse an input file from a socket.
thee | Pointer to NOsh object | |
sock | Stream of tokens to parse |
References MCcommChars, MCwhiteChars, sNOsh::ncharge, sNOsh::ndiel, sNOsh::nelec, sNOsh::nkappa, sNOsh::nmol, sNOsh::parsed, and Vstring_strcasecmp().
Referenced by main(), and NOsh_parseInputFile().
int NOsh_parseInputFile | ( | NOsh * | thee, | |
char * | filename | |||
) |
Parse an input file only from a file.
thee | Pointer to NOsh object | |
filename | Name/path of readable file |
References NOsh_parseInput().
int NOsh_printCalc | ( | NOsh * | thee, | |
int | iprint, | |||
int | iarg | |||
) |
Return calculation ID for specified PRINT statement (.
thee | NOsh object to use | |
iprint | ID of PRINT statement | |
iarg | ID of operation in PRINT statement |
References sNOsh::printcalc.
int NOsh_printNarg | ( | NOsh * | thee, | |
int | iprint | |||
) |
Return number of arguments to PRINT statement (.
thee | NOsh object to use | |
iprint | ID of PRINT statement |
References sNOsh::printnarg.
int NOsh_printOp | ( | NOsh * | thee, | |
int | iprint, | |||
int | iarg | |||
) |
Return integer ID for specified operation (.
thee | NOsh object to use | |
iprint | ID of PRINT statement | |
iarg | ID of operation in PRINT statement |
References sNOsh::printop.
NOsh_PrintType NOsh_printWhat | ( | NOsh * | thee, | |
int | iprint | |||
) |
Return an integer ID of the observable to print (.
thee | NOsh object to use | |
iprint | ID of PRINT statement |
References sNOsh::printwhat.
Setup the series of non-polar calculations.
thee | Pointer to NOsh object | |
alist | Array of pointers to Valist objects (molecules used to center mesh); |
thee | NOsh object | |
alist | Atom list for calculation |
References ACD_ERROR, ACD_NO, ACD_YES, sNOsh::alist, sNOsh::apol, sNOsh::apol2calc, sNOsh_calc::calctype, sNOsh::napol, sNOsh::ncalc, NCT_APOL, and sNOsh::nmol.
Referenced by main().
Setup the series of electrostatics calculations.
thee | Pointer to NOsh object | |
alist | Array of pointers to Valist objects (molecules used to center mesh); |
thee | NOsh object | |
alist | Atom list for calculation |
References sNOsh::alist, sPBEparm::calcforce, sNOsh_calc::calctype, sMGparm::ccenter, sMGparm::ccentmol, sMGparm::ccmeth, sValist::center, sMGparm::center, sMGparm::centmol, sMGparm::cmeth, sNOsh::elec, sNOsh::elec2calc, sMGparm::fcenter, sMGparm::fcentmol, sMGparm::fcmeth, MCM_MOLECULE, sNOsh_calc::mgparm, sNOsh::ncalc, sNOsh::ncharge, NCT_FEM, NCT_MG, sNOsh::ndiel, sNOsh::nelec, sNOsh::nkappa, sNOsh::nmol, sNOsh_calc::pbeparm, and PCF_NO.
Referenced by main().