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

Comparing trunk/src/applications/staticProps/GofRAngle.hpp (file contents):
Revision 353 by tim, Wed Feb 16 19:36:30 2005 UTC vs.
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC

# Line 6 | Line 6
6   * redistribute this software in source and binary code form, provided
7   * that the following conditions are met:
8   *
9 < * 1. Acknowledgement of the program authors must be made in any
10 < *    publication of scientific results based in part on use of the
11 < *    program.  An acceptable form of acknowledgement is citation of
12 < *    the article in which the program was described (Matthew
13 < *    A. Meineke, Charles F. Vardeman II, Teng Lin, Christopher
14 < *    J. Fennell and J. Daniel Gezelter, "OOPSE: An Object-Oriented
15 < *    Parallel Simulation Engine for Molecular Dynamics,"
16 < *    J. Comput. Chem. 26, pp. 252-271 (2005))
17 < *
18 < * 2. Redistributions of source code must retain the above copyright
9 > * 1. Redistributions of source code must retain the above copyright
10   *    notice, this list of conditions and the following disclaimer.
11   *
12 < * 3. Redistributions in binary form must reproduce the above copyright
12 > * 2. Redistributions in binary form must reproduce the above copyright
13   *    notice, this list of conditions and the following disclaimer in the
14   *    documentation and/or other materials provided with the
15   *    distribution.
# Line 37 | Line 28
28   * arising out of the use of or inability to use software, even if the
29   * University of Notre Dame has been advised of the possibility of
30   * such damages.
31 + *
32 + * SUPPORT OPEN SCIENCE!  If you use OpenMD or its source code in your
33 + * research, please cite the appropriate papers when you publish your
34 + * work.  Good starting points are:
35 + *                                                                      
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   */
41   #ifndef APPLICATIONS_STATICPROPS_GOFRANGLE_HPP
42   #define APPLICATIONS_STATICPROPS_GOFRANGLE_HPP
43  
44   #include "applications/staticProps/RadialDistrFunc.hpp"
45 < namespace oopse {
45 > namespace OpenMD {
46  
47 < class GofRAngle : public RadialDistrFunc {
47 >  class GofRAngle : public RadialDistrFunc {
48      
49 <    public:
50 <        GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2);
49 >  public:
50 >    GofRAngle(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, RealType len, int nrbins, int nangleBins);
51  
52 <        void setNRBins(int nbins) {
53 <            assert(nbins > 0);
54 <            nRBins_ = nbins;
55 <            deltaR_ = len_ / nRBins_;
56 <            for (int i = 0 ; i < nRBins_; ++i) {
57 <                histogram_[i].resize(nAngleBins_);
58 <                avgGofr_[i].resize(nAngleBins_);
59 <            }            
60 <        }
52 >    int getNRBins() {
53 >      return nRBins_;
54 >    }
55  
56 <        int getNRBins() {
57 <            return nRBins_;
58 <        }
56 >    RealType getLength() {
57 >      return len_;
58 >    }
59  
60 <        void setLength(double len) {
67 <            len_ = len;
68 <            deltaR_ = len_ /nRBins_;                
69 <        }
70 <
71 <        double getLength() {
72 <            return len_;
73 <        }
60 >    int getNAngleBins() {return nAngleBins_;}
61          
62 <        void setNAngleBins(int nbins) {
76 <            assert(nbins >0);
77 <            nAngleBins_ = nbins;
78 <            deltaCosAngle_ = 2.0 / nAngleBins_;
79 <            for (int i = 0 ; i < nRBins_; ++i) {
80 <                histogram_[i].resize(nAngleBins_);
81 <                avgGofr_[i].resize(nAngleBins_);
82 <            }
83 <        }
84 <        
85 <        int getNAngleBins() {return nAngleBins_;}
86 <        
87 <    private:
62 >  private:
63  
64 <        virtual void preProcess();
65 <        virtual void initalizeHistogram();
66 <        virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2);
67 <        virtual void processHistogram();
64 >    virtual void preProcess();
65 >    virtual void initalizeHistogram();
66 >    virtual void processHistogram();
67 >    virtual void collectHistogram(StuntDouble* sd1, StuntDouble* sd2);
68  
69 <        virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2) = 0;
69 >    virtual RealType evaluateAngle(StuntDouble* sd1, StuntDouble* sd2) = 0;
70  
71 <        virtual void writeRdf();
71 >    virtual void writeRdf();
72  
73 <        double deltaCosAngle_;
74 <        int nAngleBins_;
75 <        double len_;
76 <        int nRBins_;
77 <        double deltaR_;
73 >    RealType deltaCosAngle_;
74 >    int nAngleBins_;
75 >    RealType len_;
76 >    int nRBins_;
77 >    RealType deltaR_;
78          
79 <        std::vector<std::vector<int> > histogram_;
80 <        std::vector<std::vector<double> > avgGofr_;
81 <        int npairs_;
82 < };
79 >    std::vector<std::vector<int> > histogram_;
80 >    std::vector<std::vector<RealType> > avgGofr_;
81 >    int npairs_;
82 >  };
83  
84  
85 < class GofRTheta : public GofRAngle {
86 <    public:
87 <        GofRTheta(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2)
88 <            : GofRAngle (info, filename, sele1, sele2) {
89 <                setOutputName(getPrefix(filename) + ".gofrt");
90 <        }
85 >  class GofRTheta : public GofRAngle {
86 >  public:
87 >    GofRTheta(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, RealType len, int nrbins, int nangleBins)
88 >      : GofRAngle (info, filename, sele1, sele2, len, nrbins, nangleBins) {
89 >        setOutputName(getPrefix(filename) + ".gofrt");
90 >      }
91          
92 <    private:
92 >  private:
93  
94 <        virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2);        
95 < };
94 >    virtual RealType evaluateAngle(StuntDouble* sd1, StuntDouble* sd2);        
95 >  };
96  
97  
98 < class GofROmega : public GofRAngle {
99 <    public:
100 <        GofROmega(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2)
101 <            : GofRAngle (info, filename, sele1, sele2) {
102 <                setOutputName(getPrefix(filename) + ".gofrw");
103 <        }
98 >  class GofROmega : public GofRAngle {
99 >  public:
100 >    GofROmega(SimInfo* info, const std::string& filename, const std::string& sele1, const std::string& sele2, RealType len, int nrbins, int nangleBins)
101 >      : GofRAngle (info, filename, sele1, sele2, len, nrbins, nangleBins) {
102 >        setOutputName(getPrefix(filename) + ".gofro");
103 >      }
104      
105 <    private:
106 <        virtual double evaluateAngle(StuntDouble* sd1, StuntDouble* sd2);        
107 < };
105 >  private:
106 >    virtual RealType evaluateAngle(StuntDouble* sd1, StuntDouble* sd2);        
107 >  };
108  
109   }
110   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines