36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
#include <algorithm> |
79 |
|
} |
80 |
|
|
81 |
|
|
82 |
< |
void GofXyz::initalizeHistogram() { |
82 |
> |
void GofXyz::initializeHistogram() { |
83 |
|
//calculate the center of mass of the molecule of selected stuntdouble in selection1 |
84 |
|
|
85 |
|
if (!evaluator3_.isDynamic()) { |
101 |
|
StuntDouble* sd3; |
102 |
|
|
103 |
|
for (sd1 = seleMan1_.beginSelected(i), sd3 = seleMan3_.beginSelected(j); |
104 |
< |
sd1 != NULL, sd3 != NULL; |
104 |
> |
sd1 != NULL || sd3 != NULL; |
105 |
|
sd1 = seleMan1_.nextSelected(i), sd3 = seleMan3_.nextSelected(j)) { |
106 |
|
|
107 |
|
Vector3d r3 =sd3->getPos(); |
140 |
|
|
141 |
|
Vector3d newR12 = i->second * r12; |
142 |
|
// x, y and z's possible values range -halfLen_ to halfLen_ |
143 |
< |
int xbin = (newR12.x()+ halfLen_) / deltaR_; |
143 |
> |
int xbin = (newR12.x() + halfLen_) / deltaR_; |
144 |
|
int ybin = (newR12.y() + halfLen_) / deltaR_; |
145 |
|
int zbin = (newR12.z() + halfLen_) / deltaR_; |
146 |
|
|
159 |
|
//rdfStream << "#selection1: (" << selectionScript1_ << ")\t"; |
160 |
|
//rdfStream << "selection2: (" << selectionScript2_ << ")\n"; |
161 |
|
//rdfStream << "#nRBins = " << nRBins_ << "\t maxLen = " << len_ << "deltaR = " << deltaR_ <<"\n"; |
162 |
< |
for (int i = 0; i < histogram_.size(); ++i) { |
163 |
< |
|
164 |
< |
for(int j = 0; j < histogram_[i].size(); ++j) { |
165 |
< |
|
166 |
< |
for(int k = 0;k < histogram_[i][j].size(); ++k) { |
166 |
< |
rdfStream.write(reinterpret_cast<char *>(&histogram_[i][j][k] ), sizeof(histogram_[i][j][k] )); |
162 |
> |
for (unsigned int i = 0; i < histogram_.size(); ++i) { |
163 |
> |
for(unsigned int j = 0; j < histogram_[i].size(); ++j) { |
164 |
> |
for(unsigned int k = 0;k < histogram_[i][j].size(); ++k) { |
165 |
> |
rdfStream.write(reinterpret_cast<char *>(&histogram_[i][j][k] ), |
166 |
> |
sizeof(histogram_[i][j][k] )); |
167 |
|
} |
168 |
|
} |
169 |
|
} |