79 void writeOutputFile();
82 enum RNEMDPrivilegedAxis { rnemdX = 0, rnemdY = 1, rnemdZ = 2 };
114 std::string rnemdObjectSelection_;
115 std::vector<MoleculeStamp*> objectTypes_;
119 RealType slabACenter_;
120 RealType slabBCenter_;
122 RNEMDPrivilegedAxis rnemdPrivilegedAxis_;
123 RNEMDFluxType rnemdFluxType_;
125 std::string rnemdFluxTypeLabel_;
126 std::string rnemdMethodLabel_;
128 bool doRNEMD_ {
false};
129 bool usePeriodicBoundaryConditions_ {
false};
130 bool useChargedSPF_ {
false};
132 Vector3d coordinateOrigin_;
135 RealType kineticTarget_ {0.0};
136 RealType particleTarget_ {0.0};
137 Vector3d momentumTarget_ {V3Zero};
138 Vector3d angularMomentumTarget_ {V3Zero};
141 RealType kineticExchange_ {0.0};
142 RealType particleExchange_ {0.0};
143 Vector3d momentumExchange_ {V3Zero};
144 Vector3d angularMomentumExchange_ {V3Zero};
146 unsigned int trialCount_ {0};
147 unsigned int failTrialCount_ {0};
148 unsigned int failRootCount_ {0};
150 void setKineticFlux(RealType kineticFlux);
151 void setParticleFlux(RealType particleFlux);
152 void setMomentumFluxVector(
const std::vector<RealType>& momentumFluxVector);
153 void setAngularMomentumFluxVector(
154 const std::vector<RealType>& angularMomentumFluxVector);
167 ELECTROSTATICPOTENTIAL,
174 std::vector<std::unique_ptr<Utils::BaseAccumulator>> accumulator;
177 using OutputBitSet = std::bitset<ENDINDEX - BEGININDEX>;
178 using OutputMapType = std::map<std::string, OutputFields>;
180 std::string rnemdAxisLabel_;
187 std::string selectionA_;
188 std::string selectionB_;
193 bool hasSelectionA_ {
false};
194 bool hasSelectionB_ {
false};
197 std::string outputSelection_;
201 unsigned int nBins_ {0};
205 RealType sphereARadius_;
206 RealType sphereBRadius_;
212 bool hasData_ {
false};
213 bool hasDividingArea_ {
false};
215 RealType dividingArea_;
218 RealType kineticFlux_ {0.0};
219 RealType particleFlux_ {0.0};
220 Vector3d momentumFluxVector_ {V3Zero};
221 Vector3d angularMomentumFluxVector_ {V3Zero};
223 RealType exchangeTime_ {}, runTime_ {}, statusTime_ {};
225 std::string rnemdFileName_;
226 std::ofstream rnemdFile_ {};
228 OutputBitSet outputMask_;
229 OutputMapType outputMap_;
230 std::vector<OutputData> data_;
231 std::vector<AtomType*> outputTypes_;
233 Utils::RealAccumulator areaAccumulator_ {};
235 void parseOutputFileFormat(
const std::string& format);
236 std::string setSelection(RealType& slabCenter);
237 RealType getDefaultDividingArea();
238 int getBin(Vector3d pos);