Skip to content

Commit

Permalink
Fix a bug in the symmetrization of Born effective charge
Browse files Browse the repository at this point in the history
This is an important bug fix.
  • Loading branch information
ttadano committed Jan 28, 2018
1 parent e162e74 commit 352f69e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions anphon/dynamical.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -935,7 +935,7 @@ void Dynamical::load_born()
for (j = 0; j < 3; ++j) {
for (k = 0; k < 3; ++k) {
for (m = 0; m < 3; ++m) {
born_sym[iat][i][j] += rot[i][k] * rot[j][m] * borncharge[iat_sym][k][m];
born_sym[iat_sym][i][j] += rot[i][k] * rot[j][m] * borncharge[iat][k][m];
}
}
}
Expand All @@ -957,7 +957,7 @@ void Dynamical::load_born()
for (iat = 0; iat < system->natmin; ++iat) {
for (i = 0; i < 3; ++i) {
for (j = 0; j < 3; ++j) {
diff_sym = std::max<double>(res, std::abs(borncharge[iat][i][j] - born_sym[iat][i][j]));
diff_sym = std::max<double>(diff_sym, std::abs(borncharge[iat][i][j] - born_sym[iat][i][j]));
}
}
}
Expand Down

0 comments on commit 352f69e

Please sign in to comment.