1#ifndef REPLICA_GENERATOR_H
2#define REPLICA_GENERATOR_H
4#include "io/InputBase.h"
5#include "molecules/Molecule.h"
6#include "molecules/Component.h"
15enum SystemTypes : uint8_t {
18 ST_HETEROGENEOUS_VAPOR_LIQUID_VAPOR = 2,
19 ST_HETEROGENEOUS_LIQUID_VAPOR = 3,
25 std::vector<Molecule> vecParticles;
26 uint64_t numParticles;
27 std::array<double, 3> arrBoxLength;
63 void readReplicaPhaseSpaceHeader(
SubDomain& subDomain);
68 std::vector<SubDomain> _vecSubDomains;
69 uint64_t _numParticlesTotal;
70 uint32_t _numBlocksXZ;
71 uint32_t _numBlocksLiqY;
72 uint32_t _numBlocksVapY;
73 uint32_t _nIndexLiqBeginY;
74 uint32_t _nIndexLiqEndY;
75 uint32_t _nMoleculeFormat;
77 double _dMoleculeDiameter;
80 std::vector<uint32_t> _vecChangeCompIDsVap;
81 std::vector<uint32_t> _vecChangeCompIDsLiq;
91 virtual void read(std::ifstream& ifs,
Molecule& mol, std::vector<Component>& components) = 0;
101 virtual void read(std::ifstream& ifs,
Molecule& mol, std::vector<Component>& components) {
102 double rx, ry, rz, vx, vy, vz, q0, q1, q2, q3, Dx, Dy, Dz;
103 rx = ry = rz = vx = vy = vz = q0 = q1 = q2 = q3 = Dx = Dy = Dz = 0.;
107 ifs.read(
reinterpret_cast<char*
> (&
id), 8);
108 ifs.read(
reinterpret_cast<char*
> (&cid), 4);
109 ifs.read(
reinterpret_cast<char*
> (&rx), 8);
110 ifs.read(
reinterpret_cast<char*
> (&ry), 8);
111 ifs.read(
reinterpret_cast<char*
> (&rz), 8);
112 ifs.read(
reinterpret_cast<char*
> (&vx), 8);
113 ifs.read(
reinterpret_cast<char*
> (&vy), 8);
114 ifs.read(
reinterpret_cast<char*
> (&vz), 8);
115 ifs.read(
reinterpret_cast<char*
> (&q0), 8);
116 ifs.read(
reinterpret_cast<char*
> (&q1), 8);
117 ifs.read(
reinterpret_cast<char*
> (&q2), 8);
118 ifs.read(
reinterpret_cast<char*
> (&q3), 8);
119 ifs.read(
reinterpret_cast<char*
> (&Dx), 8);
120 ifs.read(
reinterpret_cast<char*
> (&Dy), 8);
121 ifs.read(
reinterpret_cast<char*
> (&Dz), 8);
123 Component* component = &components.at(cid - 1);
140 virtual void read(std::ifstream& ifs,
Molecule& mol, std::vector<Component>& components) {
141 double rx, ry, rz, vx, vy, vz, q0, q1, q2, q3, Dx, Dy, Dz;
142 rx = ry = rz = vx = vy = vz = q0 = q1 = q2 = q3 = Dx = Dy = Dz = 0.;
146 ifs.read(
reinterpret_cast<char*
> (&
id), 8);
147 ifs.read(
reinterpret_cast<char*
> (&cid), 4);
148 ifs.read(
reinterpret_cast<char*
> (&rx), 8);
149 ifs.read(
reinterpret_cast<char*
> (&ry), 8);
150 ifs.read(
reinterpret_cast<char*
> (&rz), 8);
151 ifs.read(
reinterpret_cast<char*
> (&vx), 8);
152 ifs.read(
reinterpret_cast<char*
> (&vy), 8);
153 ifs.read(
reinterpret_cast<char*
> (&vz), 8);
155 Component* component = &components.at(cid - 1);
172 virtual void read(std::ifstream& ifs,
Molecule& mol, std::vector<Component>& components) {
173 double rx, ry, rz, vx, vy, vz, q0, q1, q2, q3, Dx, Dy, Dz;
174 rx = ry = rz = vx = vy = vz = q0 = q1 = q2 = q3 = Dx = Dy = Dz = 0.;
178 ifs.read(
reinterpret_cast<char*
> (&
id), 8);
179 ifs.read(
reinterpret_cast<char*
> (&rx), 8);
180 ifs.read(
reinterpret_cast<char*
> (&ry), 8);
181 ifs.read(
reinterpret_cast<char*
> (&rz), 8);
182 ifs.read(
reinterpret_cast<char*
> (&vx), 8);
183 ifs.read(
reinterpret_cast<char*
> (&vy), 8);
184 ifs.read(
reinterpret_cast<char*
> (&vz), 8);
186 Component* component = &components.at(0);
Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcente...
Definition: Component.h:14
handle boundary region and multiple processes
Definition: DomainDecompBase.h:51
This class is used to read in the phasespace and to handle macroscopic values.
Definition: Domain.h:47
FullMolecule modeled as LJ sphere with point polarities.
Definition: FullMolecule.h:18
Definition: ReplicaGenerator.h:94
Definition: ReplicaGenerator.h:133
Definition: ReplicaGenerator.h:165
Definition: ReplicaGenerator.h:84
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
Definition: ReplicaGenerator.h:40
void readPhaseSpaceHeader(Domain *, double)
read the phase space components and header information
Definition: ReplicaGenerator.h:46
unsigned long readPhaseSpace(ParticleContainer *particleContainer, Domain *domain, DomainDecompBase *domainDecomp)
read the actual phase space information
Definition: ReplicaGenerator.cpp:380
void readXML(XMLfileUnits &xmlconfig)
Read in XML configuration for MkesferaGenerator and all its included objects.
Definition: ReplicaGenerator.cpp:178
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25
::xsd::cxx::tree::string< char, simple_type > string
C++ type corresponding to the string XML Schema built-in type.
Definition: vtk-punstructured.h:270
Definition: ReplicaGenerator.h:22