ls1-MarDyn
ls1-MarDyn molecular dynamics code
CanonicalEnsemble.h
1#ifndef CANONICAL_ENSEMBLE_H_
2#define CANONICAL_ENSEMBLE_H_
3
4#include <vector>
5
6#include "ensemble/EnsembleBase.h"
7#include "particleContainer/ParticleContainer.h"
8
14class Component;
15
16class DomainBase;
17/* Fix problem with Cray compiler which requires the actual size of the component class. */
18#include "molecules/Component.h"
19
21
22private:
23 CanonicalEnsemble& operator=(CanonicalEnsemble ensemble);
24
25public:
26
28
29 virtual ~~CanonicalEnsemble() {
30 }
31
32 virtual void readXML(XMLfileUnits& xmlconfig) override;
33
34 unsigned long N() override {
35 return _N;
36 }
37
38 double V() override {
39 return _V;
40 }
41
42 double T() override {
43 return _T;
44 }
45
46 double mu() override {
47 return _mu;
48 }
49
50 double p() override {
51 return _p;
52 }
53
54 double E() override {
55 return _E;
56 }
57
58 void updateGlobalVariable(ParticleContainer* particleContainer, GlobalVariable variable) override;
59
61 void beforeThermostat(unsigned long simstep, unsigned long initStatistics) override;
62
63private:
64
65 int numComponents() {
66 return _components.size();
67 }
68
69 unsigned long _N;
70 double _V;
71 double _T;
72
73 double _mu;
74 double _p;
75 double _E;
76
77 double _E_trans;
78 double _E_rot;
79
80 // TODO: As the canonical ensemble fixes the temperature here should be the right place for the thermostats
81 //std::map<int, VelocityScalingThermostat> _thermostats;
82 //std::map<int, int> _componentToThermostatMap;
83
84};
85
86#endif /* CANONICAL_ENSEMBLE_H_ */
Definition: CanonicalEnsemble.h:20
unsigned long N() override
Returns the global number of Molecules of the ensemble.
Definition: CanonicalEnsemble.h:34
void beforeThermostat(unsigned long simstep, unsigned long initStatistics) override
Definition: CanonicalEnsemble.cpp:211
double T() override
Returns the global Temperature of the ensemble.
Definition: CanonicalEnsemble.h:42
double V() override
Returns the global volume of the ensemble.
Definition: CanonicalEnsemble.h:38
double mu() override
Returns the global chemical potential of the ensemble.
Definition: CanonicalEnsemble.h:46
void updateGlobalVariable(ParticleContainer *particleContainer, GlobalVariable variable) override
Calculate global variables.
Definition: CanonicalEnsemble.cpp:31
double E() override
Returns the global energy of the ensemble.
Definition: CanonicalEnsemble.h:54
double p() override
Returns the global presure of the ensemble.
Definition: CanonicalEnsemble.h:50
Class implementing molecules as rigid rotators consisting out of different interaction sites (LJcente...
Definition: Component.h:14
Definition: DomainBase.h:7
Base class for ensembles.
Definition: EnsembleBase.h:47
This Interface is used to get access to particles and pairs of particles.
Definition: ParticleContainer.h:69
XML file with unit attributes abstraction.
Definition: xmlfileUnits.h:25