1 |
mmeineke |
803 |
#ifndef __PAIRCORRTYPE_H__ |
2 |
|
|
#define __PAIRCORRTYPE_H__ |
3 |
|
|
|
4 |
|
|
#include "CorrWrap.hpp" |
5 |
|
|
|
6 |
|
|
#define MAX_NAME_LENGTH 50 |
7 |
|
|
|
8 |
|
|
#define IS_A 0 |
9 |
|
|
#define IS_B 1 |
10 |
|
|
|
11 |
|
|
class atomName{ |
12 |
|
|
public: |
13 |
mmeineke |
810 |
char name[MAX_NAME_LENGTH]; |
14 |
mmeineke |
803 |
}; |
15 |
|
|
|
16 |
|
|
class PairCorrType { |
17 |
|
|
|
18 |
|
|
public: |
19 |
|
|
|
20 |
|
|
PairCorrType( char* key1, char* key2, int theNatoms, int theNbins ); |
21 |
|
|
virtual ~PairCorrType(); |
22 |
|
|
|
23 |
|
|
|
24 |
|
|
bool matchI( int i ); |
25 |
|
|
bool matchJ( int j ); |
26 |
|
|
|
27 |
|
|
void initCorr( double theLengthScale, atomName* theNames ); |
28 |
|
|
|
29 |
|
|
void setFrameVolume( double theVolume ); |
30 |
|
|
|
31 |
mmeineke |
810 |
virtual void correlate( double Rij[3], double dist, |
32 |
|
|
double uHatI[3], double uHatJ[3] ) = 0; |
33 |
mmeineke |
803 |
|
34 |
|
|
virtual void accumulateFrame( void ) = 0; |
35 |
|
|
|
36 |
|
|
virtual void writeCorr( char* outPrefix ) = 0; |
37 |
|
|
|
38 |
|
|
virtual void getCorr( CorrWrap* myCorrWrap ) = 0; |
39 |
|
|
|
40 |
|
|
protected: |
41 |
|
|
|
42 |
|
|
int nBins; |
43 |
|
|
|
44 |
|
|
int nAtoms; |
45 |
|
|
int nAtoms1; |
46 |
|
|
int nAtoms2; |
47 |
|
|
|
48 |
|
|
bool isSelfSelf; |
49 |
|
|
|
50 |
|
|
double lengthScale; |
51 |
|
|
double volume; |
52 |
|
|
double pairDensity; |
53 |
|
|
double pairConstant; |
54 |
mmeineke |
810 |
double delR; |
55 |
mmeineke |
803 |
|
56 |
|
|
int identI; |
57 |
|
|
|
58 |
|
|
bool* isAtom1; |
59 |
|
|
bool* isAtom2; |
60 |
|
|
bool* jArray; |
61 |
|
|
|
62 |
|
|
bool correlateMe; |
63 |
|
|
bool isInitialized; |
64 |
|
|
|
65 |
|
|
char atom1[MAX_NAME_LENGTH]; |
66 |
|
|
char atom2[MAX_NAME_LENGTH]; |
67 |
|
|
|
68 |
|
|
char corrType[MAX_NAME_LENGTH]; |
69 |
|
|
}; |
70 |
|
|
|
71 |
|
|
|
72 |
|
|
class GofR : public PairCorrType{ |
73 |
|
|
|
74 |
mmeineke |
810 |
public: |
75 |
|
|
GofR( char* key1, char* key2, int theNatoms, int theNbins ); |
76 |
mmeineke |
803 |
virtual ~GofR(); |
77 |
|
|
|
78 |
mmeineke |
810 |
virtual void correlate( double Rij[3], double dist, |
79 |
|
|
double uHatI[3], double uHatJ[3] ); |
80 |
mmeineke |
803 |
|
81 |
|
|
virtual void accumulateFrame( void ); |
82 |
|
|
|
83 |
|
|
virtual void writeCorr( char* outPrefix ); |
84 |
|
|
|
85 |
mmeineke |
810 |
virtual void getCorr( CorrWrap* myCorrWrap ){} |
86 |
|
|
|
87 |
mmeineke |
803 |
protected: |
88 |
|
|
|
89 |
|
|
int *currHist; |
90 |
|
|
double *currGofR; |
91 |
|
|
double *avgGofR; |
92 |
|
|
|
93 |
|
|
int nFrames; |
94 |
|
|
|
95 |
|
|
|
96 |
|
|
}; |
97 |
|
|
|
98 |
mmeineke |
811 |
class GofRtheta : public PairCorrType{ |
99 |
|
|
|
100 |
|
|
public: |
101 |
|
|
GofRtheta( char* key1, char* key2, int theNatoms, int theNbins ); |
102 |
|
|
virtual ~GofRtheta(); |
103 |
|
|
|
104 |
|
|
virtual void correlate( double Rij[3], double dist, |
105 |
|
|
double uHatI[3], double uHatJ[3] ); |
106 |
|
|
|
107 |
|
|
virtual void accumulateFrame( void ); |
108 |
|
|
|
109 |
|
|
virtual void writeCorr( char* outPrefix ); |
110 |
|
|
|
111 |
|
|
virtual void getCorr( CorrWrap* myCorrWrap ){} |
112 |
|
|
|
113 |
|
|
protected: |
114 |
|
|
|
115 |
mmeineke |
873 |
int **currCosHist; |
116 |
|
|
double **currGofRtheta; |
117 |
|
|
double **avgGofRtheta; |
118 |
mmeineke |
811 |
|
119 |
|
|
int nFrames; |
120 |
|
|
|
121 |
|
|
|
122 |
|
|
}; |
123 |
|
|
|
124 |
mmeineke |
879 |
class GofRomega : public PairCorrType{ |
125 |
|
|
|
126 |
|
|
public: |
127 |
|
|
GofRomega( char* key1, char* key2, int theNatoms, int theNbins ); |
128 |
|
|
virtual ~GofRomega(); |
129 |
|
|
|
130 |
|
|
virtual void correlate( double Rij[3], double dist, |
131 |
|
|
double uHatI[3], double uHatJ[3] ); |
132 |
|
|
|
133 |
|
|
virtual void accumulateFrame( void ); |
134 |
|
|
|
135 |
|
|
virtual void writeCorr( char* outPrefix ); |
136 |
|
|
|
137 |
|
|
virtual void getCorr( CorrWrap* myCorrWrap ){} |
138 |
|
|
|
139 |
|
|
protected: |
140 |
|
|
|
141 |
|
|
int **currCosHist; |
142 |
|
|
double **currGofRomega; |
143 |
|
|
double **avgGofRomega; |
144 |
|
|
|
145 |
|
|
int nFrames; |
146 |
|
|
|
147 |
|
|
|
148 |
|
|
}; |
149 |
|
|
|
150 |
mmeineke |
803 |
#endif // __PAIRCORRTYPE_H__ |