ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/io/Globals.hpp
Revision: 1360
Committed: Mon Sep 7 16:31:51 2009 UTC (15 years, 8 months ago) by cli2
Original Path: trunk/src/io/Globals.hpp
File size: 7486 byte(s)
Log Message:
Added new restraint infrastructure
Added MolecularRestraints
Added ObjectRestraints
Added RestraintStamp
Updated thermodynamic integration to use ObjectRestraints
Added Quaternion mathematics for twist swing decompositions
Significantly updated RestWriter and RestReader to use dump-like files
Added selections for x, y, and z coordinates of atoms
Removed monolithic Restraints class
Fixed a few bugs in gradients of Euler angles in DirectionalAtom and RigidBody
Added some rotational capabilities to prinicpalAxisCalculator

File Contents

# Content
1 /*
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 * 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
19 * notice, this list of conditions and the following disclaimer.
20 *
21 * 3. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the
24 * distribution.
25 *
26 * This software is provided "AS IS," without a warranty of any
27 * kind. All express or implied conditions, representations and
28 * warranties, including any implied warranty of merchantability,
29 * fitness for a particular purpose or non-infringement, are hereby
30 * excluded. The University of Notre Dame and its licensors shall not
31 * be liable for any damages suffered by licensee as a result of
32 * using, modifying or distributing the software or its
33 * derivatives. In no event will the University of Notre Dame or its
34 * licensors be liable for any lost revenue, profit or data, or for
35 * direct, indirect, special, consequential, incidental or punitive
36 * damages, however caused and regardless of the theory of liability,
37 * arising out of the use of or inability to use software, even if the
38 * University of Notre Dame has been advised of the possibility of
39 * such damages.
40 */
41
42 #ifndef IO_GLOBALS_HPP
43 #define IO_GLOBALS_HPP
44
45 #include <iostream>
46
47 #include <stdlib.h>
48 #include <vector>
49 #include <string>
50 #include <map>
51
52 #include "types/Component.hpp"
53 #include "types/ZconsStamp.hpp"
54 #include "types/RestraintStamp.hpp"
55 #include "types/MoleculeStamp.hpp"
56 #include "utils/ParameterManager.hpp"
57
58 namespace oopse {
59 class Globals : public DataHolder {
60 public:
61 typedef std::pair<int, int> intPair;
62
63 Globals();
64 virtual ~Globals();
65
66 DeclareParameter(ForceField, std::string);
67 DeclareParameter(TargetTemp, RealType);
68 DeclareParameter(Ensemble, std::string);
69 DeclareParameter(Dt, RealType);
70 DeclareParameter(RunTime, RealType);
71 DeclareParameter(FinalConfig, std::string);
72 DeclareParameter(SampleTime, RealType);
73 DeclareParameter(ResetTime, RealType);
74 DeclareParameter(StatusTime, RealType);
75 DeclareParameter(CutoffRadius, RealType);
76 DeclareParameter(SwitchingRadius, RealType);
77 DeclareParameter(TempSet, bool);
78 DeclareParameter(ThermalTime, RealType);
79 DeclareParameter(UsePeriodicBoundaryConditions, bool);
80 DeclareParameter(TargetPressure, RealType);
81 DeclareParameter(UseAtomicVirial, bool);
82 DeclareParameter(TauThermostat, RealType);
83 DeclareParameter(TauBarostat, RealType);
84 DeclareParameter(ZconsTime, RealType);
85 DeclareParameter(ZconsTol, RealType);
86 DeclareParameter(ZconsForcePolicy, std::string);
87 DeclareParameter(Seed, unsigned long int);
88 DeclareParameter(UseInitalTime, bool);
89 DeclareParameter(UseIntialExtendedSystemState, bool);
90 DeclareParameter(OrthoBoxTolerance, RealType);
91 DeclareParameter(Minimizer, std::string);
92 DeclareParameter(MinimizerMaxIter, RealType);
93 DeclareParameter(MinimizerWriteFrq, int);
94 DeclareParameter(MinimizerStepSize, RealType);
95 DeclareParameter(MinimizerFTol, RealType);
96 DeclareParameter(MinimizerGTol, RealType);
97 DeclareParameter(MinimizerLSTol, RealType);
98 DeclareParameter(MinimizerLSMaxIter, int);
99 DeclareParameter(ZconsGap, RealType);
100 DeclareParameter(ZconsFixtime, RealType);
101 DeclareParameter(ZconsUsingSMD, bool);
102 DeclareParameter(UseThermodynamicIntegration, bool);
103 DeclareParameter(ThermodynamicIntegrationLambda, RealType);
104 DeclareParameter(ThermodynamicIntegrationK, RealType);
105 DeclareParameter(ForceFieldVariant, std::string);
106 DeclareParameter(ForceFieldFileName, std::string);
107 DeclareParameter(SurfaceTension, RealType);
108 DeclareParameter(PrintPressureTensor, bool);
109 DeclareParameter(TaggedAtomPair, intPair);
110 DeclareParameter(PrintTaggedPairDistance, bool);
111 DeclareParameter(ElectrostaticSummationMethod, std::string);
112 DeclareParameter(ElectrostaticScreeningMethod, std::string);
113 DeclareParameter(DampingAlpha, RealType);
114 DeclareParameter(Dielectric, RealType);
115 DeclareParameter(CutoffPolicy, std::string);
116 DeclareParameter(SwitchingFunctionType, std::string);
117 DeclareParameter(CompressDumpFile, bool);
118 DeclareParameter(OutputForceVector, bool);
119 DeclareParameter(SkinThickness, RealType);
120 DeclareParameter(StatFileFormat, std::string);
121 DeclareParameter(HydroPropFile, std::string);
122 DeclareParameter(Viscosity, RealType);
123 DeclareParameter(BeadSize, RealType);
124 DeclareParameter(ThermalConductivity, RealType);
125 DeclareParameter(ThermalLength, RealType);
126 DeclareParameter(UseSphericalBoundaryConditions, bool);
127 DeclareParameter(FrozenBufferRadius, RealType);
128 DeclareParameter(LangevinBufferRadius, RealType);
129 DeclareParameter(AccumulateBoxDipole, bool);
130 DeclareParameter(NeighborListNeighbors, int);
131 DeclareParameter(UseMultipleTemperatureMethod, bool);
132 DeclareParameter(MTM_Ce, RealType);
133 DeclareParameter(MTM_G, RealType);
134 DeclareParameter(MTM_Io, RealType);
135 DeclareParameter(MTM_Sigma, RealType);
136 DeclareParameter(MTM_R, RealType);
137 DeclareParameter(UseRNEMD, bool);
138 DeclareParameter(RNEMD_swapTime, RealType);
139 DeclareParameter(RNEMD_nBins, int);
140 DeclareParameter(RNEMD_swapType, std::string);
141 DeclareParameter(RNEMD_objectSelection, std::string);
142 DeclareParameter(UseRestraints, bool);
143 DeclareParameter(Restraint_file, std::string);
144
145
146 public:
147 bool addComponent(Component* comp);
148 bool addZConsStamp(ZConsStamp* zcons);
149 bool addRestraintStamp(RestraintStamp* rest);
150 bool addMoleculeStamp(MoleculeStamp* molStamp);
151 int getNComponents() {return components_.size();}
152 std::vector<Component*> getComponents() {return components_;}
153 Component* getComponentAt(int index) {return components_.at(index);}
154
155 int getNZconsStamps() {return zconstraints_.size();}
156 std::vector<ZConsStamp*> getZconsStamps() {return zconstraints_;}
157 ZConsStamp* getZconsStampAt(int index) {return zconstraints_.at(index);}
158
159 int getNRestraintStamps() {return restraints_.size();}
160 std::vector<RestraintStamp*> getRestraintStamps() {return restraints_;}
161 RestraintStamp* getRestraintStampAt(int index) {return restraints_.at(index);}
162
163 //std::string getRestraint_file(){
164
165 virtual void validate();
166 private:
167
168 std::vector<Component*> components_;
169 std::vector<ZConsStamp*> zconstraints_;
170 std::vector<RestraintStamp*> restraints_;
171 std::map<std::string, MoleculeStamp*> moleculeStamps_;
172 std::pair<int, int> taggedAtomPair_;
173 };
174 }
175 #endif
176