Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Feb 4, 2024
1 parent 2cc9d3e commit 56c488f
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/force_h2o.F90
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ subroutine force_h2o(x, y, z, fx, fy, fz, eclas, natom, nbeads)
call force_h2o_schwenke(x, y, z, fx, fy, fz, eclas, natom, nbeads)
else if (h2opot == 'cvrqd') then
call force_h2o_cvrqd(x, y, z, fx, fy, fz, eclas, natom, nbeads)
call fatal_error(__FILE__, __LINE__, 'Numerical forces not yet implemented!')

Check warning on line 62 in src/force_h2o.F90

View check run for this annotation

Codecov / codecov/patch

src/force_h2o.F90#L60-L62

Added lines #L60 - L62 were not covered by tests
else
call fatal_error(__FILE__, __LINE__, 'Potential '//trim(h2opot)//' not implemented')
end if
Expand Down Expand Up @@ -126,6 +127,8 @@ subroutine force_h2o_cvrqd(x, y, z, fx, fy, fz, Eclas, natom, nbeads)
end do
Eclas = Eclas / nbeads

Check warning on line 128 in src/force_h2o.F90

View check run for this annotation

Codecov / codecov/patch

src/force_h2o.F90#L128

Added line #L128 was not covered by tests

! TODO: Given the small difference between the Schwenke potential,
! we might not need to implement numerical forces here.
! call numerical_forces(x, y, z, fx, fy, fz, Epot, natom, nbeads)

end subroutine force_h2o_cvrqd

Check warning on line 134 in src/force_h2o.F90

View check run for this annotation

Codecov / codecov/patch

src/force_h2o.F90#L134

Added line #L134 was not covered by tests
Expand Down
1 change: 1 addition & 0 deletions tests/H2O_CVRQD/ERROR.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ERROR in force_h2o.F90: Numerical forces not yet implemented!
19 changes: 19 additions & 0 deletions tests/H2O_CVRQD/input.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
! Test the analytical CVRQD water potential

&general
nstep=1,
irest=0,
idebug=1

pot='_h2o_'
h2opot='cvrqd'
mdtype='MD', ! classical MD
dt=20., ! number of steps and timestep
nstep=2
/

&nhcopt
inose=0, ! Thermostating: Nose-Hoover 1, microcanonical 0,GLE 2, LE 3
temp=100
rem_comrot=.true. ! this is a default value, remove rotations at the beginning
/
5 changes: 5 additions & 0 deletions tests/H2O_CVRQD/mini.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3

o 0.000 0.118 0.000
H 0.757 -0.472 0.000
h -0.757 -0.472 0.000

0 comments on commit 56c488f

Please sign in to comment.