| 46 |
|
|
| 47 |
|
namespace oopse { |
| 48 |
|
|
| 49 |
< |
GofR::GofR(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2) |
| 50 |
< |
: RadialDistrFunc(info, filename, sele1, sele2){ |
| 49 |
> |
GofR::GofR(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, double len, int nrbins) |
| 50 |
> |
: RadialDistrFunc(info, filename, sele1, sele2), len_(len), nRBins_(nrbins){ |
| 51 |
|
|
| 52 |
|
deltaR_ = len_ /nRBins_; |
| 53 |
|
|
| 94 |
|
|
| 95 |
|
Vector3d pos1 = sd1->getPos(); |
| 96 |
|
Vector3d pos2 = sd2->getPos(); |
| 97 |
< |
Vector3d r12 = pos1 - pos2; |
| 97 |
> |
Vector3d r12 = pos2 - pos1; |
| 98 |
|
currentSnapshot_->wrapVector(r12); |
| 99 |
|
|
| 100 |
|
double distance = r12.length(); |
| 120 |
|
|
| 121 |
|
} else { |
| 122 |
|
|
| 123 |
< |
|
| 123 |
> |
sprintf(painCave.errMsg, "GofR: unable to open %s\n", outputFilename_.c_str()); |
| 124 |
> |
painCave.isFatal = 1; |
| 125 |
> |
simError(); |
| 126 |
|
} |
| 127 |
|
|
| 128 |
|
rdfStream.close(); |