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

Comparing:
trunk/src/integrators/RNEMD.hpp (file contents), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
trunk/src/rnemd/RNEMD.hpp (file contents), Revision 2046 by gezelter, Tue Dec 2 22:11:04 2014 UTC

# Line 35 | Line 35
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).                        
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39 > * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40 > * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
42  
42 /**
43 * @file RNEMD.hpp
44 * @author gezelter
45 * @date 03/13/2009
46 * @time 15:56pm
47 * @version 1.0
48 */
49
43   #ifndef INTEGRATORS_RNEMD_HPP
44   #define INTEGRATORS_RNEMD_HPP
45   #include "brains/SimInfo.hpp"
# Line 55 | Line 48
48   #include "selection/SelectionManager.hpp"
49   #include <iostream>
50  
51 + using namespace std;
52   namespace OpenMD {
53  
60  /**
61   * @class RNEMD RNEMD.hpp "integrators/RNEMD.hpp"
62   * @todo document
63   */
54    class RNEMD {
55    public:
56      RNEMD(SimInfo* info);
57 <    virtual ~RNEMD();
57 >    ~RNEMD();
58      
59      void doRNEMD();
60 <    void doSwap();
61 <    void doScale();
60 >    void doSwap(SelectionManager& smanA, SelectionManager& smanB);
61 >    void doNIVS(SelectionManager& smanA, SelectionManager& smanB);
62 >    void doVSS(SelectionManager& smanA, SelectionManager& smanB);
63 >    RealType getDividingArea();
64      void collectData();
65      void getStarted();
66 <    void getStatus();
67 <    void set_RNEMD_exchange_time(RealType exchangeTime) {
68 <      exchangeTime_ = exchangeTime;
69 <    }
70 <    void set_RNEMD_nBins(int nbins) { nBins_ = nbins; }
71 <    RealType get_RNEMD_exchange_total() { return exchangeSum_; }
80 <    void set_RNEMD_exchange_total(RealType et) { exchangeSum_ = et; }
81 <    void set_RNEMD_target_flux(RealType targetFlux) {targetFlux_ = targetFlux;}
66 >    void parseOutputFileFormat(const std::string& format);
67 >    void writeOutputFile();
68 >    void writeReal(int index, unsigned int bin);
69 >    void writeVector(int index, unsigned int bin);
70 >    void writeRealErrorBars(int index, unsigned int bin);
71 >    void writeVectorErrorBars(int index, unsigned int bin);
72  
73    private:
74  
75 <    enum RNEMDTypeEnum {
76 <      rnemdKineticSwap,
77 <      rnemdKineticScale,
78 <      rnemdPxScale,
79 <      rnemdPyScale,
90 <      rnemdPzScale,
91 <      rnemdPx,
92 <      rnemdPy,
93 <      rnemdPz,
94 <      rnemdUnknown
75 >    enum RNEMDMethod {
76 >      rnemdSwap,
77 >      rnemdNIVS,
78 >      rnemdVSS,
79 >      rnemdUnkownMethod
80      };
81 +    enum RNEMDFluxType {
82 +      rnemdKE,       // translational kinetic energy flux
83 +      rnemdRotKE,    // rotational kinetic energy flux
84 +      rnemdFullKE,   // full kinetic energy flux
85 +      rnemdPx,       // flux of momentum along x axis
86 +      rnemdPy,       // flux of momentum along y axis
87 +      rnemdPz,       // flux of momentum along z axis
88 +      rnemdPvector,  // flux of momentum vector
89 +      rnemdLx,       // flux of angular momentum along x axis
90 +      rnemdLy,       // flux of angular momentum along y axis
91 +      rnemdLz,       // flux of angular momentum along z axis
92 +      rnemdLvector,  // flux of angular momentum vector
93 +      rnemdKePx,     // flux of translational KE and x-momentum
94 +      rnemdKePy,     // flux of translational KE and y-momentum
95 +      rnemdKePvector, // full combo flying platter
96 +      rnemdKeLx,     // flux of translational KE and x-angular momentum
97 +      rnemdKeLy,     // flux of translational KE and y-angular momentum
98 +      rnemdKeLz,     // flux of translational KE and z-angular momentum
99 +      rnemdKeLvector, // full combo spinning platter
100 +      rnemdUnknownFluxType
101 +    };
102 +
103 +    enum OutputFields {
104 +      BEGININDEX = 0,
105 +      Z = BEGININDEX,
106 +      R,
107 +      TEMPERATURE,
108 +      VELOCITY,
109 +      ANGULARVELOCITY,
110 +      DENSITY,
111 +      ENDINDEX
112 +    };
113 +
114 +    struct OutputData {
115 +      string title;
116 +      string units;
117 +      string dataType;
118 +      vector<BaseAccumulator*> accumulator;
119 +    };
120 +
121 +    typedef bitset<ENDINDEX-BEGININDEX> OutputBitSet;
122 +    typedef map<string, OutputFields> OutputMapType;
123      
124      SimInfo* info_;
125 <    RandNumGen* randNumGen_;
126 <    std::map<std::string, RNEMDTypeEnum> stringToEnumMap_;
127 <    RNEMDTypeEnum rnemdType_;
128 <    std::string rnemdObjectSelection_;
125 >
126 >    map<string, RNEMDMethod> stringToMethod_;
127 >    map<string, RNEMDFluxType> stringToFluxType_;
128 >    RNEMDMethod rnemdMethod_;
129 >    RNEMDFluxType rnemdFluxType_;
130 >
131 >    // object selection for specifying a particular species:
132 >    string rnemdObjectSelection_;
133      SelectionEvaluator evaluator_;
134      SelectionManager seleMan_;
135 +
136 +    // Geometric selections for the two regions for the exchange:
137 +    string selectionA_;
138 +    SelectionEvaluator evaluatorA_;
139 +    SelectionManager seleManA_;
140 +    string selectionB_;
141 +    SelectionEvaluator evaluatorB_;
142 +    SelectionManager seleManB_;
143 +    SelectionManager commonA_;
144 +    SelectionManager commonB_;
145 +    bool hasSelectionA_;
146 +    bool hasSelectionB_;                      
147 +    bool hasSphereBRadius_;
148 +
149      bool usePeriodicBoundaryConditions_;
150 +    bool hasDividingArea_;
151 +    RealType dividingArea_;
152 +
153      int nBins_;
154 <    int midBin_;
155 <    int rnemdLogWidth_;
154 >    RealType binWidth_;
155 >    RealType slabWidth_;
156 >    RealType slabACenter_;
157 >    RealType slabBCenter_;
158 >    RealType sphereARadius_;
159 >    RealType sphereBRadius_;
160 >    RealType areaA_;
161 >    bool AisHull_;
162 >    RealType areaB_;
163 >    bool BisHull_;
164 >
165 >    Vector3d coordinateOrigin_;
166 >
167 >    RealType kineticFlux_;        // target or desired *flux*
168 >    Vector3d momentumFluxVector_; // target or desired *flux*
169 >    Vector3d angularMomentumFluxVector_; // target or desired *flux*
170 >
171 >    RealType kineticTarget_;     // target or desired one-time exchange energy
172 >    Vector3d momentumTarget_;    // target or desired one-time exchange momentum
173 >    Vector3d angularMomentumTarget_; // target or desired one-time
174 >                                     // exchange angular momentum
175 >
176 >    RealType kineticExchange_;    // actual exchange energy (running total)
177 >    Vector3d momentumExchange_;   // actual exchange momentum (running total)
178 >    Vector3d angularMomentumExchange_; // actual exchange momentum
179 >                                       // (running total)
180      RealType exchangeTime_;
109    RealType targetFlux_;
110    RealType exchangeSum_;
111    int failTrialCount_;
112    int failRootCount_;
113    std::ofstream rnemdLog_;
114    // keeps track of what's being averaged
115    std::vector<RealType> valueHist_;
116    std::vector<int> valueCount_;
117    // keeps track of the number of degrees of freedom being averaged
118    std::vector<RealType> xTempHist_, yTempHist_, zTempHist_;
119    std::ofstream xTempLog_, yTempLog_, zTempLog_;
120  };
181  
182 +    RealType targetJzpz2_;
183 +
184 +    unsigned int trialCount_;
185 +    unsigned int failTrialCount_;
186 +    unsigned int failRootCount_;
187 +
188 +    string rnemdFileName_;
189 +    ofstream rnemdFile_;
190 +
191 +    RealType runTime_, statusTime_;
192 +
193 +    vector<OutputData> data_;
194 +    OutputBitSet outputMask_;
195 +    OutputMapType outputMap_;
196 +    Accumulator* areaAccumulator_;
197 +    bool doRNEMD_;
198 +    bool hasData_;
199 +
200 +  };
201   }
202   #endif //INTEGRATORS_RNEMD_HPP

Comparing:
trunk/src/integrators/RNEMD.hpp (property svn:keywords), Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
trunk/src/rnemd/RNEMD.hpp (property svn:keywords), Revision 2046 by gezelter, Tue Dec 2 22:11:04 2014 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines