SSAGES  0.8.3
Software Suite for Advanced General Ensemble Simulations
COPSSImage.h
1 
21 #pragma once
22 
23 #include "Constraint.h"
24 #include <iostream>
25 #include <iomanip>
26 #include <boost/mpi.hpp>
27 #include <fstream>
28 #include <vector>
29 #include <math.h>
30 
31 namespace SSAGES
32 {
34 
39  class COPSSImage : public Constraint
40  {
41  private:
43  double einner_;
44 
47 
49  double eouter_;
50 
52  double qqrd2e_;
53 
55  double xlo = 0.0;
56 
58  double xhi = 1.0;
59 
61  int ngauss = 5;
62 
64  double xg0_[5] = {-0.9061798459386640,-0.5384693101056831,0.00000000000000000,0.5384693101056831,0.9061798459386640};
65 
67  double wg0_[5] = {0.2369268850561891,0.4786286704993665,0.5688888888888889,0.4786286704993665,0.2369268850561891};
68 
70  std::vector<double> atomTypeRadius_;
71 
72  public:
74 
81  COPSSImage(boost::mpi::communicator& comm,
82  unsigned int frequency,
83  double einner,
84  int ion_type_start,
85  std::vector<double> atomTypeRadius):
86  Constraint(frequency, comm), einner_(einner), ion_type_start_(ion_type_start), eouter_(0), qqrd2e_(1), atomTypeRadius_(atomTypeRadius){}
87 
89  double e_;
90 
92  double ginv_;
93 
95  double Rxkj;
96 
98  double Rykj;
99 
101  double Rzkj;
102 
104  double Rkj2;
105 
107  double rkj;
108 
110  double Rxij;
111 
113  double Ryij;
114 
116  double Rzij;
117 
119  double Rij2;
120 
122  double rij;
123 
125  double ukj;
126 
128  double vkj;
129 
131  double wkj;
132 
134  double aux1;
135 
137  double aux2;
138 
140  double auxv_x_integ;
141 
143  double auxv_y_integ;
144 
146  double auxv_z_integ;
147 
149  double aux3_integ;
150 
153 
155  double auxv_x_delta;
156 
158  double auxv_y_delta;
159 
161  double auxv_z_delta;
162 
164  double aux3_delta;
165 
168 
170  double aa;
171 
173  void force_pol (Snapshot*, size_t, size_t, size_t);
174 
176  void PreSimulation(Snapshot*, const CVList&) override;
177 
179  void PostIntegration(Snapshot* snapshot, const CVList&) override;
180 
182  void PostSimulation(Snapshot*, const CVList&) override;
183 
185 
188  void Serialize(Json::Value& /* json */) const override {};
189 
192  };
193 }
void PostIntegration(Snapshot *snapshot, const CVList &) override
Post-integration hook.
Definition: COPSSImage.cpp:36
double rij
Auxiliary variable r_ij.
Definition: COPSSImage.h:122
int ion_type_start_
Where non polarizable particles start.
Definition: COPSSImage.h:46
double Rykj
Auxiliary variable R_kj for image kernel functions (y component).
Definition: COPSSImage.h:98
double wg0_[5]
Magic numbers for the weight.
Definition: COPSSImage.h:67
double ukj
Auxiliary variable u_kj.
Definition: COPSSImage.h:125
double eouter_
Dielectric constant of outside continuum.
Definition: COPSSImage.h:49
std::vector< CollectiveVariable * > CVList
List of Collective Variables.
Definition: types.h:51
void PreSimulation(Snapshot *, const CVList &) override
Pre-simulation hook.
Definition: COPSSImage.cpp:31
double xhi
Upper value for x.
Definition: COPSSImage.h:58
double Rxij
Auxiliary variable R_ij (x component).
Definition: COPSSImage.h:110
Class containing a snapshot of the current simulation in time.
Definition: Snapshot.h:43
~COPSSImage()
Destructor.
Definition: COPSSImage.h:191
double aux3Sqrt_delta
Auxiliary variable, square root of delta.
Definition: COPSSImage.h:167
double auxv_x_integ
Auxiliary variable for integration (x component).
Definition: COPSSImage.h:140
double wkj
Auxiliary variable w_kj.
Definition: COPSSImage.h:131
double xlo
Lower value for x.
Definition: COPSSImage.h:55
void force_pol(Snapshot *, size_t, size_t, size_t)
Image method kernel function, 1st order currently.
Definition: COPSSImage.cpp:134
double aa
Auxiliary variable.
Definition: COPSSImage.h:170
double vkj
Auxiliary variable v_kj.
Definition: COPSSImage.h:128
double Rxkj
Auxiliary variable R_kj for image kernel functions (x component).
Definition: COPSSImage.h:95
double e_
Gauss integration auxiliary parameter e.
Definition: COPSSImage.h:89
double aux3_integ
Auxiliary variable for integration.
Definition: COPSSImage.h:149
double xg0_[5]
Magic numbers for x.
Definition: COPSSImage.h:64
double Rij2
Auxiliary variable R_ij squared.
Definition: COPSSImage.h:119
double einner_
Dielectric constant of polarizable particles.
Definition: COPSSImage.h:43
double auxv_y_delta
Auxiliary variable, delta (y component).
Definition: COPSSImage.h:158
double rkj
Auxiliary variable r_kj.
Definition: COPSSImage.h:107
double qqrd2e_
unit conversion constant.
Definition: COPSSImage.h:52
double aux3_delta
Auxiliary variable, delta.
Definition: COPSSImage.h:164
double aux1
Auxiliary variable.
Definition: COPSSImage.h:134
double Rzij
Auxiliary variable R_ij (z component).
Definition: COPSSImage.h:116
std::vector< double > atomTypeRadius_
List of radii for all atom types.
Definition: COPSSImage.h:70
double Ryij
Auxiliary variable R_ij (y component).
Definition: COPSSImage.h:113
double aux3Sqrt_integ
Auxiliary variable, square root of integration result.
Definition: COPSSImage.h:152
void Serialize(Json::Value &) const override
Serialize the class.
Definition: COPSSImage.h:188
double auxv_y_integ
Auxiliary variable for integration (y component).
Definition: COPSSImage.h:143
int ngauss
Number of gaussian integrations.
Definition: COPSSImage.h:61
Interface for Constraint implementations.
Definition: Constraint.h:41
double auxv_z_delta
Auxiliary variable, delta (z component).
Definition: COPSSImage.h:161
double Rzkj
Auxiliary variable R_kj for image kernel functions (z component).
Definition: COPSSImage.h:101
double auxv_x_delta
Auxiliary variable, delta (x component).
Definition: COPSSImage.h:155
void PostSimulation(Snapshot *, const CVList &) override
Post-simulation hook.
Definition: COPSSImage.cpp:128
double auxv_z_integ
Auxiliary variable for integration (z component).
Definition: COPSSImage.h:146
double ginv_
Gauss integration auxiliary parameter g inverse.
Definition: COPSSImage.h:92
Image method.
Definition: COPSSImage.h:39
double Rkj2
Auxiliary variable R_kj squared.
Definition: COPSSImage.h:104
COPSSImage(boost::mpi::communicator &comm, unsigned int frequency, double einner, int ion_type_start, std::vector< double > atomTypeRadius)
Constructor.
Definition: COPSSImage.h:81
double aux2
Yet another auxiliary variable.
Definition: COPSSImage.h:137