ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/rnemd/RNEMD.hpp
Revision: 1850
Committed: Wed Feb 20 15:39:39 2013 UTC (12 years, 2 months ago) by gezelter
File size: 5524 byte(s)
Log Message:
Fixed a widespread typo in the license 

File Contents

# User Rev Content
1 gezelter 1329 /*
2     * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3     *
4     * The University of Notre Dame grants you ("Licensee") a
5     * non-exclusive, royalty free, license to use, modify and
6     * redistribute this software in source and binary code form, provided
7     * that the following conditions are met:
8     *
9 gezelter 1390 * 1. Redistributions of source code must retain the above copyright
10 gezelter 1329 * notice, this list of conditions and the following disclaimer.
11     *
12 gezelter 1390 * 2. Redistributions in binary form must reproduce the above copyright
13 gezelter 1329 * notice, this list of conditions and the following disclaimer in the
14     * documentation and/or other materials provided with the
15     * distribution.
16     *
17     * This software is provided "AS IS," without a warranty of any
18     * kind. All express or implied conditions, representations and
19     * warranties, including any implied warranty of merchantability,
20     * fitness for a particular purpose or non-infringement, are hereby
21     * excluded. The University of Notre Dame and its licensors shall not
22     * be liable for any damages suffered by licensee as a result of
23     * using, modifying or distributing the software or its
24     * derivatives. In no event will the University of Notre Dame or its
25     * licensors be liable for any lost revenue, profit or data, or for
26     * direct, indirect, special, consequential, incidental or punitive
27     * damages, however caused and regardless of the theory of liability,
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 gezelter 1390 *
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 gezelter 1850 * [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).
39 jmarr 1728 * [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010).
40     * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41 gezelter 1329 */
42    
43     /**
44     * @file RNEMD.hpp
45     * @author gezelter
46     * @date 03/13/2009
47 gezelter 1813 * @time 15:56pm
48 gezelter 1329 * @version 1.0
49     */
50    
51     #ifndef INTEGRATORS_RNEMD_HPP
52     #define INTEGRATORS_RNEMD_HPP
53     #include "brains/SimInfo.hpp"
54     #include "math/RandNumGen.hpp"
55 gezelter 1331 #include "selection/SelectionEvaluator.hpp"
56     #include "selection/SelectionManager.hpp"
57 skuang 1368 #include <iostream>
58 gezelter 1329
59 gezelter 1629 using namespace std;
60 gezelter 1390 namespace OpenMD {
61 gezelter 1329
62     class RNEMD {
63     public:
64     RNEMD(SimInfo* info);
65     virtual ~RNEMD();
66 skuang 1368
67     void doRNEMD();
68 gezelter 1329 void doSwap();
69 gezelter 1773 void doNIVS();
70     void doVSS();
71 skuang 1368 void collectData();
72     void getStarted();
73 gezelter 1773 bool inSlabA(Vector3d pos);
74     bool inSlabB(Vector3d pos);
75     void parseOutputFileFormat(const std::string& format);
76     void writeOutputFile();
77     void writeReal(int index, unsigned int bin);
78     void writeVector(int index, unsigned int bin);
79 gezelter 1774 void writeRealStdDev(int index, unsigned int bin);
80     void writeVectorStdDev(int index, unsigned int bin);
81 gezelter 1331
82 gezelter 1329 private:
83 gezelter 1331
84 gezelter 1773 enum RNEMDMethod {
85     rnemdSwap,
86     rnemdNIVS,
87     rnemdVSS,
88     rnemdUnkownMethod
89 gezelter 1329 };
90 gezelter 1773 enum RNEMDFluxType {
91     rnemdKE, // translational kinetic energy flux
92     rnemdRotKE, // rotational kinetic energy flux
93     rnemdFullKE, // full kinetic energy flux
94     rnemdPx, // flux of momentum along x axis
95     rnemdPy, // flux of momentum along y axis
96     rnemdPz, // flux of momentum along z axis
97     rnemdPvector, // flux of momentum vector
98     rnemdKePx, // flux of translational KE and x-momentum
99     rnemdKePy, // flux of translational KE and y-momentum
100     rnemdKePvector, // full combo platter
101     rnemdUnknownFluxType
102     };
103    
104     enum OutputFields {
105     BEGININDEX = 0,
106     Z = BEGININDEX,
107     TEMPERATURE,
108     VELOCITY,
109     DENSITY,
110     ENDINDEX
111     };
112    
113     struct OutputData {
114     string title;
115     string units;
116     string dataType;
117 gezelter 1813 vector<BaseAccumulator*> accumulator;
118 gezelter 1773 };
119    
120     typedef bitset<ENDINDEX-BEGININDEX> OutputBitSet;
121     typedef map<string, OutputFields> OutputMapType;
122 skuang 1368
123 gezelter 1329 SimInfo* info_;
124 gezelter 1773
125     map<string, RNEMDMethod> stringToMethod_;
126     map<string, RNEMDFluxType> stringToFluxType_;
127     RNEMDMethod rnemdMethod_;
128     RNEMDFluxType rnemdFluxType_;
129 gezelter 1629 string rnemdObjectSelection_;
130 skuang 1368 SelectionEvaluator evaluator_;
131 gezelter 1331 SelectionManager seleMan_;
132     bool usePeriodicBoundaryConditions_;
133 gezelter 1773 int nBins_;
134     RealType slabWidth_;
135     RealType slabACenter_;
136     RealType slabBCenter_;
137    
138     RealType kineticFlux_; // target or desired *flux*
139     Vector3d momentumFluxVector_; // target or desired *flux*
140    
141     RealType kineticTarget_; // target or desired one-time exchange energy
142     Vector3d momentumTarget_; // target or desired one-time exchange momentum
143    
144     RealType kineticExchange_; // actual exchange energy (running total)
145     Vector3d momentumExchange_; // actual exchange momentum (running total)
146    
147 skuang 1368 RealType exchangeTime_;
148 gezelter 1773
149 jmarr 1728 RealType targetJzpz2_;
150 gezelter 1773
151     unsigned int trialCount_;
152     unsigned int failTrialCount_;
153     unsigned int failRootCount_;
154    
155     string rnemdFileName_;
156     ofstream rnemdFile_;
157    
158     RealType runTime_, statusTime_;
159    
160     vector<OutputData> data_;
161     OutputBitSet outputMask_;
162     OutputMapType outputMap_;
163 gezelter 1774 Accumulator* areaAccumulator_;
164 gezelter 1776 bool doRNEMD_;
165 gezelter 1773
166 gezelter 1329 };
167     }
168 skuang 1368 #endif //INTEGRATORS_RNEMD_HPP

Properties

Name Value
svn:keywords Author Id Revision Date