37 |
|
* arising out of the use of or inability to use software, even if the |
38 |
|
* University of Notre Dame has been advised of the possibility of |
39 |
|
* such damages. |
40 |
+ |
* |
41 |
+ |
* BondOrderParameter.cpp |
42 |
+ |
* OOPSE-4 |
43 |
+ |
* |
44 |
+ |
* Created by J. Daniel Gezelter on 09/26/06. |
45 |
+ |
* @author J. Daniel Gezelter |
46 |
+ |
* @version $Id: BondOrderParameter.cpp,v 1.19 2006-10-18 21:58:47 gezelter Exp $ |
47 |
+ |
* |
48 |
|
*/ |
41 |
– |
|
42 |
– |
|
43 |
– |
/* Creates orientational bond order parameters as outlined by |
44 |
– |
* Bond-orientaional order in liquids and glasses, Steinhart,Nelson,Ronchetti |
45 |
– |
* Phys Rev B, 28,784,1983 |
46 |
– |
* |
47 |
– |
*/ |
49 |
|
|
50 |
|
#include "applications/staticProps/BondOrderParameter.hpp" |
51 |
|
#include "utils/simError.h" |
119 |
|
} |
120 |
|
} |
121 |
|
} |
122 |
+ |
delete [] THRCOF; |
123 |
+ |
THRCOF = NULL; |
124 |
|
} |
125 |
|
|
126 |
|
BondOrderParameter::~BondOrderParameter() { |
127 |
|
Q_histogram_.clear(); |
128 |
|
W_histogram_.clear(); |
129 |
+ |
for (int l = 0; l <= lMax_; l++) { |
130 |
+ |
for (int m = -l; m <= l; m++) { |
131 |
+ |
w3j[std::make_pair(l,m)].clear(); |
132 |
+ |
} |
133 |
+ |
} |
134 |
+ |
w3j.clear(); |
135 |
+ |
m2Min.clear(); |
136 |
+ |
m2Max.clear(); |
137 |
|
} |
138 |
< |
|
138 |
> |
|
139 |
|
void BondOrderParameter::initalizeHistogram() { |
140 |
|
for (int bin = 0; bin < nBins_; bin++) { |
141 |
|
for (int l = 0; l <= lMax_; l++) { |
230 |
|
if (atom->getGlobalIndex() != myIndex) { |
231 |
|
|
232 |
|
vec = sd->getPos() - atom->getPos(); |
233 |
< |
currentSnapshot_->wrapVector(vec); |
233 |
> |
|
234 |
> |
if (usePeriodicBoundaryConditions_) |
235 |
> |
currentSnapshot_->wrapVector(vec); |
236 |
|
|
237 |
|
// Calculate "bonds" and build Q_lm(r) where |
238 |
|
// Q_lm = Y_lm(theta(r),phi(r)) |
398 |
|
RealType Qval = MinQ_ + (i + 0.5) * deltaQ_; |
399 |
|
osq << Qval; |
400 |
|
for (int l = 0; l <= lMax_; l++) { |
401 |
< |
osq << "\t" << (RealType)Q_histogram_[std::make_pair(i,l)] / (RealType)Qcount_[l]; |
401 |
> |
osq << "\t" << (RealType)Q_histogram_[std::make_pair(i,l)] / |
402 |
> |
(RealType)Qcount_[l]; |
403 |
|
} |
404 |
|
osq << "\n"; |
405 |
|
} |
427 |
|
RealType Wval = MinW_ + (i + 0.5) * deltaW_; |
428 |
|
osw << Wval; |
429 |
|
for (int l = 0; l <= lMax_; l++) { |
430 |
< |
osw << "\t" << (RealType)W_histogram_[std::make_pair(i,l)] / (RealType)Wcount_[l]; |
430 |
> |
osw << "\t" << (RealType)W_histogram_[std::make_pair(i,l)] / |
431 |
> |
(RealType)Wcount_[l]; |
432 |
|
} |
433 |
|
osw << "\n"; |
434 |
|
} |