ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/brains/Stats.cpp
Revision: 1710
Committed: Fri May 18 21:44:02 2012 UTC (12 years, 11 months ago) by gezelter
File size: 9893 byte(s)
Log Message:
Added an adapter layer between the AtomType and the rest of the code to 
handle the bolt-on capabilities of new types. 

Fixed a long-standing bug in how storageLayout was being set to the maximum
possible value.

Started to add infrastructure for Polarizable and fluc-Q calculations.

File Contents

# Content
1 /*
2 * Copyright (c) 2005, 2009 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 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
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.
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 *
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] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010).
40 * [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41 */
42
43 /**
44 * @file Stats.cpp
45 * @author tlin
46 * @date 11/04/2004
47 * @time 14:26am
48 * @version 1.0
49 */
50
51 #include "brains/Stats.hpp"
52
53 namespace OpenMD {
54
55 bool Stats::isInit_ = false;
56 std::string Stats::title_[Stats::ENDINDEX - Stats::BEGININDEX];
57 std::string Stats::units_[Stats::ENDINDEX - Stats::BEGININDEX];
58 Stats::StatsMapType Stats::statsMap;
59 Stats::Stats() {
60
61 if (!isInit_) {
62 init();
63 isInit_ = true;
64 }
65
66 }
67
68 void Stats::init() {
69
70 Stats::title_[TIME] = "Time";
71 Stats::title_[TOTAL_ENERGY] = "Total Energy";
72 Stats::title_[POTENTIAL_ENERGY] = "Potential Energy";
73 Stats::title_[KINETIC_ENERGY] = "Kinetic Energy";
74 Stats::title_[TEMPERATURE] = "Temperature";
75 Stats::title_[PRESSURE] = "Pressure";
76 Stats::title_[VOLUME] = "Volume";
77 Stats::title_[HULLVOLUME] = "Hull Volume";
78 Stats::title_[GYRVOLUME] = "Gyrational Volume";
79 Stats::title_[CONSERVED_QUANTITY] = "Conserved Quantity";
80 Stats::title_[TRANSLATIONAL_KINETIC] = "Translational Kinetic";
81 Stats::title_[ROTATIONAL_KINETIC] = "Rotational Kinetic";
82 Stats::title_[LONG_RANGE_POTENTIAL] = "Long Range Potential";
83 Stats::title_[SHORT_RANGE_POTENTIAL] = "Short Range Potential";
84 Stats::title_[VANDERWAALS_POTENTIAL] = "van der waals Potential";
85 Stats::title_[ELECTROSTATIC_POTENTIAL] = "Electrostatic Potential";
86 Stats::title_[BOND_POTENTIAL] = "Bond Potential";
87 Stats::title_[BEND_POTENTIAL] = "Bend Potential";
88 Stats::title_[DIHEDRAL_POTENTIAL] = "Dihedral Potential";
89 Stats::title_[INVERSION_POTENTIAL] = "Inversion Potential";
90 Stats::title_[VRAW] = "Raw Potential";
91 Stats::title_[VHARM] = "Harmonic Potential";
92 Stats::title_[SHADOWH] = "Shadow Hamiltonian";
93 Stats::title_[PRESSURE_TENSOR_XX] = "P_xx";
94 Stats::title_[PRESSURE_TENSOR_XY] = "P_xy";
95 Stats::title_[PRESSURE_TENSOR_XZ] = "P_xz";
96 Stats::title_[PRESSURE_TENSOR_YX] = "P_yx";
97 Stats::title_[PRESSURE_TENSOR_YY] = "P_yy";
98 Stats::title_[PRESSURE_TENSOR_YZ] = "P_yz";
99 Stats::title_[PRESSURE_TENSOR_ZX] = "P_zx";
100 Stats::title_[PRESSURE_TENSOR_ZY] = "P_zy";
101 Stats::title_[PRESSURE_TENSOR_ZZ] = "P_zz";
102 Stats::title_[BOX_DIPOLE_X] = "box dipole x";
103 Stats::title_[BOX_DIPOLE_Y] = "box dipole y";
104 Stats::title_[BOX_DIPOLE_Z] = "box dipole z";
105 Stats::title_[TAGGED_PAIR_DISTANCE] = "Tagged_Pair_Distance";
106 Stats::title_[RNEMD_EXCHANGE_TOTAL] = "RNEMD_exchange_total";
107
108 Stats::units_[TIME] = "fs";
109 Stats::units_[TOTAL_ENERGY] = "kcal/mol";
110 Stats::units_[POTENTIAL_ENERGY] = "kcal/mol";
111 Stats::units_[KINETIC_ENERGY] = "kcal/mol";
112 Stats::units_[TEMPERATURE] = "K";
113 Stats::units_[PRESSURE] = "atm";
114 Stats::units_[VOLUME] = "A^3";
115 Stats::units_[HULLVOLUME] = "A^3";
116 Stats::units_[GYRVOLUME] = "A^3";
117 Stats::units_[CONSERVED_QUANTITY] = "kcal/mol";
118 Stats::units_[TRANSLATIONAL_KINETIC] = "kcal/mol";
119 Stats::units_[ROTATIONAL_KINETIC] = "kcal/mol";
120 Stats::units_[LONG_RANGE_POTENTIAL] = "kcal/mol";
121 Stats::units_[SHORT_RANGE_POTENTIAL] = "kcal/mol";
122 Stats::units_[VANDERWAALS_POTENTIAL] = "kcal/mol";
123 Stats::units_[ELECTROSTATIC_POTENTIAL] = "kcal/mol";
124 Stats::units_[BOND_POTENTIAL] = "kcal/mol";
125 Stats::units_[BEND_POTENTIAL] = "kcal/mol";
126 Stats::units_[DIHEDRAL_POTENTIAL] = "kcal/mol";
127 Stats::units_[INVERSION_POTENTIAL] = "kcal/mol";
128 Stats::units_[VRAW] = "kcal/mol";
129 Stats::units_[VHARM] = "kcal/mol";
130 Stats::units_[SHADOWH] = "kcal/mol";
131 Stats::units_[PRESSURE_TENSOR_XX] = "amu*fs^-2*Ang^-1";
132 Stats::units_[PRESSURE_TENSOR_XY] = "amu*fs^-2*Ang^-1";
133 Stats::units_[PRESSURE_TENSOR_XZ] = "amu*fs^-2*Ang^-1";
134 Stats::units_[PRESSURE_TENSOR_YX] = "amu*fs^-2*Ang^-1";
135 Stats::units_[PRESSURE_TENSOR_YY] = "amu*fs^-2*Ang^-1";
136 Stats::units_[PRESSURE_TENSOR_YZ] = "amu*fs^-2*Ang^-1";
137 Stats::units_[PRESSURE_TENSOR_ZX] = "amu*fs^-2*Ang^-1";
138 Stats::units_[PRESSURE_TENSOR_ZY] = "amu*fs^-2*Ang^-1";
139 Stats::units_[PRESSURE_TENSOR_ZZ] = "amu*fs^-2*Ang^-1";
140 Stats::units_[BOX_DIPOLE_X] = "C*m";
141 Stats::units_[BOX_DIPOLE_Y] = "C*m";
142 Stats::units_[BOX_DIPOLE_Z] = "C*m";
143 Stats::units_[TAGGED_PAIR_DISTANCE] = "Ang";
144 Stats::units_[RNEMD_EXCHANGE_TOTAL] = "Variable";
145
146 Stats::statsMap.insert(StatsMapType::value_type("TIME", TIME));
147 Stats::statsMap.insert(StatsMapType::value_type("TOTAL_ENERGY", TOTAL_ENERGY));
148 Stats::statsMap.insert(StatsMapType::value_type("POTENTIAL_ENERGY", POTENTIAL_ENERGY));
149 Stats::statsMap.insert(StatsMapType::value_type("KINETIC_ENERGY", KINETIC_ENERGY));
150 Stats::statsMap.insert(StatsMapType::value_type("TEMPERATURE", TEMPERATURE));
151 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE", PRESSURE));
152 Stats::statsMap.insert(StatsMapType::value_type("VOLUME", VOLUME));
153 Stats::statsMap.insert(StatsMapType::value_type("HULLVOLUME", HULLVOLUME));
154 Stats::statsMap.insert(StatsMapType::value_type("GYRVOLUME", GYRVOLUME));
155 Stats::statsMap.insert(StatsMapType::value_type("CONSERVED_QUANTITY", CONSERVED_QUANTITY));
156 Stats::statsMap.insert(StatsMapType::value_type("TRANSLATIONAL_KINETIC", TRANSLATIONAL_KINETIC));
157 Stats::statsMap.insert(StatsMapType::value_type("ROTATIONAL_KINETIC", ROTATIONAL_KINETIC));
158 Stats::statsMap.insert(StatsMapType::value_type("LONG_RANGE_POTENTIAL", LONG_RANGE_POTENTIAL));
159 Stats::statsMap.insert(StatsMapType::value_type("SHORT_RANGE_POTENTIAL", SHORT_RANGE_POTENTIAL));
160 Stats::statsMap.insert(StatsMapType::value_type("VANDERWAALS_POTENTIAL", VANDERWAALS_POTENTIAL));
161 Stats::statsMap.insert(StatsMapType::value_type("ELECTROSTATIC_POTENTIAL", ELECTROSTATIC_POTENTIAL));
162 Stats::statsMap.insert(StatsMapType::value_type("BOND_POTENTIAL", BOND_POTENTIAL));
163 Stats::statsMap.insert(StatsMapType::value_type("BEND_POTENTIAL", BEND_POTENTIAL));
164 Stats::statsMap.insert(StatsMapType::value_type("DIHEDRAL_POTENTIAL", DIHEDRAL_POTENTIAL));
165 Stats::statsMap.insert(StatsMapType::value_type("INVERSION_POTENTIAL", INVERSION_POTENTIAL));
166 Stats::statsMap.insert(StatsMapType::value_type("VRAW", VRAW));
167 Stats::statsMap.insert(StatsMapType::value_type("VHARM", VHARM));
168 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_XX", PRESSURE_TENSOR_XX));
169 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_XY", PRESSURE_TENSOR_XY));
170 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_XZ", PRESSURE_TENSOR_XZ));
171 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_YX", PRESSURE_TENSOR_YX));
172 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_YY", PRESSURE_TENSOR_YY));
173 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_YZ", PRESSURE_TENSOR_YZ));
174 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_ZX", PRESSURE_TENSOR_ZX));
175 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_ZY", PRESSURE_TENSOR_ZY));
176 Stats::statsMap.insert(StatsMapType::value_type("PRESSURE_TENSOR_ZZ", PRESSURE_TENSOR_ZZ));
177 Stats::statsMap.insert(StatsMapType::value_type("BOX_DIPOLE_X", BOX_DIPOLE_X));
178 Stats::statsMap.insert(StatsMapType::value_type("BOX_DIPOLE_Y", BOX_DIPOLE_Y));
179 Stats::statsMap.insert(StatsMapType::value_type("BOX_DIPOLE_Z", BOX_DIPOLE_Z));
180 Stats::statsMap.insert(StatsMapType::value_type("TAGGED_PAIR_DISTANCE", TAGGED_PAIR_DISTANCE));
181 Stats::statsMap.insert(StatsMapType::value_type("RNEMD_EXCHANGE_TOTAL", RNEMD_EXCHANGE_TOTAL));
182 Stats::statsMap.insert(StatsMapType::value_type("SHADOWH", SHADOWH));
183 }
184
185 }

Properties

Name Value
svn:eol-style native
svn:executable *