Got a good match with some Born elements with P != 0

This commit is contained in:
Aidan Thompson
2022-02-03 21:58:25 -07:00
parent ea0b4f0f33
commit 652ff43f64
2 changed files with 29 additions and 25 deletions

View File

@ -561,8 +561,12 @@ void ComputeBornMatrix::displace_atoms(int nall, int idir, double magnitude)
{
double **x = atom->x;
int k = dirlist[idir][0];
int l = dirlist[idir][1];
// this works for 7,8,9,12,14,18, and 15,16,17
int k = dirlist[idir][1];
int l = dirlist[idir][0];
// this works for 7,8,9,12,14,18, and 10,11,13
// int k = dirlist[idir][0];
// int l = dirlist[idir][1];
for (int i = 0; i < nall; i++)
x[i][k] = temp_x[i][k] + numdelta * magnitude * (temp_x[i][l] - fixedpoint[l]);
}