-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSASATypes.h
executable file
·62 lines (53 loc) · 1.37 KB
/
SASATypes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Mark Lewis 20-10-11
#include <list>
#include <Eigen/Core>
pi = 3.141569 ;
struct geometry{
int * nTrials ;
double * probeRadius ;
list<Vector3d> * xyz ;
list<Vector3d> * abc ;
list<double> * Radii ;
Matrix3d * ortho_to_none ;
Matrix3d * non_to_ortho ;
Vector3d * basisLengths ;
Vector3d * basisAngles ;};
class structSetup
{
private:
//int geometrySetup() ;
public:
structSetup() ;
struct geometry geometrySetup() ;
};
#include <Random.h>
structSetup::structSetup(){} ;
int structSetup::geometrySetup(struct geometry * system)
{
Random rndm ;
int nTrials = 5 ;
double probeRadius = 1.2 ;
list<Vector3d> xyzPositions ;
list<Vector3d> abcPositions ;
list<double> Radii ;
Matrix3d ortho_to_non ;
Matrix3d non_to_ortho ;
Vector3d basisLengths ;
Vector3d basisAngles ;
list<Vector3d>::iterator xyz, abc ;
list<double>::iterator R ;
xyz = xyzPositions.begin() ;
abc = abcPositions.begin() ;
R = Radii.begin() ;
for(int i = 0 ; i < 3 ; ++i, xyz++, abc++, R++){
basisLength[i] = 1 ;
basisAngle[i] = pi/2 ;
for(int j = 0 ; j <3 ; ++j){
*xyz[j] = rndm.Normal() ;
*R = rndm.Normal() + 1 ;
if(i = j) ortho_to_non[i][j] = 1 ; non_to_ortho[i][j] = 1 ;
else ortho_to_non[i][j] = 0 ; non_to_ortho[i][j] = 0 ;
}
*abc = ortho_to_non*(*xyz) ;
}
}