Go to the documentation of this file.
7 // written by David Hurwitz, March to May 1998.
9 #if !defined(PARSE_HPP)
10  #define PARSE_HPP
21 // the "main" function for parsing
22 void ReadInput(char* Str, ARestraintManager& RMgr,
23  ALambdaManager& LMgr,
25  double dT);
27 // get an initialized restraint that's read from the input String
28 int ReadRestraints(char* Str, ARestraintManager& RMgr,
30 ARestraint* GetRestraint(char* Str, int& NumChars, GlobalMasterFreeEnergy& CFE);
32 // for reading pmf/mcti blocks
33 int ReadPmfBlock(char* Str, ALambdaControl& PmfBlock, double dT);
34 int ReadNextPmfSpec(char* Str, pmf_t& PmfSpec);
35 int ReadTaskType(char* Str, feptask_t& Task);
36 int ReadTimeUnits(char* Str, TimeUnits_t& Units, TimeUnits_t DefaultUnits);
37 double GetTime(double Val, TimeUnits_t Units);
39 // functions for parsing the config file
40 void CheckParentheses(const char* Str);
41 void ProblemParsing(const char* Message, const char* Str, Bool_t Terminate=kTrue);
42 void ToLower(char* Str);
43 int ReadWhite(const char* Str);
44 int ReadAlphaNum(const char* Str);
45 int ReadAlpha(const char* Str);
46 int ReadDigits(const char* Str);
47 int ReadParentheses(const char* Str);
48 int IsStartGroup(char* Str);
49 int IsEndGroup(char* Str);
50 int IsAtomName(char* Str);
51 int IsAtomNameList(char* Str);
52 int IsAtom(char* Str);
53 int IsAResidue(char* Str);
54 int IsResidue(char* Str);
55 int IsResidueRange(char* Str);
56 int ReadWord(const char* Str, const char* Word, Bool_t ErrMsg=kFalse);
57 int ReadChar(char* Str, char Char, Bool_t ErrMsg=kFalse);
58 int ReadAValue(char* Str, double& Value, Bool_t ErrMsg=kFalse);
59 int ReadBound(char* Str, Bound_t& Bound);
60 item_t ReadNextItem(char* Str, int& NumChars);
61 restr_t ReadNextRestraintType(char* Str, int& NumChars);
63 // functions for putting the specified atoms into Group's
64 int AddAtoms(AGroup& Group, char* Str, GlobalMasterFreeEnergy& CFE);
65 void AddAtom(AGroup& Group, char* Atom, GlobalMasterFreeEnergy& CFE);
66 void AddResidues(AGroup& Group, char* ResRange, GlobalMasterFreeEnergy& CFE);
67 void AddAtomsInResidues(AGroup& Group, char* AtomNames, char* ResRange,
70 // functions for helping with the above
71 void AddAtom(AGroup& Group, char* ResRange, char* AtomName,
73 void GetResRange(char* ResRange, int& ResNum1, int& ResNum2);
74 int GetSegName(char* Str, char* SegName);
75 int GetResNum(char* Str, int& ResNum);
76 int GetAtomName(char* Str, char* AtomName);
78 #endif
int IsAResidue(char *Str)
int GetAtomName(char *Str, char *AtomName)
restr_t ReadNextRestraintType(char *Str, int &NumChars)
int IsAtomNameList(char *Str)
int ReadAlphaNum(const char *Str)
int ReadAlpha(const char *Str)
int ReadWhite(const char *Str)
int ReadAValue(char *Str, double &Value, Bool_t ErrMsg)
int ReadParentheses(const char *Str)
int IsResidueRange(char *Str)
Definition: ParseOptions.h:28
void AddResidues(AGroup &Group, char *ResRange, GlobalMasterFreeEnergy &CFE)
int AddAtoms(AGroup &Group, char *Str, GlobalMasterFreeEnergy &CFE)
void ProblemParsing(const char *Message, const char *Str, Bool_t Terminate)
int ReadTimeUnits(char *Str, TimeUnits_t &Units, TimeUnits_t DefaultUnits)
void AddAtom(AGroup &Group, char *Atom, GlobalMasterFreeEnergy &CFE)
double GetTime(double Val, TimeUnits_t Units)
item_t ReadNextItem(char *Str, int &NumChars)
void ReadInput(char *Str, ARestraintManager &RMgr, ALambdaManager &LMgr, GlobalMasterFreeEnergy &CFE, double dT)
int ReadChar(char *Str, char Char, Bool_t ErrMsg)
int ReadTaskType(char *Str, feptask_t &Task)
int IsAtomName(char *Str)
void ToLower(char *Str)
int IsAtom(char *Str)
int GetResNum(char *Str, int &ResNum)
void CheckParentheses(const char *Str)
int ReadPmfBlock(char *Str, ALambdaControl &PmfBlock, double dT)
int IsStartGroup(char *Str)
void AddAtomsInResidues(AGroup &Group, char *AtomNames, char *ResRange, GlobalMasterFreeEnergy &CFE)
int ReadDigits(const char *Str)
int ReadWord(const char *Str, const char *Word, Bool_t ErrMsg)
int GetSegName(char *Str, char *SegName)
int ReadBound(char *Str, Bound_t &Bound)
ARestraint * GetRestraint(char *Str, int &NumChars, GlobalMasterFreeEnergy &CFE)
void GetResRange(char *ResRange, int &ResNum1, int &ResNum2)
int ReadNextPmfSpec(char *Str, pmf_t &PmfSpec)
int IsEndGroup(char *Str)
int IsResidue(char *Str)
int ReadRestraints(char *Str, ARestraintManager &AllRestraints, GlobalMasterFreeEnergy &CFE)