Removed forgotten neighbor->ago condition in compute_born_matrix. Rewritten compute_pair loop so that newton condition does not affect results.
This commit is contained in:
@ -349,12 +349,11 @@ void ComputeBornMatrix::compute_vector()
|
||||
|
||||
// compute Born contribution
|
||||
|
||||
if (neighbor->ago > 0) {
|
||||
if (pairflag) compute_pairs();
|
||||
if (bondflag) compute_bonds();
|
||||
if (angleflag) compute_angles();
|
||||
if (dihedflag) compute_dihedrals();
|
||||
}
|
||||
|
||||
|
||||
// sum Born contributions over all procs
|
||||
|
||||
@ -451,12 +450,11 @@ void ComputeBornMatrix::compute_pairs()
|
||||
|
||||
if (rsq >= cutsq[itype][jtype]) continue;
|
||||
|
||||
if (newton_pair || j < nlocal) {
|
||||
|
||||
// Add contribution to Born tensor
|
||||
|
||||
pair_pref = dupair = du2pair = 0.0;
|
||||
pair->born_matrix(i, j, itype, jtype, rsq, factor_coul, factor_lj, dupair, du2pair);
|
||||
pair_pref = du2pair - dupair * rinv;
|
||||
pair_pref = 0.5*du2pair - dupair * rinv;
|
||||
|
||||
// See albemunu in compute_born_matrix.h for indices order.
|
||||
|
||||
@ -471,7 +469,6 @@ void ComputeBornMatrix::compute_pairs()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------
|
||||
compute Born matrix using virial stress finite differences
|
||||
|
||||
Reference in New Issue
Block a user