| 47 |
|
class GofR : public RadialDistrFunc { |
| 48 |
|
|
| 49 |
|
public: |
| 50 |
< |
GofR(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2. double len); |
| 50 |
> |
GofR(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2); |
| 51 |
|
|
| 52 |
+ |
|
| 53 |
+ |
void setNRBins(int nbins) { |
| 54 |
+ |
assert(nbins > 0); |
| 55 |
+ |
nRBins_ = nbins; |
| 56 |
+ |
deltaR_ = len_ / nRBins_; |
| 57 |
+ |
histogram_.resize(nRBins_); |
| 58 |
+ |
avgGofr_.resize(nRBins_); |
| 59 |
+ |
} |
| 60 |
+ |
|
| 61 |
+ |
int getNRBins() { |
| 62 |
+ |
return nRBins_; |
| 63 |
+ |
} |
| 64 |
+ |
|
| 65 |
|
private: |
| 66 |
|
|
| 67 |
|
virtual void preProcess(); |
| 70 |
|
virtual void processHistogram(); |
| 71 |
|
|
| 72 |
|
virtual void writeRdf(); |
| 73 |
+ |
|
| 74 |
+ |
double len_; |
| 75 |
+ |
int nRBins_; |
| 76 |
+ |
double deltaR_; |
| 77 |
|
|
| 78 |
|
std::vector<int> histogram_; |
| 79 |
|
std::vector<double> avgGofr_; |