source: src/molecules.hpp@ 795a54

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 795a54 was 85bac0, checked in by Frederik Heber <heber@…>, 17 years ago

Implemented molecule::LinearInterpolationBetweenConfiguration().

command line option "-L" with start and end step performs a linear interpolation between two atomic configurations. So far the mapping from initial atom labels to final labels is not yet finished, it is injective, but not yet minimal.

  • Property mode set to 100644
File size: 18.0 KB
RevLine 
[14de469]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
[d52ea1b]12#include <gsl/gsl_eigen.h>
[14de469]13#include <gsl/gsl_heapsort.h>
[6e9353]14#include <gsl/gsl_linalg.h>
15#include <gsl/gsl_matrix.h>
16#include <gsl/gsl_multimin.h>
17#include <gsl/gsl_vector.h>
[14de469]18
19// STL headers
20#include <map>
21#include <set>
22#include <deque>
[d7e30c]23#include <list>
[5e0d1f]24#include <vector>
[14de469]25
26#include "helpers.hpp"
[362b0e]27#include "parser.hpp"
[68cb0f]28#include "periodentafel.hpp"
[6d35e4]29#include "stackclass.hpp"
[342f33f]30#include "vector.hpp"
[14de469]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>
[5de3c9]43#define NumberValuePair pair<int, double>
[49de64]44#define Graph map <KeySet, NumberValuePair, KeyCompare >
45#define GraphPair pair <KeySet, NumberValuePair >
[14de469]46#define KeySetTestPair pair<KeySet::iterator, bool>
47#define GraphTestPair pair<Graph::iterator, bool>
48
[ed060e]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
[14de469]74struct KeyCompare
75{
76 bool operator() (const KeySet SubgraphA, const KeySet SubgraphB) const;
77};
[6d35e4]78
[d7e30c]79struct Trajectory
80{
[5e0d1f]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
[d7e30c]85};
86
[14de469]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
[6d35e4]92
[14de469]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 {
[e9b8bb]104 Vector **vectors;
[14de469]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:
[e9b8bb]125 Vector x; //!< coordinate array of atom, giving position within cell
126 Vector v; //!< velocity array of atom
[14de469]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
[943d02]133 int FixedIon; //!< config variable that states whether forces act on the ion or not
[14de469]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.
[683914]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()
[db942e]141 unsigned char AdaptiveOrder; //!< current present bond order at site (0 means "not set")
[362b0e]142 bool MaxOrder; //!< whether this atom as a root in fragmentation still creates more fragments on higher orders or not
[14de469]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
[5e0d1f]210 map<atom *, struct Trajectory> Trajectories; //!< contains old trajectory points
211 int MDSteps; //!< The number of MD steps in Trajectories
[14de469]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;
[342f33f]240 atom * AskAtom(string text);
[14de469]241
242 /// Count and change present atoms' coordination.
243 void CountAtoms(ofstream *out);
244 void CountElements();
245 void CalculateOrbitals(class config &configuration);
[e9b8bb]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);
[14de469]253 void Scale(double **factor);
[e9b8bb]254 void DetermineCenter(Vector &center);
255 Vector * DetermineCenterOfGravity(ofstream *out);
[a6b7fb]256 Vector * DetermineCenterOfAll(ofstream *out);
[e9b8bb]257 void SetBoxDimension(Vector *dim);
[14de469]258 double * ReturnFullMatrixforSymmetric(double *cell_size);
259 void ScanForPeriodicCorrection(ofstream *out);
[d52ea1b]260 void PrincipalAxisSystem(ofstream *out, bool DoRotate);
261 double VolumeOfConvexEnvelope(ofstream *out, bool IsAngstroem);
[6e9353]262 bool VerletForceIntegration(ofstream *out, char *file, double delta_t, bool IsAngstroem, int DoConstrained);
[a1fe77]263 double ConstrainedPotential(ofstream *out, atom **permutation, int start, int end, double *constants, bool IsAngstroem);
[85bac0]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);
[d52ea1b]267
[e9b8bb]268 bool CheckBounds(const Vector *x) const;
[d7e30c]269 void GetAlignvector(struct lsq_params * par) const;
[14de469]270
271 /// Initialising routines in fragmentation
[a251a3]272 void CreateAdjacencyList(ofstream *out, double bonddistance, bool IsAngstroem);
[14de469]273 void CreateListOfBondsPerAtom(ofstream *out);
274
275 // Graph analysis
[d52ea1b]276 MoleculeLeafClass * DepthFirstSearchAnalysis(ofstream *out, int *&MinimumRingSize);
[fc850d]277 void CyclicStructureAnalysis(ofstream *out, class StackClass<bond *> *BackEdgeStack, int *&MinimumRingSize);
[14de469]278 bond * FindNextUnused(atom *vertex);
279 void SetNextComponentNumber(atom *vertex, int nr);
280 void InitComponentNumbers();
281 void OutputComponentNumber(ofstream *out, atom *vertex);
282 void ResetAllBondsToUnused();
283 void ResetAllAtomNumbers();
284 int CountCyclicBonds(ofstream *out);
[4aa03a]285 bool CheckForConnectedSubgraph(ofstream *out, KeySet *Fragment);
[342f33f]286 string GetColor(enum Shading color);
[14de469]287
288 molecule *CopyMolecule();
289
290 /// Fragment molecule by two different approaches:
[362b0e]291 int FragmentMolecule(ofstream *out, int Order, config *configuration);
[958457]292 bool CheckOrderAtSite(ofstream *out, bool *AtomMask, Graph *GlobalKeySetList, int Order, int *MinimumRingSize, char *path = NULL);
[db942e]293 bool StoreAdjacencyToFile(ofstream *out, char *path);
294 bool CheckAdjacencyFileAgainstMolecule(ofstream *out, char *path, atom **ListOfAtoms);
295 bool ParseOrderAtSiteFromFile(ofstream *out, char *path);
296 bool StoreOrderAtSiteFile(ofstream *out, char *path);
[d52ea1b]297 bool ParseKeySetFile(ofstream *out, char *filename, Graph *&FragmentList);
[2459b1]298 bool StoreKeySetFile(ofstream *out, Graph &KeySetList, char *path);
299 bool StoreForcesFile(ofstream *out, MoleculeListClass *BondFragments, char *path, int *SortIndex);
[bf46da]300 bool CreateMappingLabelsToConfigSequence(ofstream *out, int *&SortIndex);
[b0a0c3]301 bool ScanBufferIntoKeySet(ofstream *out, char *buffer, KeySet &CurrentSet);
[db942e]302 void BreadthFirstSearchAdd(ofstream *out, molecule *Mol, atom **&AddedAtomList, bond **&AddedBondList, atom *Root, bond *Bond, int BondOrder, bool IsAngstroem);
[14de469]303 /// -# BOSSANOVA
[fc850d]304 void FragmentBOSSANOVA(ofstream *out, Graph *&FragmentList, KeyStack &RootStack, int *MinimumRingSize);
[2459b1]305 int PowerSetGenerator(ofstream *out, int Order, struct UniqueFragments &FragmentSearch, KeySet RestrictedKeySet);
[14de469]306 bool BuildInducedSubgraph(ofstream *out, const molecule *Father);
[183f35]307 molecule * StoreFragmentFromKeySet(ofstream *out, KeySet &Leaflet, bool IsAngstroem);
[14de469]308 void SPFragmentGenerator(ofstream *out, struct UniqueFragments *FragmentSearch, int RootDistance, bond **BondsSet, int SetDimension, int SubOrder);
309 int LookForRemovalCandidate(ofstream *&out, KeySet *&Leaf, int *&ShortestPathList);
310 int GuesstimateFragmentCount(ofstream *out, int order);
311
312 // Recognize doubly appearing molecules in a list of them
313 int * IsEqualToWithinThreshold(ofstream *out, molecule *OtherMolecule, double threshold);
314 int * GetFatherSonAtomicMap(ofstream *out, molecule *OtherMolecule);
315
316 // Output routines.
317 bool Output(ofstream *out);
[5e0d1f]318 bool OutputTrajectories(ofstream *out);
[da5355]319 void OutputListOfBonds(ofstream *out) const;
[14de469]320 bool OutputXYZ(ofstream *out) const;
[362b0e]321 bool OutputTrajectoriesXYZ(ofstream *out);
[14de469]322 bool Checkout(ofstream *out) const;
[698b04]323 bool OutputTemperatureFromTrajectories(ofstream *out, int startstep, int endstep, ofstream *output);
[14de469]324
325 private:
326 int last_atom; //!< number given to last atom
327};
328
329/** A list of \a molecule classes.
330 */
331class MoleculeListClass {
332 public:
333 molecule **ListOfMolecules; //!< pointer list of fragment molecules to check for equality
334 int NumberOfMolecules; //!< Number of entries in \a **FragmentList and of to be returned one.
335 int NumberOfTopAtoms; //!< Number of atoms in the molecule from which all fragments originate
336
337 MoleculeListClass();
338 MoleculeListClass(int Num, int NumAtoms);
339 ~MoleculeListClass();
340
341 /// Output configs.
[390248]342 bool AddHydrogenCorrection(ofstream *out, char *path);
[2459b1]343 bool StoreForcesFile(ofstream *out, char *path, int *SortIndex);
[85bac0]344 bool OutputConfigForListOfFragments(ofstream *out, const char *fragmentprefix, config *configuration, int *SortIndex, bool DoPeriodic, bool DoCentering);
[14de469]345 void Output(ofstream *out);
346
347 private:
348};
349
350
351/** A leaf for a tree of \a molecule class
352 * Wraps molecules in a tree structure
353 */
354class MoleculeLeafClass {
355 public:
356 molecule *Leaf; //!< molecule of this leaf
357 //MoleculeLeafClass *UpLeaf; //!< Leaf one level up
358 //MoleculeLeafClass *DownLeaf; //!< First leaf one level down
359 MoleculeLeafClass *previous; //!< Previous leaf on this level
360 MoleculeLeafClass *next; //!< Next leaf on this level
361
362 //MoleculeLeafClass(MoleculeLeafClass *Up, MoleculeLeafClass *Previous);
363 MoleculeLeafClass(MoleculeLeafClass *PreviousLeaf);
364 ~MoleculeLeafClass();
365
366 bool AddLeaf(molecule *ptr, MoleculeLeafClass *Previous);
[9fcf47]367 bool FillBondStructureFromReference(ofstream *out, molecule *reference, int &FragmentCounter, atom ***&ListOfLocalAtoms, bool FreeList = false);
[fc850d]368 bool FillRootStackForSubgraphs(ofstream *out, KeyStack *&RootStack, bool *AtomMask, int &FragmentCounter);
[da5355]369 bool AssignKeySetsToFragment(ofstream *out, molecule *reference, Graph *KeySetList, atom ***&ListOfLocalAtoms, Graph **&FragmentList, int &FragmentCounter, bool FreeList = false);
370 bool FillListOfLocalAtoms(ofstream *out, atom ***&ListOfLocalAtoms, int &FragmentCounter, int GlobalAtomCount, bool &FreeList);
[87f6c9]371 void TranslateIndicesToGlobalIDs(ofstream *out, Graph **FragmentList, int &FragmentCounter, int &TotalNumberOfKeySets, Graph &TotalGraph);
[da5355]372 int Count() const;
[14de469]373};
374
375/** The config file.
376 * The class contains all parameters that control a dft run also functions to load and save.
377 */
378class config {
379 public:
380 int PsiType;
381 int MaxPsiDouble;
382 int PsiMaxNoUp;
383 int PsiMaxNoDown;
384 int MaxMinStopStep;
385 int InitMaxMinStopStep;
386 int ProcPEGamma;
387 int ProcPEPsi;
[5b15ab]388 char *configpath;
[b5ecd9]389 char *configname;
[49de64]390 bool FastParsing;
[362b0e]391 double Deltat;
[6e9353]392 int DoConstrainedMD;
[85bac0]393 int MaxOuterStep;
[14de469]394
395 private:
396 char *mainname;
397 char *defaultpath;
398 char *pseudopotpath;
399
400 int DoOutVis;
401 int DoOutMes;
402 int DoOutNICS;
403 int DoOutOrbitals;
404 int DoOutCurrent;
405 int DoFullCurrent;
406 int DoPerturbation;
[18913c]407 int DoWannier;
[14de469]408 int CommonWannier;
409 double SawtoothStart;
410 int VectorPlane;
411 double VectorCut;
412 int UseAddGramSch;
413 int Seed;
414
415 int OutVisStep;
416 int OutSrcStep;
417 double TargetTemp;
418 int ScaleTempStep;
419 int MaxPsiStep;
420 double EpsWannier;
421
422 int MaxMinStep;
423 double RelEpsTotalEnergy;
424 double RelEpsKineticEnergy;
425 int MaxMinGapStopStep;
426 int MaxInitMinStep;
427 double InitRelEpsTotalEnergy;
428 double InitRelEpsKineticEnergy;
429 int InitMaxMinGapStopStep;
430
431 //double BoxLength[NDIM*NDIM];
432
433 double ECut;
434 int MaxLevel;
435 int RiemannTensor;
436 int LevRFactor;
437 int RiemannLevel;
438 int Lev0Factor;
439 int RTActualUse;
440 int AddPsis;
441
442 double RCut;
443 int StructOpt;
444 int IsAngstroem;
445 int RelativeCoord;
446 int MaxTypes;
447
448
449 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);
450
451 public:
452 config();
453 ~config();
454
[5b15ab]455 int TestSyntax(char *filename, periodentafel *periode, molecule *mol);
456 void Load(char *filename, periodentafel *periode, molecule *mol);
457 void LoadOld(char *filename, periodentafel *periode, molecule *mol);
[7f3b9d]458 void RetrieveConfigPathAndName(string filename);
[14de469]459 bool Save(ofstream *file, periodentafel *periode, molecule *mol) const;
[c1fc22]460 bool SaveMPQC(ofstream *file, molecule *mol) const;
[14de469]461 void Edit(molecule *mol);
462 bool GetIsAngstroem() const;
463 char *GetDefaultPath() const;
[342f33f]464 void SetDefaultPath(const char *path);
[14de469]465};
466
467#endif /*MOLECULES_HPP_*/
468
Note: See TracBrowser for help on using the repository browser.