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 ago) by mmeineke
File size: 495 byte(s)
Log Message:
added more work on getting gofR working.

File Contents

# User Rev Content
1 mmeineke 756 #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 mmeineke 758 int i;
11 mmeineke 756
12     strcpy( corrType, "GofR" );
13    
14 mmeineke 758 for(i=0;i<N_BINS;i++){
15     currHist[i] = 0;
16     currGofR[i] = 0.0;
17     avgGofR[i] = 0.0;
18     }
19    
20 mmeineke 756 }
21    
22    
23 mmeineke 758
24 mmeineke 756 void GofR::correlate( double[3] Rij, double dist,
25     double[3] uHatI, double[3] uHatJ ){
26 mmeineke 758 int bin;
27 mmeineke 756
28 mmeineke 758 bin = (int)( dist / delR );
29     if( bin < N_BINS )currHist[bin] += 2;
30 mmeineke 756 }