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 1330 by skuang, Thu Mar 19 21:03:36 2009 UTC vs.
trunk/src/rnemd/RNEMD.hpp (file contents), Revision 2046 by gezelter, Tue Dec 2 22:11:04 2014 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, 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"
46   #include "math/RandNumGen.hpp"
47 + #include "selection/SelectionEvaluator.hpp"
48 + #include "selection/SelectionManager.hpp"
49 + #include <iostream>
50  
51 < namespace oopse {
51 > using namespace std;
52 > namespace OpenMD {
53  
57  /**
58   * @class RNEMD RNEMD.hpp "integrators/RNEMD.hpp"
59   * @todo document
60   */
54    class RNEMD {
55    public:
56      RNEMD(SimInfo* info);
57 <    virtual ~RNEMD();
58 <        
59 <    void doSwap();
60 <    void set_RNEMD_swapTime(RealType swapTime) { swapTime_ = swapTime; }
61 <    void set_RNEMD_nBins(int nbins) { nBins_ = nbins; }
62 <    RealType get_RNEMD_exchange_total() { return exchangeSum_; }
63 <    void set_RNEMD_exchange_total(RealType et) {exchangeSum_ = et;}
64 <        
57 >    ~RNEMD();
58 >    
59 >    void doRNEMD();
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 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 <      rnemdKinetic,
77 <      rnemdPx,
78 <      rnemdPy,
79 <      rnemdPz,
79 <      rnemdUnknown
74 >
75 >    enum RNEMDMethod {
76 >      rnemdSwap,
77 >      rnemdNIVS,
78 >      rnemdVSS,
79 >      rnemdUnkownMethod
80      };
81 <    
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_;
83    RandNumGen* randNumGen_;
84    int nBins_;  
85    RealType swapTime_;
86    RealType exchangeSum_;
87    RNEMDTypeEnum rnemdType_;
88    std::map<std::string, RNEMDTypeEnum> stringToEnumMap_;
125  
126 +    map<string, RNEMDMethod> stringToMethod_;
127 +    map<string, RNEMDFluxType> stringToFluxType_;
128 +    RNEMDMethod rnemdMethod_;
129 +    RNEMDFluxType rnemdFluxType_;
130  
131 <  };
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 +    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_;
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_VELOCITIZER_HPP
202 > #endif //INTEGRATORS_RNEMD_HPP

Comparing:
trunk/src/integrators/RNEMD.hpp (property svn:keywords), Revision 1330 by skuang, Thu Mar 19 21:03:36 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