26Kvector::Kvector() : k (
Vec3D()),
47 volume = fabs(box[0] * (box[1].cross(box[2])));
61 for (
int i = 0; i <=
n[0]; ++i)
65 for (
int j = sj; j <=
n[1]; ++j)
68 if (i == 0 && j == 0) sk = 0;
69 for (
int k = sk; k <=
n[2]; ++k)
71 if (i == 0 && j == 0 && k == 0)
continue;
73 double knorm2 = kv.
norm2();
96 double proja = fabs(
kbox[0] * bxc);
97 double projb = fabs(
kbox[1] * axc);
98 double projc = fabs(
kbox[2] * axb);
103 while (
n[0] * proja <= cutoffRadius)
n[0]++;
104 while (
n[1] * projb <= cutoffRadius)
n[1]++;
105 while (
n[2] * projc <= cutoffRadius)
n[2]++;
Setup data for Ewald summation.
std::vector< Kvector > kvectors
Vector containing all k-vectors.
double pre
Ewald sum prefactor .
Vec3D kbox[3]
Reciprocal box vectors.
void setup(Vec3D box[3], EwaldSetup &ewaldSetup)
Set up reciprocal box vectors and eta.
double eta
Ewald summation eta parameter.
void calculatePbcCopies(double cutoffRadius)
Compute box copies in each direction.
double volume
Volume of real box.
double kCut
Cutoff in reciprocal space.
int n[3]
Required box copies in each box vector direction.
double eta
Width of the gaussian screening charges.
double kCut
Cutoff in reciprocal space.
Vector in 3 dimensional real space.
double norm2() const
Calculate square of norm of vector.
Vec3D & normalize()
Normalize vector, norm equals 1.0 afterwards.
Vec3D cross(Vec3D const &v) const
Cross product, argument vector is second in product.