23 type(tester_t) :: test
26 integer,
parameter :: N = 4
27 integer,
parameter :: n_links = 3
28 double precision,
parameter :: k = 7
29 integer :: links(2,n_links)
30 double precision :: links_d(n_links)
32 double precision :: L(3), e, expected_e
50 expected_e = expected_e + 1.5d0**2
57 expected_e = expected_e + 0
64 expected_e = expected_e + 0.5d0**2
66 expected_e = expected_e*k/2
70 write(*,*)
'expected_e', expected_e
72 call test%assert_close(e, expected_e)
74 call test%assert_close(p%force(:,1), [k, 0.d0, 0.d0])
76 call test%assert_close(maxval(abs(sum(p%force, dim=2))), 0.d0)
double precision function, public elastic_network(p, links, distances, k, edges)
Routines to perform Molecular Dynamics integration.
program test_elastic_network_0
Test the elastic network force routine.