ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/staticProps/PairCorrType.hpp
Revision: 811
Committed: Tue Oct 21 19:33:19 2003 UTC (20 years, 8 months ago) by mmeineke
File size: 2107 byte(s)
Log Message:
added useInitTime to the BASS syntax.
   * useInitTime = false: sets the origin time to 0.0 regardless of the time stamp in the .init file
   * default=> useInitTime = true;

File Contents

# Content
1 #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 name[MAX_NAME_LENGTH];
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 Rij[3], double dist,
32 double uHatI[3], double uHatJ[3] ) = 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 double delR;
55
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 public:
75 GofR( char* key1, char* key2, int theNatoms, int theNbins );
76 virtual ~GofR();
77
78 virtual void correlate( double Rij[3], double dist,
79 double uHatI[3], double uHatJ[3] );
80
81 virtual void accumulateFrame( void );
82
83 virtual void writeCorr( char* outPrefix );
84
85 virtual void getCorr( CorrWrap* myCorrWrap ){}
86
87 protected:
88
89 int *currHist;
90 double *currGofR;
91 double *avgGofR;
92
93 int nFrames;
94
95
96 };
97
98 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 int *currHist;
116 double *currGofR;
117 double *avgGofR;
118
119 int nFrames;
120
121
122 };
123
124 #endif // __PAIRCORRTYPE_H__