File tree Expand file tree Collapse file tree 8 files changed +88
-1
lines changed Expand file tree Collapse file tree 8 files changed +88
-1
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef ACCEPTANCETEST
2
2
#define ACCEPTANCETEST
3
3
4
+ /*
5
+ Acceptance test for basinhopping step.
6
+ */
7
+
4
8
class AcceptanceTest
5
9
{
6
10
protected:
Original file line number Diff line number Diff line change 7
7
#include " acceptanceTest.h"
8
8
#include " storage.h"
9
9
10
+ /*
11
+ This class implements monte-carlo basin hopping and stores unique local minima.
12
+
13
+ Implementations can be found in "basinhopping.cc".
14
+
15
+ Parameters
16
+ ----------
17
+
18
+ const structure _initialCoordinates :
19
+ saves coordinates of initial structure
20
+ structure _currentStep :
21
+ saves coordinates of current step
22
+ structure _previousStep :
23
+ saves coordinates of previous step
24
+ const int _size :
25
+ equal to the number of atoms in the initialising structure
26
+ const int _nsteps :
27
+ maximum number of basinhopping steps
28
+ std::shared_ptr<AcceptanceTest> _accept :
29
+ acceptance test. See "acceptanceTest.h".
30
+ T _uniqueStructures :
31
+ storage for unique structures. See "storage.h".
32
+ bool _accepted :
33
+ true if Monte-Carlo step was accepted, false if otherwise.
34
+ unsigned int _iteration :
35
+ current number of iterations.
36
+ unsigned int _naccept :
37
+ number of accepted configurations (structures).
38
+ unsigned int _nattempts :
39
+ number of times the stepsize was attempted to be updated.
40
+ unsigned int _nsame :
41
+ number of times the same structure has been found.
42
+ int _interval :
43
+ number of steps that defines how often temperature and stepsize should be adjusted.
44
+ double _stepScale :
45
+ scaling parameter for the stepsize. dynamically adjusted.
46
+ */
47
+
10
48
template <typename T>
11
49
class BasinHopping
12
50
{
Original file line number Diff line number Diff line change 7
7
#include " structure.h"
8
8
#include " parameter.h"
9
9
10
+ /*
11
+ Functions concerning input and output.
12
+
13
+ Implementations can be found in "iop.cc".
14
+ */
10
15
11
16
void xyzout (structure &outputStructure, const std::string &name = " structure.xyz" );
12
17
void xyzoutall (std::vector<structure> &outputStructures, const std::string &name = " all.xyz" );
Original file line number Diff line number Diff line change 4
4
#include < vector>
5
5
#include " geometry.h"
6
6
7
+ /*
8
+ Functions for diagonalisations.
9
+
10
+ Implementations can be found in "dlib-lina.cc".
11
+ */
12
+
7
13
std::vector<double > diag (std::vector< std::vector<double > > &matrix);
8
14
std::vector<std::pair<double , std::vector<double > > > diagv (std::vector< std::vector<double > > &matrix);
9
15
matrix3d m3d_diagv (matrix3d &matrix);
Original file line number Diff line number Diff line change 4
4
#include < string>
5
5
#include < map>
6
6
7
+ /*
8
+ Simple class to store parameters.
9
+ */
10
+
7
11
template <typename T> class parameter
8
12
{
9
13
Original file line number Diff line number Diff line change 7
7
#include < dlib/algs.h>
8
8
9
9
/*
10
- This class implements a slightly modified stop strategy for the dlib mnimiser.
10
+ This class implements a slightly modified stop strategy for the dlib mnimiser.
11
11
*/
12
12
13
13
namespace dlib {
Original file line number Diff line number Diff line change 3
3
4
4
#include < ctime>
5
5
6
+ /*
7
+ Simple class to calculate program timings.
8
+
9
+ Usage
10
+ -----
11
+
12
+ * call the constructor at the start of the function you want to time
13
+
14
+ * to get the current runtime between timing()-calls call timing()
15
+
16
+ * The total runtime can be accessed by calling total_timing()
17
+
18
+ */
6
19
7
20
// creates object that can keep track of time in program
8
21
class timer
Original file line number Diff line number Diff line change 3
3
#include " structure.h"
4
4
#include " globals.h"
5
5
6
+ /*
7
+ This class wraps a potential and removes the gradient in one direction.
8
+
9
+ Implementations can be found in "transversePotential.cc".
10
+
11
+ Parameters
12
+ ----------
13
+
14
+ pairPotential* _potential :
15
+ potential object. "See potential.h". Should be passed as a shared_ptr.
16
+ column_vector _vector :
17
+ direction to be removed from the gradient
18
+ double _eval :
19
+ if _vector corresponds to an eigenvector of the hessian matrix, this can be
20
+ used to track store the eigenvalue.
21
+ */
22
+
6
23
class TransversePotential
7
24
{
8
25
private:
You can’t perform that action at this time.
0 commit comments