Skip to content

Commit 172dea5

Browse files
committed
more documentation in header files
1 parent bf868ca commit 172dea5

File tree

8 files changed

+88
-1
lines changed

8 files changed

+88
-1
lines changed

acceptanceTest.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#ifndef ACCEPTANCETEST
22
#define ACCEPTANCETEST
33

4+
/*
5+
Acceptance test for basinhopping step.
6+
*/
7+
48
class AcceptanceTest
59
{
610
protected:

basinhopping.h

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,44 @@
77
#include "acceptanceTest.h"
88
#include "storage.h"
99

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+
1048
template <typename T>
1149
class BasinHopping
1250
{

iop.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
#include "structure.h"
88
#include "parameter.h"
99

10+
/*
11+
Functions concerning input and output.
12+
13+
Implementations can be found in "iop.cc".
14+
*/
1015

1116
void xyzout (structure &outputStructure, const std::string &name = "structure.xyz");
1217
void xyzoutall (std::vector<structure> &outputStructures, const std::string &name = "all.xyz");

lina.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
#include <vector>
55
#include "geometry.h"
66

7+
/*
8+
Functions for diagonalisations.
9+
10+
Implementations can be found in "dlib-lina.cc".
11+
*/
12+
713
std::vector<double> diag (std::vector< std::vector<double> > &matrix);
814
std::vector<std::pair<double, std::vector<double> > > diagv (std::vector< std::vector<double> > &matrix);
915
matrix3d m3d_diagv (matrix3d &matrix);

parameter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
#include <string>
55
#include <map>
66

7+
/*
8+
Simple class to store parameters.
9+
*/
10+
711
template <typename T> class parameter
812
{
913

stop_strategy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <dlib/algs.h>
88

99
/*
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.
1111
*/
1212

1313
namespace dlib {

timer.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,19 @@
33

44
#include <ctime>
55

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+
*/
619

720
//creates object that can keep track of time in program
821
class timer

transversePotential.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
#include "structure.h"
44
#include "globals.h"
55

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+
623
class TransversePotential
724
{
825
private:

0 commit comments

Comments
 (0)