source: src/parser.hpp@ d6c485

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_BoundInBox_CenterInBox_MoleculeActions Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since d6c485 was f66195, checked in by Frederik Heber <heber@…>, 15 years ago

forward declarations used to untangle interdependet classes.

  • basically, everywhere in header files we removed '#include' lines were only pointer to the respective classes were used and the include line was moved to the implementation file.
  • as a sidenote, lots of funny errors happened because headers were included via a nesting over three other includes. Now, all should be declared directly as needed, as only very little include lines remain in header files.
  • Property mode set to 100755
File size: 4.8 KB
RevLine 
[f66195]1/** \file parser.hpp
[14de469]2 *
3 * Definitions of various class functions for the parsing of value files.
[6ac7ee]4 *
[14de469]5 */
6
7
[f66195]8#ifndef PARSER_HPP_
9#define PARSER_HPP_
[14de469]10
[6dea43]11using namespace std;
12
[f66195]13/*********************************************** includes ***********************************/
14
[6dea43]15// include config.h
16#ifdef HAVE_CONFIG_H
17#include <config.h>
18#endif
19
[f66195]20/****************************************** forward declarations *****************************/
21
22class EnergyMatrix;
23class ForceMatrix;
24class HessianMatrix;
25class KeySetsContainer;
26class MatrixContainer;
27
28/********************************************** definitions *********************************/
[14de469]29
30#define EnergySuffix ".energy.all"
[85d278]31#define EnergyFragmentSuffix ".energyfragment.all"
[14de469]32#define ForcesSuffix ".forces.all"
[85d278]33#define ForceFragmentSuffix ".forcefragment.all"
34#define HcorrectionSuffix ".Hcorrection.all"
35#define HcorrectionFragmentSuffix ".Hcorrectionfragment.all"
36#define HessianSuffix ".hessian_xx.all"
37#define HessianFragmentSuffix ".hessianfragment_xx.all"
38#define OrderSuffix ".Order"
[68cb0f]39#define ShieldingSuffix ".sigma_all.csv"
40#define ShieldingPASSuffix ".sigma_all_PAS.csv"
41#define ShieldingFragmentSuffix ".sigma_all_fragment.all"
42#define ShieldingPASFragmentSuffix ".sigma_all_PAS_fragment.all"
[674220]43#define ChiSuffix ".chi_all.csv"
44#define ChiPASSuffix ".chi_all_PAS.csv"
45#define ChiFragmentSuffix ".chi_all_fragment.all"
46#define ChiPASFragmentSuffix ".chi_all_PAS_fragment.all"
[14de469]47#define TimeSuffix ".speed"
48
49// ======================================= FUNCTIONS ==========================================
50
[68cb0f]51bool FilePresent(const char *filename, bool test);
[14de469]52bool TestParams(int argc, char **argv);
53
[f66195]54// ======================================= CLASS KeySetsContainer =============================
55
56class KeySetsContainer {
57 public:
58 int **KeySets;
59 int *AtomCounter;
60 int FragmentCounter;
61 int Order;
62 int *FragmentsPerOrder;
63 int **OrderSet;
64
65 KeySetsContainer();
66 ~KeySetsContainer();
67
68 bool ParseKeySets(const char *name, const int *ACounter, const int FCounter);
69 bool ParseManyBodyTerms();
70 bool Contains(const int GreaterSet, const int SmallerSet);
71};
[6dea43]72
[14de469]73// ======================================= CLASS MatrixContainer =============================
74
75class MatrixContainer {
[042f82]76 public:
77 double ***Matrix;
78 int **Indices;
[b12a35]79 char **Header;
[042f82]80 int MatrixCounter;
81 int *RowCounter;
[f731ae]82 int *ColumnCounter;
[14de469]83
[042f82]84 MatrixContainer();
[ab1932]85 virtual ~MatrixContainer();
[14de469]86
[f731ae]87 bool InitialiseIndices(class MatrixContainer *Matrix = NULL);
[042f82]88 bool ParseMatrix(const char *name, int skiplines, int skipcolumns, int MatrixNr);
89 virtual bool ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns);
[b12a35]90 bool AllocateMatrix(char **GivenHeader, int MCounter, int *RCounter, int *CCounter);
[042f82]91 bool ResetMatrix();
92 double FindMinValue();
93 double FindMaxValue();
94 bool SetLastMatrix(double value, int skipcolumns);
95 bool SetLastMatrix(double **values, int skipcolumns);
96 //bool ParseIndices();
97 //bool SumSubValues();
[f66195]98 bool SumSubManyBodyTerms(class MatrixContainer &Matrix, class KeySetsContainer &KeySets, int Order);
[042f82]99 bool WriteTotalFragments(const char *name, const char *prefix);
100 bool WriteLastMatrix(const char *name, const char *prefix, const char *suffix);
[6ac7ee]101};
[14de469]102
103// ======================================= CLASS EnergyMatrix =============================
104
105class EnergyMatrix : public MatrixContainer {
[042f82]106 public:
107 bool ParseIndices();
[f66195]108 bool SumSubEnergy(class EnergyMatrix &Fragments, class EnergyMatrix *CorrectionFragments, class KeySetsContainer &KeySets, int Order, double sign);
[042f82]109 bool ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns);
[14de469]110};
111
112// ======================================= CLASS ForceMatrix =============================
113
114class ForceMatrix : public MatrixContainer {
[042f82]115 public:
116 bool ParseIndices(const char *name);
[f66195]117 bool SumSubForces(class ForceMatrix &Fragments, class KeySetsContainer &KeySets, int Order, double sign);
[042f82]118 bool ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns);
[14de469]119};
120
[85d278]121// ======================================= CLASS HessianMatrix =============================
122
[b12a35]123class HessianMatrix : public MatrixContainer {
[85d278]124 public:
[b12a35]125 HessianMatrix();
126 //~HessianMatrix();
[85d278]127 bool ParseIndices(char *name);
[f66195]128 bool SumSubManyBodyTerms(class MatrixContainer &MatrixValues, class KeySetsContainer &KeySets, int Order);
129 bool SumSubHessians(class HessianMatrix &Fragments, class KeySetsContainer &KeySets, int Order, double sign);
[36ec71]130 bool ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns);
[b12a35]131 private:
132 bool IsSymmetric;
[85d278]133};
134
[14de469]135
136// ======================================= END =============================================
137
[f66195]138#endif /*PARSER_HPP_*/
Note: See TracBrowser for help on using the repository browser.