source: src/parser.hpp@ d067d45

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 Candidate_v1.7.0 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 d067d45 was d067d45, checked in by Frederik Heber <heber@…>, 16 years ago

Merge branch 'MultipleMolecules'

Conflicts:

molecuilder/src/analyzer.cpp
molecuilder/src/atom.cpp
molecuilder/src/boundary.cpp
molecuilder/src/boundary.hpp
molecuilder/src/builder.cpp
molecuilder/src/config.cpp
molecuilder/src/datacreator.hpp
molecuilder/src/helpers.cpp
molecuilder/src/joiner.cpp
molecuilder/src/moleculelist.cpp
molecuilder/src/molecules.cpp
molecuilder/src/molecules.hpp
molecuilder/src/parser.cpp
molecuilder/src/parser.hpp
molecuilder/src/vector.cpp
molecuilder/src/verbose.cpp

merges:

compilation fixes:

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