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 |
|
|
char[MAX_NAME_LENGTH] name; |
14 |
|
|
}; |
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 |
|
|
virtual void correlate( double[3] Rij, double dist, |
32 |
|
|
double[3] uHatI, double[3] uHatJ ) = 0; |
33 |
|
|
|
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 |
|
|
|
55 |
|
|
int identI; |
56 |
|
|
|
57 |
|
|
bool* isAtom1; |
58 |
|
|
bool* isAtom2; |
59 |
|
|
bool* jArray; |
60 |
|
|
|
61 |
|
|
bool correlateMe; |
62 |
|
|
bool isInitialized; |
63 |
|
|
|
64 |
|
|
char atom1[MAX_NAME_LENGTH]; |
65 |
|
|
char atom2[MAX_NAME_LENGTH]; |
66 |
|
|
|
67 |
|
|
char corrType[MAX_NAME_LENGTH]; |
68 |
|
|
}; |
69 |
|
|
|
70 |
|
|
|
71 |
|
|
class GofR : public PairCorrType{ |
72 |
|
|
|
73 |
|
|
GofR( char* key1, char* key2, int theNatoms, intNbins ); |
74 |
|
|
virtual ~GofR(); |
75 |
|
|
|
76 |
|
|
virtual void correlate( double[3] Rij, double dist, |
77 |
|
|
double[3] uHatI, double[3] uHatJ ); |
78 |
|
|
|
79 |
|
|
virtual void accumulateFrame( void ); |
80 |
|
|
|
81 |
|
|
virtual void writeCorr( char* outPrefix ); |
82 |
|
|
|
83 |
|
|
protected: |
84 |
|
|
|
85 |
|
|
int *currHist; |
86 |
|
|
double *currGofR; |
87 |
|
|
double *avgGofR; |
88 |
|
|
|
89 |
|
|
int nFrames; |
90 |
|
|
|
91 |
|
|
|
92 |
|
|
}; |
93 |
|
|
|
94 |
|
|
#endif // __PAIRCORRTYPE_H__ |