source: src/molecules.hpp@ 41f151

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 41f151 was 41f151, checked in by Frederik Heber <heber@…>, 17 years ago

BUGFIXES: CyclicStructureAnalysis() now compatible to disconnected subgraphs, AssignKeySetsToFragment() and FillBondStructureFromReference() memory cleanup corrected

+ molecule::DepthFirstSearchAnalysis() now just returns BackEdgeStack, not MinimumRingSize. CyclicStructureAnalysis() is called during FragmentMolecule(), after subgraphs bonds list have been filled by FillBondStructureFromReference().
+ new function molecule::PickLocalBackEdges(), as the BackEdgeStack returned by DepthFirstSearchAnalysis() co
ntains only global bonds, not the local ones for the subgraph, we have to step through it and pick the right
ones out.
+ molecule::FragmentMolecule() now calls molecule::CyclicStructureAnalysis() separately for each subgraph, along with a BackEdgeStack filled by PickLocalBackEdges(), and allocates&initialises MinimumRingSize array. Als
o AssignKeySetsToFragment() frees the LocalListOfAtoms now (FreeList=true), now longer after the following wh
ile
+ molecule::CyclicStructureAnalysis() takes a local BackEdgeStack and analysis the subgraphs cycles, returnin
g minimum ring size
+ MoleculeLeafClass::AssignKeySetsToFragment() now frees memory for ListOfLocalAtoms when FreeList is set. BUGFIX: test of first key was testing against ..->nr != -1. However, LocalListOfAtoms was not even initialised correctly to NULL, hence ...->nr pointed in some cases to nowhere. Now it test atom* against NULL.
+ MoleculeLeafClass::FillBondStructureFromReference() now frees memory for ListOfLocalAtoms when FreeList is set correctly (only free initial pointer when FragmentCounter == 0, also it was decreased not before but after freeing, hence we free'd the wrong list). Also, father replaced by GetTrueFather() (makes the function moregenerally useable, was not a bug).
+ ParseCommandLineOptions() option 'D': adapted to changes in DepthFirstSearchAnalysis() in a similar manner
to FragmentMolecule()
+ molecule::CountCyclicBonds() adapted but does not perform CyclicStructureAnalysis()
+ molecule::CreateAdjacencyList() counts the bonds that could not be brought to covalently corrected degree (i.e. the remaining ionic atoms)
+ molecule::CreateListOfBondsPerAtom() prints atom names and number, which is helpful as name contains global

and number contains local number (helped in finding above bugs)

+ CreateFatherLookupTable(): BUGFIX: LookupTable was not initialised to NULL (see above)

  • Property mode set to 100644
File size: 18.2 KB
Line 
1/** \file molecules.hpp
2 *
3 * Class definitions of atom and molecule, element and periodentafel
4 */
5
6#ifndef MOLECULES_HPP_
7#define MOLECULES_HPP_
8
9using namespace std;
10
11// GSL headers
12#include <gsl/gsl_eigen.h>
13#include <gsl/gsl_heapsort.h>
14#include <gsl/gsl_linalg.h>
15#include <gsl/gsl_matrix.h>
16#include <gsl/gsl_multimin.h>
17#include <gsl/gsl_vector.h>
18
19// STL headers
20#include <map>
21#include <set>
22#include <deque>
23#include <list>
24#include <vector>
25
26#include "helpers.hpp"
27#include "parser.hpp"
28#include "periodentafel.hpp"
29#include "stackclass.hpp"
30#include "vector.hpp"
31
32class atom;
33class bond;
34class config;
35class molecule;
36class MoleculeListClass;
37class Verbose;
38
39/******************************** Some definitions for easier reading **********************************/
40
41#define KeyStack deque<int>
42#define KeySet set<int>
43#define NumberValuePair pair<int, double>
44#define Graph map <KeySet, NumberValuePair, KeyCompare >
45#define GraphPair pair <KeySet, NumberValuePair >
46#define KeySetTestPair pair<KeySet::iterator, bool>
47#define GraphTestPair pair<Graph::iterator, bool>
48
49#define DistancePair pair < double, atom* >
50#define DistanceMap multimap < double, atom* >
51#define DistanceTestPair pair < DistanceMap::iterator, bool>
52
53#define Boundaries map <double, DistancePair >
54#define BoundariesPair pair<double, DistancePair >
55#define BoundariesTestPair pair< Boundaries::iterator, bool>
56
57#define PointMap map < int, class BoundaryPointSet * >
58#define PointPair pair < int, class BoundaryPointSet * >
59#define PointTestPair pair < PointMap::iterator, bool >
60
61#define LineMap map < int, class BoundaryLineSet * >
62#define LinePair pair < int, class BoundaryLineSet * >
63#define LineTestPair pair < LinePair::iterator, bool >
64
65#define TriangleMap map < int, class BoundaryTriangleSet * >
66#define TrianglePair pair < int, class BoundaryTriangleSet * >
67#define TriangleTestPair pair < TrianglePair::iterator, bool >
68
69#define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> >
70#define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> >
71
72/******************************** Some small functions and/or structures **********************************/
73
74struct KeyCompare
75{
76 bool operator() (const KeySet SubgraphA, const KeySet SubgraphB) const;
77};
78
79struct Trajectory
80{
81 vector<Vector> R; //!< position vector
82 vector<Vector> U; //!< velocity vector
83 vector<Vector> F; //!< last force vector
84 atom *ptr; //!< pointer to atom whose trajectory we contain
85};
86
87//bool operator < (KeySet SubgraphA, KeySet SubgraphB); //note: this declaration is important, otherwise normal < is used (producing wrong order)
88inline void InsertFragmentIntoGraph(ofstream *out, struct UniqueFragments *Fragment); // Insert a KeySet into a Graph
89inline void InsertGraphIntoGraph(ofstream *out, Graph &graph1, Graph &graph2, int *counter); // Insert all KeySet's in a Graph into another Graph
90int CompareDoubles (const void * a, const void * b);
91
92
93/************************************* Class definitions ****************************************/
94
95
96// some algebraic matrix stuff
97#define RDET3(a) ((a)[0]*(a)[4]*(a)[8] + (a)[3]*(a)[7]*(a)[2] + (a)[6]*(a)[1]*(a)[5] - (a)[2]*(a)[4]*(a)[6] - (a)[5]*(a)[7]*(a)[0] - (a)[8]*(a)[1]*(a)[3]) //!< hard-coded determinant of a 3x3 matrix
98#define RDET2(a0,a1,a2,a3) ((a0)*(a3)-(a1)*(a2)) //!< hard-coded determinant of a 2x2 matrix
99
100
101/** Parameter structure for least square minimsation.
102 */
103struct LSQ_params {
104 Vector **vectors;
105 int num;
106};
107
108double LSQ(const gsl_vector * x, void * params);
109
110/** Parameter structure for least square minimsation.
111 */
112struct lsq_params {
113 gsl_vector *x;
114 const molecule *mol;
115 element *type;
116};
117
118
119
120/** Single atom.
121 * Class incoporates position, type
122 */
123class atom {
124 public:
125 Vector x; //!< coordinate array of atom, giving position within cell
126 Vector v; //!< velocity array of atom
127 element *type; //!< pointing to element
128 atom *previous; //!< previous atom in molecule list
129 atom *next; //!< next atom in molecule list
130 atom *father; //!< In many-body bond order fragmentations points to originating atom
131 atom *Ancestor; //!< "Father" in Depth-First-Search
132 char *Name; //!< unique name used during many-body bond-order fragmentation
133 int FixedIon; //!< config variable that states whether forces act on the ion or not
134 int *sort; //!< sort criteria
135 int nr; //!< continuous, unique number
136 int GraphNr; //!< unique number, given in DepthFirstSearchAnalysis()
137 int *ComponentNr;//!< belongs to this nonseparable components, given in DepthFirstSearchAnalysis() (if more than one, then is SeparationVertex)
138 int LowpointNr; //!< needed in DepthFirstSearchAnalysis() to detect nonseparable components, is the lowest possible number of an atom to reach via tree edges only followed by at most one back edge.
139 bool SeparationVertex; //!< whether this atom separates off subsets of atoms or not, determined in DepthFirstSearchAnalysis()
140 bool IsCyclic; //!< whether atom belong to as cycle or not, determined in DepthFirstSearchAnalysis()
141 unsigned char AdaptiveOrder; //!< current present bond order at site (0 means "not set")
142 bool MaxOrder; //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not
143
144 atom();
145 ~atom();
146
147 bool Output(int ElementNo, int AtomNo, ofstream *out) const;
148 bool OutputXYZLine(ofstream *out) const;
149 atom *GetTrueFather();
150 bool Compare(atom &ptr);
151
152 private:
153};
154
155ostream & operator << (ostream &ost, atom &a);
156
157/** Bonds between atoms.
158 * Class incorporates bonds between atoms in a molecule,
159 * used to derive tge fragments in many-body bond order
160 * calculations.
161 */
162class bond {
163 public:
164 atom *leftatom; //!< first bond partner
165 atom *rightatom; //!< second bond partner
166 bond *previous; //!< previous atom in molecule list
167 bond *next; //!< next atom in molecule list
168 int HydrogenBond; //!< Number of hydrogen atoms in the bond
169 int BondDegree; //!< single, double, triple, ... bond
170 int nr; //!< unique number in a molecule, updated by molecule::CreateAdjacencyList()
171 bool Cyclic; //!< flag whether bond is part of a cycle or not, given in DepthFirstSearchAnalysis()
172 enum EdgeType Type;//!< whether this is a tree or back edge
173
174 atom * GetOtherAtom(atom *Atom) const;
175 bond * GetFirstBond();
176 bond * GetLastBond();
177
178 bool MarkUsed(enum Shading color);
179 enum Shading IsUsed();
180 void ResetUsed();
181 bool Contains(const atom *ptr);
182 bool Contains(const int nr);
183
184 bond();
185 bond(atom *left, atom *right);
186 bond(atom *left, atom *right, int degree);
187 bond(atom *left, atom *right, int degree, int number);
188 ~bond();
189
190 private:
191 enum Shading Used; //!< marker in depth-first search, DepthFirstSearchAnalysis()
192};
193
194ostream & operator << (ostream &ost, bond &b);
195
196class MoleculeLeafClass;
197
198/** The complete molecule.
199 * Class incorporates number of types
200 */
201class molecule {
202 public:
203 double cell_size[6];//!< cell size
204 periodentafel *elemente; //!< periodic table with each element
205 atom *start; //!< start of atom list
206 atom *end; //!< end of atom list
207 bond *first; //!< start of bond list
208 bond *last; //!< end of bond list
209 bond ***ListOfBondsPerAtom; //!< pointer list for each atom and each bond it has
210 map<atom *, struct Trajectory> Trajectories; //!< contains old trajectory points
211 int MDSteps; //!< The number of MD steps in Trajectories
212 int *NumberOfBondsPerAtom; //!< Number of Bonds each atom has
213 int AtomCount; //!< number of atoms, brought up-to-date by CountAtoms()
214 int BondCount; //!< number of atoms, brought up-to-date by CountBonds()
215 int ElementCount; //!< how many unique elements are therein
216 int ElementsInMolecule[MAX_ELEMENTS]; //!< list whether element (sorted by atomic number) is alread present or not
217 int NoNonHydrogen; //!< number of non-hydrogen atoms in molecule
218 int NoNonBonds; //!< number of non-hydrogen bonds in molecule
219 int NoCyclicBonds; //!< number of cyclic bonds in molecule, by DepthFirstSearchAnalysis()
220 double BondDistance; //!< typical bond distance used in CreateAdjacencyList() and furtheron
221
222 molecule(periodentafel *teil);
223 ~molecule();
224
225 /// remove atoms from molecule.
226 bool AddAtom(atom *pointer);
227 bool RemoveAtom(atom *pointer);
228 bool CleanupMolecule();
229
230 /// Add/remove atoms to/from molecule.
231 atom * AddCopyAtom(atom *pointer);
232 bool AddXYZFile(string filename);
233 bool AddHydrogenReplacementAtom(ofstream *out, bond *Bond, atom *BottomOrigin, atom *TopOrigin, atom *TopReplacement, bond **BondList, int NumBond, bool IsAngstroem);
234 bond * AddBond(atom *first, atom *second, int degree);
235 bool RemoveBond(bond *pointer);
236 bool RemoveBonds(atom *BondPartner);
237
238 /// Find atoms.
239 atom * FindAtom(int Nr) const;
240 atom * AskAtom(string text);
241
242 /// Count and change present atoms' coordination.
243 void CountAtoms(ofstream *out);
244 void CountElements();
245 void CalculateOrbitals(class config &configuration);
246 bool CenterInBox(ofstream *out, Vector *BoxLengths);
247 void CenterEdge(ofstream *out, Vector *max);
248 void CenterOrigin(ofstream *out, Vector *max);
249 void CenterGravity(ofstream *out, Vector *max);
250 void Translate(const Vector *x);
251 void Mirror(const Vector *x);
252 void Align(Vector *n);
253 void Scale(double **factor);
254 void DetermineCenter(Vector &center);
255 Vector * DetermineCenterOfGravity(ofstream *out);
256 Vector * DetermineCenterOfAll(ofstream *out);
257 void SetBoxDimension(Vector *dim);
258 double * ReturnFullMatrixforSymmetric(double *cell_size);
259 void ScanForPeriodicCorrection(ofstream *out);
260 void PrincipalAxisSystem(ofstream *out, bool DoRotate);
261 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
262 bool VerletForceIntegration(ofstream *out, char *file, double delta_t, bool IsAngstroem, int DoConstrained);
263 double ConstrainedPotential(ofstream *out, atom **permutation, int start, int end, double *constants, bool IsAngstroem);
264 double MinimiseConstrainedPotential(ofstream *out, atom **&permutation, int startstep, int endstep, bool IsAngstroem);
265 void EvaluateConstrainedForces(ofstream *out, int startstep, int endstep, atom **PermutationMap, ForceMatrix *Force);
266 bool LinearInterpolationBetweenConfiguration(ofstream *out, int startstep, int endstep, const char *prefix, config &configuration);
267
268 bool CheckBounds(const Vector *x) const;
269 void GetAlignvector(struct lsq_params * par) const;
270
271 /// Initialising routines in fragmentation
272 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem);
273 void CreateListOfBondsPerAtom(ofstream *out);
274
275 // Graph analysis
276 MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, class StackClass<bond *> *&BackEdgeStack);
277 void CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize);
278 bool PickLocalBackEdges(ofstream *out, atom **ListOfLocalAtoms, class StackClass<bond *> *&ReferenceStack, class StackClass<bond *> *&LocalStack);
279 bond * FindNextUnused(atom *vertex);
280 void SetNextComponentNumber(atom *vertex, int nr);
281 void InitComponentNumbers();
282 void OutputComponentNumber(ofstream *out, atom *vertex);
283 void ResetAllBondsToUnused();
284 void ResetAllAtomNumbers();
285 int CountCyclicBonds(ofstream *out);
286 bool CheckForConnectedSubgraph(ofstream *out, KeySet *Fragment);
287 string GetColor(enum Shading color);
288
289 molecule *CopyMolecule();
290
291 /// Fragment molecule by two different approaches:
292 int FragmentMolecule(ofstream *out, int Order, config *configuration);
293 bool CheckOrderAtSite(ofstream *out, bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
294 bool StoreAdjacencyToFile(ofstream *out, char *path);
295 bool CheckAdjacencyFileAgainstMolecule(ofstream *out, char *path, atom **ListOfAtoms);
296 bool ParseOrderAtSiteFromFile(ofstream *out, char *path);
297 bool StoreOrderAtSiteFile(ofstream *out, char *path);
298 bool ParseKeySetFile(ofstream *out, char *filename, Graph *&FragmentList);
299 bool StoreKeySetFile(ofstream *out, Graph &KeySetList, char *path);
300 bool StoreForcesFile(ofstream *out, MoleculeListClass *BondFragments, char *path, int *SortIndex);
301 bool CreateMappingLabelsToConfigSequence(ofstream *out, int *&SortIndex);
302 bool ScanBufferIntoKeySet(ofstream *out, char *buffer, KeySet &CurrentSet);
303 void BreadthFirstSearchAdd(ofstream *out, molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
304 /// -# BOSSANOVA
305 void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
306 int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
307 bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
308 molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
309 void SPFragmentGenerator(ofstream *out, struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
310 int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
311 int GuesstimateFragmentCount(ofstream *out, int order);
312
313 // Recognize doubly appearing molecules in a list of them
314 int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
315 int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
316
317 // Output routines.
318 bool Output(ofstream *out);
319 bool OutputTrajectories(ofstream *out);
320 void OutputListOfBonds(ofstream *out) const;
321 bool OutputXYZ(ofstream *out) const;
322 bool OutputTrajectoriesXYZ(ofstream *out);
323 bool Checkout(ofstream *out) const;
324 bool OutputTemperatureFromTrajectories(ofstream *out, int startstep, int endstep, ofstream *output);
325
326 private:
327 int last_atom; //!< number given to last atom
328};
329
330/** A list of \a molecule classes.
331 */
332class MoleculeListClass {
333 public:
334 molecule **ListOfMolecules; //!< pointer list of fragment molecules to check for equality
335 int NumberOfMolecules; //!< Number of entries in \a **FragmentList and of to be returned one.
336 int NumberOfTopAtoms; //!< Number of atoms in the molecule from which all fragments originate
337
338 MoleculeListClass();
339 MoleculeListClass(int Num, int NumAtoms);
340 ~MoleculeListClass();
341
342 /// Output configs.
343 bool AddHydrogenCorrection(ofstream *out, char *path);
344 bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
345 bool OutputConfigForListOfFragments(ofstream *out, const char *fragmentprefix, config *configuration, int *SortIndex, bool DoPeriodic, bool DoCentering);
346 void Output(ofstream *out);
347
348 private:
349};
350
351
352/** A leaf for a tree of \a molecule class
353 * Wraps molecules in a tree structure
354 */
355class MoleculeLeafClass {
356 public:
357 molecule *Leaf; //!< molecule of this leaf
358 //MoleculeLeafClass *UpLeaf; //!< Leaf one level up
359 //MoleculeLeafClass *DownLeaf; //!< First leaf one level down
360 MoleculeLeafClass *previous; //!< Previous leaf on this level
361 MoleculeLeafClass *next; //!< Next leaf on this level
362
363 //MoleculeLeafClass(MoleculeLeafClass *Up, MoleculeLeafClass *Previous);
364 MoleculeLeafClass(MoleculeLeafClass *PreviousLeaf);
365 ~MoleculeLeafClass();
366
367 bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
368 bool FillBondStructureFromReference(ofstream *out, molecule *reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
369 bool FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
370 bool AssignKeySetsToFragment(ofstream *out, molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
371 bool FillListOfLocalAtoms(ofstream *out, atom ***&ListOfLocalAtoms, const int FragmentCounter, const int GlobalAtomCount, bool &FreeList);
372 void TranslateIndicesToGlobalIDs(ofstream *out, Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
373 int Count() const;
374};
375
376/** The config file.
377 * The class contains all parameters that control a dft run also functions to load and save.
378 */
379class config {
380 public:
381 int PsiType;
382 int MaxPsiDouble;
383 int PsiMaxNoUp;
384 int PsiMaxNoDown;
385 int MaxMinStopStep;
386 int InitMaxMinStopStep;
387 int ProcPEGamma;
388 int ProcPEPsi;
389 char *configpath;
390 char *configname;
391 bool FastParsing;
392 double Deltat;
393 int DoConstrainedMD;
394 int MaxOuterStep;
395
396 private:
397 char *mainname;
398 char *defaultpath;
399 char *pseudopotpath;
400
401 int DoOutVis;
402 int DoOutMes;
403 int DoOutNICS;
404 int DoOutOrbitals;
405 int DoOutCurrent;
406 int DoFullCurrent;
407 int DoPerturbation;
408 int DoWannier;
409 int CommonWannier;
410 double SawtoothStart;
411 int VectorPlane;
412 double VectorCut;
413 int UseAddGramSch;
414 int Seed;
415
416 int OutVisStep;
417 int OutSrcStep;
418 double TargetTemp;
419 int ScaleTempStep;
420 int MaxPsiStep;
421 double EpsWannier;
422
423 int MaxMinStep;
424 double RelEpsTotalEnergy;
425 double RelEpsKineticEnergy;
426 int MaxMinGapStopStep;
427 int MaxInitMinStep;
428 double InitRelEpsTotalEnergy;
429 double InitRelEpsKineticEnergy;
430 int InitMaxMinGapStopStep;
431
432 //double BoxLength[NDIM*NDIM];
433
434 double ECut;
435 int MaxLevel;
436 int RiemannTensor;
437 int LevRFactor;
438 int RiemannLevel;
439 int Lev0Factor;
440 int RTActualUse;
441 int AddPsis;
442
443 double RCut;
444 int StructOpt;
445 int IsAngstroem;
446 int RelativeCoord;
447 int MaxTypes;
448
449
450 int ParseForParameter(int verbose, ifstream *file, const char *name, int sequential, int const xth, int const yth, int type, void *value, int repetition, int critical);
451
452 public:
453 config();
454 ~config();
455
456 int TestSyntax(char *filename, periodentafel *periode, molecule *mol);
457 void Load(char *filename, periodentafel *periode, molecule *mol);
458 void LoadOld(char *filename, periodentafel *periode, molecule *mol);
459 void RetrieveConfigPathAndName(string filename);
460 bool Save(ofstream *file, periodentafel *periode, molecule *mol) const;
461 bool SaveMPQC(ofstream *file, molecule *mol) const;
462 void Edit(molecule *mol);
463 bool GetIsAngstroem() const;
464 char *GetDefaultPath() const;
465 void SetDefaultPath(const char *path);
466};
467
468#endif /*MOLECULES_HPP_*/
469
Note: See TracBrowser for help on using the repository browser.