11
11
12
12
#include < iostream>
13
13
14
-
15
14
using std::vector;
16
15
17
16
namespace Avogadro ::Core {
@@ -22,9 +21,7 @@ GaussianSetTools::GaussianSetTools(Molecule* mol) : m_molecule(mol)
22
21
m_basis = dynamic_cast <GaussianSet*>(m_molecule->basisSet ());
23
22
}
24
23
25
- GaussianSetTools::~GaussianSetTools ()
26
- {
27
- }
24
+ GaussianSetTools::~GaussianSetTools () {}
28
25
29
26
bool GaussianSetTools::calculateMolecularOrbital (Cube& cube, int moNumber) const
30
27
{
@@ -55,7 +52,7 @@ double GaussianSetTools::calculateMolecularOrbital(const Vector3& position,
55
52
}
56
53
57
54
bool GaussianSetTools::calculateElectronDensity (Cube& cube) const
58
- {
55
+ {
59
56
const MatrixX& matrix = m_basis->densityMatrix ();
60
57
if (matrix.rows () == 0 || matrix.cols () == 0 ) {
61
58
// we don't have a density matrix, so generate one
@@ -160,7 +157,7 @@ inline vector<double> GaussianSetTools::calculateValues(
160
157
// Calculate the deltas for the position
161
158
for (Index i = 0 ; i < atomsSize; ++i) {
162
159
deltas.emplace_back (pos -
163
- (m_molecule->atom (i).position3d () * ANGSTROM_TO_BOHR));
160
+ (m_molecule->atom (i).position3d () * ANGSTROM_TO_BOHR));
164
161
dr2.push_back (deltas[i].squaredNorm ());
165
162
}
166
163
@@ -253,7 +250,7 @@ inline void GaussianSetTools::pointD(unsigned int moIndex, const Vector3& delta,
253
250
i < m_basis->gtoIndices ()[moIndex + 1 ]; ++i) {
254
251
// Calculate the common factor
255
252
double tmpGTO = exp (-gtoA[i] * dr2);
256
- for (double & component : components)
253
+ for (double & component : components)
257
254
component += gtoCN[cIndex++] * tmpGTO;
258
255
}
259
256
@@ -286,7 +283,7 @@ inline void GaussianSetTools::pointD5(unsigned int moIndex,
286
283
i < m_basis->gtoIndices ()[moIndex + 1 ]; ++i) {
287
284
// Calculate the common factor
288
285
double tmpGTO = exp (-gtoA[i] * dr2);
289
- for (double & component : components)
286
+ for (double & component : components)
290
287
component += gtoCN[cIndex++] * tmpGTO;
291
288
}
292
289
@@ -325,7 +322,7 @@ inline void GaussianSetTools::pointF(unsigned int moIndex, const Vector3& delta,
325
322
i < m_basis->gtoIndices ()[moIndex + 1 ]; ++i) {
326
323
// Calculate the common factor
327
324
double tmpGTO = exp (-gtoA[i] * dr2);
328
- for (double & component : components)
325
+ for (double & component : components)
329
326
component += gtoCN[cIndex++] * tmpGTO;
330
327
}
331
328
@@ -343,16 +340,7 @@ inline void GaussianSetTools::pointF(unsigned int moIndex, const Vector3& delta,
343
340
double componentsF[10 ] = {
344
341
// molden order
345
342
// e.g https://gau2grid.readthedocs.io/en/latest/order.html
346
- xxx,
347
- yyy,
348
- zzz,
349
- xyy,
350
- xxy,
351
- xxz,
352
- xzz,
353
- yzz,
354
- yyz,
355
- xyz
343
+ xxx, yyy, zzz, xyy, xxy, xxz, xzz, yzz, yyz, xyz
356
344
};
357
345
358
346
for (int i = 0 ; i < 10 ; ++i)
@@ -378,7 +366,7 @@ inline void GaussianSetTools::pointF7(unsigned int moIndex,
378
366
i < m_basis->gtoIndices ()[moIndex + 1 ]; ++i) {
379
367
// Calculate the common factor
380
368
double tmpGTO = exp (-gtoA[i] * dr2);
381
- for (double & component : components)
369
+ for (double & component : components)
382
370
component += gtoCN[cIndex++] * tmpGTO;
383
371
}
384
372
@@ -425,4 +413,4 @@ final normalization
425
413
values[baseIndex + i] += components[i] * componentsF[i];
426
414
}
427
415
428
- } // End Avogadro namespace
416
+ } // namespace Avogadro::Core
0 commit comments