Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Nov 28, 2023
1 parent d7a5d31 commit 2a8b6d4
Showing 1 changed file with 9 additions and 21 deletions.
30 changes: 9 additions & 21 deletions avogadro/core/gaussiansettools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

#include <iostream>


using std::vector;

namespace Avogadro::Core {
Expand All @@ -22,9 +21,7 @@ GaussianSetTools::GaussianSetTools(Molecule* mol) : m_molecule(mol)
m_basis = dynamic_cast<GaussianSet*>(m_molecule->basisSet());
}

GaussianSetTools::~GaussianSetTools()
{
}
GaussianSetTools::~GaussianSetTools() {}

bool GaussianSetTools::calculateMolecularOrbital(Cube& cube, int moNumber) const
{
Expand Down Expand Up @@ -55,7 +52,7 @@ double GaussianSetTools::calculateMolecularOrbital(const Vector3& position,
}

bool GaussianSetTools::calculateElectronDensity(Cube& cube) const
{
{
const MatrixX& matrix = m_basis->densityMatrix();
if (matrix.rows() == 0 || matrix.cols() == 0) {
// we don't have a density matrix, so generate one
Expand Down Expand Up @@ -160,7 +157,7 @@ inline vector<double> GaussianSetTools::calculateValues(
// Calculate the deltas for the position
for (Index i = 0; i < atomsSize; ++i) {
deltas.emplace_back(pos -
(m_molecule->atom(i).position3d() * ANGSTROM_TO_BOHR));
(m_molecule->atom(i).position3d() * ANGSTROM_TO_BOHR));
dr2.push_back(deltas[i].squaredNorm());
}

Expand Down Expand Up @@ -253,7 +250,7 @@ inline void GaussianSetTools::pointD(unsigned int moIndex, const Vector3& delta,
i < m_basis->gtoIndices()[moIndex + 1]; ++i) {
// Calculate the common factor
double tmpGTO = exp(-gtoA[i] * dr2);
for (double & component : components)
for (double& component : components)
component += gtoCN[cIndex++] * tmpGTO;
}

Expand Down Expand Up @@ -286,7 +283,7 @@ inline void GaussianSetTools::pointD5(unsigned int moIndex,
i < m_basis->gtoIndices()[moIndex + 1]; ++i) {
// Calculate the common factor
double tmpGTO = exp(-gtoA[i] * dr2);
for (double & component : components)
for (double& component : components)
component += gtoCN[cIndex++] * tmpGTO;
}

Expand Down Expand Up @@ -325,7 +322,7 @@ inline void GaussianSetTools::pointF(unsigned int moIndex, const Vector3& delta,
i < m_basis->gtoIndices()[moIndex + 1]; ++i) {
// Calculate the common factor
double tmpGTO = exp(-gtoA[i] * dr2);
for (double & component : components)
for (double& component : components)
component += gtoCN[cIndex++] * tmpGTO;
}

Expand All @@ -343,16 +340,7 @@ inline void GaussianSetTools::pointF(unsigned int moIndex, const Vector3& delta,
double componentsF[10] = {
// molden order
// e.g https://gau2grid.readthedocs.io/en/latest/order.html
xxx,
yyy,
zzz,
xyy,
xxy,
xxz,
xzz,
yzz,
yyz,
xyz
xxx, yyy, zzz, xyy, xxy, xxz, xzz, yzz, yyz, xyz
};

for (int i = 0; i < 10; ++i)
Expand All @@ -378,7 +366,7 @@ inline void GaussianSetTools::pointF7(unsigned int moIndex,
i < m_basis->gtoIndices()[moIndex + 1]; ++i) {
// Calculate the common factor
double tmpGTO = exp(-gtoA[i] * dr2);
for (double & component : components)
for (double& component : components)
component += gtoCN[cIndex++] * tmpGTO;
}

Expand Down Expand Up @@ -425,4 +413,4 @@ final normalization
values[baseIndex + i] += components[i] * componentsF[i];
}

} // End Avogadro namespace
} // namespace Avogadro::Core

0 comments on commit 2a8b6d4

Please sign in to comment.