forked from libAtoms/pymatnest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example_noninteracting_model.F90
68 lines (55 loc) · 1.74 KB
/
example_noninteracting_model.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
! API documented in example_LJ_model.F90
subroutine ll_init_model(N_params, params)
integer :: N_params
double precision :: params(N_params)
return
end subroutine ll_init_model
subroutine ll_init_config(N, Z, pos, cell, Emax)
implicit none
integer :: N
integer :: Z(N)
double precision :: pos(3,N), cell(3,3)
double precision :: Emax
return
end subroutine ll_init_config
double precision function ll_eval_energy(N, Z, pos, n_extra_data, extra_data, cell)
use example_mat_mod
implicit none
integer :: N
integer :: Z(N)
double precision :: pos(3,N), cell(3,3)
integer :: n_extra_data
double precision :: extra_data(n_extra_data, N)
ll_eval_energy = 0.0
end function ll_eval_energy
integer function ll_move_atom_1(N, Z, pos, n_extra_data, extra_data, cell, d_i, d_pos, dEmax, dE)
use example_mat_mod
implicit none
integer :: N
integer :: Z(N)
double precision :: pos(3,N), cell(3,3)
integer :: n_extra_data
double precision :: extra_data(n_extra_data, N)
integer :: d_i
double precision :: d_pos(3)
double precision :: dEmax, dE
ll_move_atom_1 = 1
dE = 0.0
end function ll_move_atom_1
function ll_eval_forces(N, Z, pos, n_extra_data, extra_data, cell, forces) result(energy)
use example_mat_mod
implicit none
integer :: N
integer :: Z(N)
double precision :: pos(3,N), cell(3,3), forces(3,N)
integer :: n_extra_data
double precision :: extra_data(n_extra_data, N)
double precision :: energy ! result
integer :: i, j
double precision :: dr(3), dr_mag, dr_l(3), dr_l0(3), pos_l(3,N)
double precision :: cell_inv(3,3)
integer :: dj1, dj2, dj3
double precision :: E_offset = 1.0/3.0**12 - 1.0/3.0**6, E_term
energy = 0.0
forces = 0.0
end function ll_eval_forces