ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/tags/export/OOPSE-1.0/staticProps/PairCorrType.hpp
Revision: 1335
Committed: Fri Jul 16 18:58:04 2004 UTC (20 years, 1 month ago)
File size: 2614 byte(s)
Log Message:
This commit was manufactured by cvs2svn to create tag 'export'.

File Contents

# User Rev Content
1 gezelter 1334 #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 **currCosHist;
116     double **currGofRtheta;
117     double **avgGofRtheta;
118    
119     int nFrames;
120    
121    
122     };
123    
124     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     #endif // __PAIRCORRTYPE_H__