Skip to content

Commit

Permalink
TT initialize the holder var as needed. NVE energy is conserving now.
Browse files Browse the repository at this point in the history
  • Loading branch information
khavernathy committed Nov 22, 2017
1 parent f4f2ab0 commit 72199e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/tt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ void tt_forces(System &system) {
//if (r <= system.pbc.cutoff && i<k) { // not intramolecular
if (i<k) { // not intramolecular
for (int q=0; q<3; q++) { // 3 DIMS
holder = 0;

// repulsion force
holder += 315.7750382111558307123944638*b*distances[q]*exp(b*sig)*exp(-b*r)/r;

Expand Down

0 comments on commit 72199e2

Please sign in to comment.