source: molecuilder/src/molecules.hpp@ b86de7

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