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

Comparing trunk/src/applications/staticProps/BondAngleDistribution.cpp (file contents):
Revision 1879 by gezelter, Sun Jun 16 15:15:42 2013 UTC vs.
Revision 2071 by gezelter, Sat Mar 7 21:41:51 2015 UTC

# Line 57 | Line 57 | namespace OpenMD {
57                                                 const string& filename,
58                                                 const string& sele,
59                                                 double rCut, int nbins)
60 <  : StaticAnalyser(info, filename), selectionScript_(sele),  evaluator_(info),
61 <    seleMan_(info) {
60 >    : StaticAnalyser(info, filename), selectionScript_(sele), seleMan_(info),
61 >      evaluator_(info) {
62      
63      setOutputName(getPrefix(filename) + ".bad");
64      
# Line 72 | Line 72 | namespace OpenMD {
72      rCut_ = rCut;
73      nBins_ = nbins;
74  
75
75      // Theta can take values from 0 to 180    
76 +
77      deltaTheta_ = (180.0) / nBins_;
78      histogram_.resize(nBins_);
79    }
# Line 174 | Line 174 | namespace OpenMD {
174                Vector3d vec2 = bondvec[j];
175                
176                vec2.normalize();
177 <            
177 >              
178                RealType theta = acos(dot(vec1,vec2))*180.0/NumericConstant::PI;
179              
179                
180 +              
181                if (theta > 180.0){
182                  theta = 360.0 - theta;
183                }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines