Skip to content

Commit

Permalink
Fix typo again
Browse files Browse the repository at this point in the history
Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Dec 28, 2023
1 parent 8600377 commit 521cfa5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions avogadro/core/gaussiansettools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,18 @@ inline void GaussianSetTools::calculateCutoffs()
// .. but it's a good approximation since they'll be similar
unsigned int cIndex = m_basis->cIndices()[i];
const double coeff = std::abs(coefficients[cIndex]);
const double prefactor = coeff * std::pow(r, L);

// now loop through all exponents for this L value
// (e.g., multiple terms - we don't know which is the most diffuse)
for (unsigned int j = m_basis->gtoIndices()[i];
j < m_basis->gtoIndices()[i + 1]; ++j) {
double alpha = exponents[j];
double r = std::sqrt(L / (2 * alpha));
double value = prefactor * std::exp(-alpha * r * r);
double value = coeff * std::pow(r, L) * std::exp(-alpha * r * r);

Check notice on line 171 in avogadro/core/gaussiansettools.cpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

avogadro/core/gaussiansettools.cpp#L171

Variable 'value' is assigned a value that is never used.

while (value > threshold && r < maxDistance) {
r += 0.25;
value = prefactor * std::exp(-alpha * r * r);
value = coeff * std::pow(r, L) * std::exp(-alpha * r * r);

Check notice on line 175 in avogadro/core/gaussiansettools.cpp

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

avogadro/core/gaussiansettools.cpp#L175

Variable 'value' is assigned a value that is never used.
}

m_cutoffDistances[L] = std::max(m_cutoffDistances[L], r * r);
Expand Down

0 comments on commit 521cfa5

Please sign in to comment.