Skip to content

Commit

Permalink
Returning the full virial from LJ breaks regtests
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm committed Sep 27, 2024
1 parent c27f098 commit d14c4b5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/f90/LJ.f90
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,8 @@ SUBROUTINE LJ_getall(rc, sigma, eps, natoms, atoms, cell_h, cell_ih, index_list,
forces(n_list(j),:) = forces(n_list(j),:) - fij
pot = pot + pot_ij
DO k = 1, 3
DO l = 1, 3
DO l = k, 3
! only upper triangular part is returned
virial(k,l) = virial(k,l) + fij(k)*rij(l)
ENDDO
ENDDO
Expand Down Expand Up @@ -271,7 +272,7 @@ SUBROUTINE LJMix_getall(n_type2, rc, sigma, eps, natoms, atoms, cell_h, cell_ih,
forces(n_list(j),:) = forces(n_list(j),:) - fij
pot = pot + pot_ij
DO k = 1, 3
DO l = 1, 3
DO l = k, 3 ! only upper-tri part is returned
virial(k,l) = virial(k,l) + fij(k)*rij(l)
ENDDO
ENDDO
Expand Down

0 comments on commit d14c4b5

Please sign in to comment.