ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/applications/staticProps/BondOrderParameter.cpp
(Generate patch)

Comparing branches/development/src/applications/staticProps/BondOrderParameter.cpp (file contents):
Revision 1600 by gezelter, Wed Aug 3 20:20:37 2011 UTC vs.
Revision 1767 by gezelter, Fri Jul 6 22:01:58 2012 UTC

# Line 36 | Line 36
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).                        
40 < *
39 > * [4] Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [4] , Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). *
41   *  Created by J. Daniel Gezelter on 09/26/06.
42   *  @author  J. Daniel Gezelter
43   *  @version $Id$
# Line 157 | Line 157 | namespace OpenMD {
157      RealType costheta;
158      RealType phi;
159      RealType r;
160    RealType dist;
160      std::map<std::pair<int,int>,ComplexType> q;
161      std::vector<RealType> q_l;
162      std::vector<RealType> q2;
# Line 170 | Line 169 | namespace OpenMD {
169      std::vector<ComplexType> W_hat;
170      int nBonds, Nbonds;
171      SphericalHarmonic sphericalHarmonic;
172 <    int i, j;
172 >    int i;
173  
174      DumpReader reader(info_, dumpFilename_);    
175      int nFrames = reader.getNFrames();
# Line 264 | Line 263 | namespace OpenMD {
263          for (int l = 0; l <= lMax_; l++) {
264            q2[l] = 0.0;
265            for (int m = -l; m <= l; m++){
266 <            q[std::make_pair(l,m)] /= (RealType)nBonds;            
266 >            q[std::make_pair(l,m)] /= (RealType)nBonds;
267              q2[l] += norm(q[std::make_pair(l,m)]);
268            }
269            q_l[l] = sqrt(q2[l] * 4.0 * NumericConstant::PI / (RealType)(2*l + 1));
# Line 284 | Line 283 | namespace OpenMD {
283              }
284            }
285            
286 <          w_hat[l] = w[l] / pow(q2[l], 1.5);
286 >          w_hat[l] = w[l] / pow(q2[l], RealType(1.5));
287          }
288  
289          collectHistogram(q_l, w_hat);
# Line 329 | Line 328 | namespace OpenMD {
328          }
329        }
330        
331 <      W_hat[l] = W[l] / pow(Q2[l], 1.5);
331 >      W_hat[l] = W[l] / pow(Q2[l], RealType(1.5));
332      }
333      
334      writeOrderParameter(Q, W_hat);    

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines