ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/props/GofR.cpp
Revision: 758
Committed: Wed Sep 10 21:28:33 2003 UTC (21 years, 7 months ago) by mmeineke
File size: 495 byte(s)
Log Message:
added more work on getting gofR working.

File Contents

# Content
1 #include <cstring>
2 #include <cmath>
3
4 #include "PairCorrType.hpp"
5
6
7 GofR::GofR( char* key1, char* key2, int theNatoms ):
8 PairCorrType( key1, key2, theNatoms )
9 {
10 int i;
11
12 strcpy( corrType, "GofR" );
13
14 for(i=0;i<N_BINS;i++){
15 currHist[i] = 0;
16 currGofR[i] = 0.0;
17 avgGofR[i] = 0.0;
18 }
19
20 }
21
22
23
24 void GofR::correlate( double[3] Rij, double dist,
25 double[3] uHatI, double[3] uHatJ ){
26 int bin;
27
28 bin = (int)( dist / delR );
29 if( bin < N_BINS )currHist[bin] += 2;
30 }