BraWl
Loading...
Searching...
No Matches
bw_hamiltonian Module Reference

Functions/Subroutines

real(real64) function, public total_energy (setup, config)
 Function to compute the total energy of a simulation configuration.
 
real(real64) function, public pair_energy (setup, config, idx1, idx2)
 Function to compute the contribution to the simulation energy of a simulation from a selected pair of atoms.
 
real(real64) function bcc_shell1_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell2_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell3_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell4_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell5_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell6_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell7_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 7th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell8_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 8th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell9_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 9th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function bcc_shell10_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 10th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_1shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_2shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_3shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_4shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_5shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_6shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_7shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 7th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_8shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 8th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_9shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 9th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function, public bcc_energy_10shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 10th-nearest neighbours on the bcc lattice (cubic representation)
 
real(real64) function fcc_shell1_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function fcc_shell2_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function fcc_shell3_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function fcc_shell4_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function fcc_shell5_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function fcc_shell6_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_1shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_2shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_3shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_4shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_5shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function, public fcc_energy_6shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the fcc lattice (cubic representation)
 
real(real64) function simple_cubic_1shell_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the simple cubic lattice.
 
real(real64) function simple_cubic_2shell_energy (setup, site_b, site_i, site_j, site_k, config, species)
 Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the simple cubic lattice.
 
real(real64) function, public simple_cubic_energy_1shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the simple cubic lattice.
 
real(real64) function, public simple_cubic_energy_2shells (setup, config, site_b, site_i, site_j, site_k)
 Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the simple cubic lattice.
 

Function/Subroutine Documentation

◆ bcc_energy_10shells()

real(real64) function, public bw_hamiltonian::bcc_energy_10shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 10th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 10th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1240 of file bw_hamiltonian.f90.

1242 !integer(array_int), allocatable, dimension(:,:,:,:), intent(in) :: config
1243 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1244 real(real64) :: energy
1245 class(run_params), intent(in) :: setup
1246 integer, intent(in) :: site_b, site_i, site_j, site_k
1247 integer(array_int) :: species
1248
1249 species = config(site_b, site_i, site_j, site_k)
1250
1251 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1252 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1253 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1254 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1255 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1256 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1257 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1258 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1259 + bcc_shell9_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1260 + bcc_shell10_energy(setup, site_b, site_i, site_j, site_k, config, species)
1261
Here is the call graph for this function:

◆ bcc_energy_1shells()

real(real64) function, public bw_hamiltonian::bcc_energy_1shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 898 of file bw_hamiltonian.f90.

900
901 integer(array_int), dimension(:,:,:,:), intent(in) :: config
902 real(real64) :: energy
903 class(run_params), intent(in) :: setup
904 integer, intent(in) :: site_b, site_i, site_j, site_k
905 integer(array_int) :: species
906
907 species = config(site_b, site_i, site_j, site_k)
908
909 energy= bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species)
910
Here is the call graph for this function:

◆ bcc_energy_2shells()

real(real64) function, public bw_hamiltonian::bcc_energy_2shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 932 of file bw_hamiltonian.f90.

934
935 integer(array_int), dimension(:,:,:,:), intent(in) :: config
936 real(real64) :: energy
937 class(run_params), intent(in) :: setup
938 integer, intent(in) :: site_b, site_i, site_j, site_k
939 integer(array_int) :: species
940
941 species = config(site_b, site_i, site_j, site_k)
942
943 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
944 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species)
945
Here is the call graph for this function:

◆ bcc_energy_3shells()

real(real64) function, public bw_hamiltonian::bcc_energy_3shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 967 of file bw_hamiltonian.f90.

969
970 integer(array_int), dimension(:,:,:,:), intent(in) :: config
971 real(real64) :: energy
972 class(run_params), intent(in) :: setup
973 integer, intent(in) :: site_b, site_i, site_j, site_k
974 integer(array_int) :: species
975
976 species = config(site_b, site_i, site_j, site_k)
977
978 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
979 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
980 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species)
981
Here is the call graph for this function:

◆ bcc_energy_4shells()

real(real64) function, public bw_hamiltonian::bcc_energy_4shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1003 of file bw_hamiltonian.f90.

1005
1006 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1007 real(real64) :: energy
1008 class(run_params), intent(in) :: setup
1009 integer, intent(in) :: site_b, site_i, site_j, site_k
1010 integer(array_int) :: species
1011
1012 species = config(site_b, site_i, site_j, site_k)
1013
1014 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1015 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1016 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1017 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species)
1018
Here is the call graph for this function:

◆ bcc_energy_5shells()

real(real64) function, public bw_hamiltonian::bcc_energy_5shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1040 of file bw_hamiltonian.f90.

1042
1043 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1044 real(real64) :: energy
1045 class(run_params), intent(in) :: setup
1046 integer, intent(in) :: site_b, site_i, site_j, site_k
1047 integer(array_int) :: species
1048
1049 species = config(site_b, site_i, site_j, site_k)
1050
1051 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1052 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1053 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1054 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1055 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species)
1056
Here is the call graph for this function:

◆ bcc_energy_6shells()

real(real64) function, public bw_hamiltonian::bcc_energy_6shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1078 of file bw_hamiltonian.f90.

1080
1081 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1082 real(real64) :: energy
1083 class(run_params), intent(in) :: setup
1084 integer, intent(in) :: site_b, site_i, site_j, site_k
1085 integer(array_int) :: species
1086
1087 species = config(site_b, site_i, site_j, site_k)
1088
1089 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1090 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1091 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1092 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1093 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1094 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species)
1095
Here is the call graph for this function:

◆ bcc_energy_7shells()

real(real64) function, public bw_hamiltonian::bcc_energy_7shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 7th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 7th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1117 of file bw_hamiltonian.f90.

1119
1120 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1121 real(real64) :: energy
1122 class(run_params), intent(in) :: setup
1123 integer, intent(in) :: site_b, site_i, site_j, site_k
1124 integer(array_int) :: species
1125
1126 species = config(site_b, site_i, site_j, site_k)
1127
1128 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1129 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1130 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1131 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1132 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1133 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1134 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species)
1135
Here is the call graph for this function:

◆ bcc_energy_8shells()

real(real64) function, public bw_hamiltonian::bcc_energy_8shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 8th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 8th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1157 of file bw_hamiltonian.f90.

1159
1160 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1161 real(real64) :: energy
1162 class(run_params), intent(in) :: setup
1163 integer, intent(in) :: site_b, site_i, site_j, site_k
1164 integer(array_int) :: species
1165
1166 species = config(site_b, site_i, site_j, site_k)
1167
1168 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1169 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1170 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1171 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1172 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1173 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1174 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1175 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species)
1176
Here is the call graph for this function:

◆ bcc_energy_9shells()

real(real64) function, public bw_hamiltonian::bcc_energy_9shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 9th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 9th-nearest neighbours on the bcc lattice (cubic representation).

Definition at line 1198 of file bw_hamiltonian.f90.

1200
1201 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1202 real(real64) :: energy
1203 class(run_params), intent(in) :: setup
1204 integer, intent(in) :: site_b, site_i, site_j, site_k
1205 integer(array_int) :: species
1206
1207 species = config(site_b, site_i, site_j, site_k)
1208
1209 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1210 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1211 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1212 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1213 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1214 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1215 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1216 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1217 + bcc_shell9_energy(setup, site_b, site_i, site_j, site_k, config, species)
1218
Here is the call graph for this function:

◆ bcc_shell10_energy()

real(real64) function bw_hamiltonian::bcc_shell10_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 10th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 10th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 796 of file bw_hamiltonian.f90.

799
800 integer(array_int), dimension(:,:,:,:), intent(in) :: config
801 real(real64) :: energy
802 class(run_params), intent(in) :: setup
803 integer, intent(in) :: site_b, site_i, site_j, site_k
804 integer(array_int), intent(in) :: species
805 integer(array_int), allocatable, dimension(:) :: nbrs
806 integer :: i, up, dn, fw, bw, lt, rt, upupup, dndndn, fwfwfw, &
807 bwbwbw, ltltlt, rtrtrt, upupupupup, dndndndndn, &
808 fwfwfwfwfw, bwbwbwbwbw, ltltltltlt, rtrtrtrtrt, ib
809
810 energy=0.0_real64
811
812 up = modulo( site_i, 2*setup%n_1) + 1
813 dn = modulo(site_i-2, 2*setup%n_1) + 1
814 lt = modulo( site_j, 2*setup%n_2) + 1
815 rt = modulo(site_j-2, 2*setup%n_2) + 1
816 fw = modulo(site_k, 2*setup%n_3) + 1
817 bw = modulo(site_k-2, 2*setup%n_3) + 1
818 upupup = modulo(site_i+2, 2*setup%n_1) + 1
819 dndndn = modulo(site_i-4, 2*setup%n_1) + 1
820 ltltlt = modulo(site_j+2, 2*setup%n_2) + 1
821 rtrtrt = modulo(site_j-4, 2*setup%n_2) + 1
822 fwfwfw = modulo(site_k+2, 2*setup%n_3) + 1
823 bwbwbw = modulo(site_k-4, 2*setup%n_3) + 1
824 upupupupup = modulo(site_i+4, 2*setup%n_1) + 1
825 dndndndndn = modulo(site_i-6, 2*setup%n_1) + 1
826 ltltltltlt = modulo(site_j+4, 2*setup%n_2) + 1
827 rtrtrtrtrt = modulo(site_j-6, 2*setup%n_2) + 1
828 fwfwfwfwfw = modulo(site_k+4, 2*setup%n_3) + 1
829 bwbwbwbwbw = modulo(site_k-6, 2*setup%n_3) + 1
830
831 ! Basis index (always =1 for this lattice implementation,
832 ! but keep here for generality)
833 ib = site_b
834
835 allocate(nbrs(32))
836
837 nbrs(1) = config(ib, up, lt, fwfwfwfwfw)
838 nbrs(2) = config(ib, dn, lt, fwfwfwfwfw)
839 nbrs(3) = config(ib, up, rt, fwfwfwfwfw)
840 nbrs(4) = config(ib, dn, rt, fwfwfwfwfw)
841 nbrs(5) = config(ib, upupup, ltltlt, fwfwfw)
842 nbrs(6) = config(ib, dndndn, ltltlt, fwfwfw)
843 nbrs(7) = config(ib, upupup, rtrtrt, fwfwfw)
844 nbrs(8) = config(ib, dndndn, rtrtrt, fwfwfw)
845 nbrs(9) = config(ib, up, rtrtrtrtrt, fw)
846 nbrs(10) = config(ib, dn, rtrtrtrtrt, fw)
847 nbrs(11) = config(ib, upupupupup, rt, fw)
848 nbrs(12) = config(ib, dndndndndn, rt, fw)
849 nbrs(13) = config(ib, upupupupup, lt, fw)
850 nbrs(14) = config(ib, dndndndndn, lt, fw)
851 nbrs(15) = config(ib, up, rtrtrtrtrt, fw)
852 nbrs(16) = config(ib, dn, rtrtrtrtrt, fw)
853 nbrs(17) = config(ib, up, rtrtrtrtrt, bw)
854 nbrs(18) = config(ib, dn, rtrtrtrtrt, bw)
855 nbrs(19) = config(ib, upupupupup, rt, bw)
856 nbrs(20) = config(ib, dndndndndn, rt, bw)
857 nbrs(21) = config(ib, upupupupup, lt, bw)
858 nbrs(22) = config(ib, dndndndndn, lt, bw)
859 nbrs(23) = config(ib, up, rtrtrtrtrt, bw)
860 nbrs(24) = config(ib, dn, rtrtrtrtrt, bw)
861 nbrs(25) = config(ib, upupup, ltltlt, bwbwbw)
862 nbrs(26) = config(ib, dndndn, ltltlt, bwbwbw)
863 nbrs(27) = config(ib, upupup, rtrtrt, bwbwbw)
864 nbrs(28) = config(ib, dndndn, rtrtrt, bwbwbw)
865 nbrs(29) = config(ib, up, lt, bwbwbwbwbw)
866 nbrs(30) = config(ib, dn, lt, bwbwbwbwbw)
867 nbrs(31) = config(ib, up, rt, bwbwbwbwbw)
868 nbrs(32) = config(ib, dn, rt, bwbwbwbwbw)
869
870 ! Sum them
871 do i=1, 32
872 energy = energy + v_ex(species, nbrs(i),10)
873 end do
874
875 deallocate(nbrs)
876
Here is the caller graph for this function:

◆ bcc_shell1_energy()

real(real64) function bw_hamiltonian::bcc_shell1_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 134 of file bw_hamiltonian.f90.

137
138 integer(array_int), dimension(:,:,:,:), intent(in) :: config
139 real(real64) :: energy
140 class(run_params), intent(in) :: setup
141 integer, intent(in) :: site_b, site_i, site_j, site_k
142 integer(array_int), intent(in) :: species
143 integer(array_int), allocatable, dimension(:) :: nbrs
144 integer :: i, ip1, im1, jp1, jm1, kp1, km1, ib
145
146 energy=0.0_real64
147
148 ! Compute where my neighbours are
149 ip1 = modulo(site_i, 2*setup%n_1) + 1
150 im1 = modulo(site_i-2, 2*setup%n_1) + 1
151 jp1 = modulo(site_j, 2*setup%n_2) + 1
152 jm1 = modulo(site_j-2, 2*setup%n_2) + 1
153 kp1 = modulo(site_k, 2*setup%n_3) + 1
154 km1 = modulo(site_k-2, 2*setup%n_3) + 1
155
156 ! Basis index (always =1 for this lattice implementation,
157 ! but keep here for generality)
158 ib = site_b
159
160 allocate(nbrs(8))
161
162 nbrs(1) = config(ib, ip1, jp1, kp1)
163 nbrs(2) = config(ib, ip1, jp1, km1)
164 nbrs(3) = config(ib, ip1, jm1, kp1)
165 nbrs(4) = config(ib, ip1, jm1, km1)
166 nbrs(5) = config(ib, im1, jp1, kp1)
167 nbrs(6) = config(ib, im1, jp1, km1)
168 nbrs(7) = config(ib, im1, jm1, kp1)
169 nbrs(8) = config(ib, im1, jm1, km1)
170
171 do i=1, 8
172 energy = energy + v_ex(species, nbrs(i), 1)
173 end do
174
175 deallocate(nbrs)
176
Here is the caller graph for this function:

◆ bcc_shell2_energy()

real(real64) function bw_hamiltonian::bcc_shell2_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 197 of file bw_hamiltonian.f90.

200
201 integer(array_int), dimension(:,:,:,:), intent(in) :: config
202 real(real64) :: energy
203 class(run_params), intent(in) :: setup
204 integer, intent(in) :: site_b, site_i, site_j, site_k
205 integer(array_int), intent(in) :: species
206 integer(array_int), allocatable, dimension(:) :: nbrs
207 integer :: i, ip2, im2, jp2, jm2, kp2, km2, ib
208
209 energy=0.0_real64
210
211 ! Compute where my neighbours are
212 ip2 = modulo(site_i+1, 2*setup%n_1) + 1
213 im2 = modulo(site_i-3, 2*setup%n_1) + 1
214 jp2 = modulo(site_j+1, 2*setup%n_2) + 1
215 jm2 = modulo(site_j-3, 2*setup%n_2) + 1
216 kp2 = modulo(site_k+1, 2*setup%n_3) + 1
217 km2 = modulo(site_k-3, 2*setup%n_3) + 1
218
219 ! Basis index (always =1 for this lattice implementation,
220 ! but keep here for generality)
221 ib = site_b
222
223 allocate(nbrs(6))
224
225 nbrs(1) = config(ib, ip2, site_j , site_k )
226 nbrs(2) = config(ib, im2, site_j , site_k )
227 nbrs(3) = config(ib, site_i , jm2, site_k )
228 nbrs(4) = config(ib, site_i , jp2, site_k )
229 nbrs(5) = config(ib, site_i , site_j , kp2)
230 nbrs(6) = config(ib, site_i , site_j , km2)
231
232 do i=1, 6
233 energy = energy + v_ex(species, nbrs(i), 2)
234 end do
235
236 deallocate(nbrs)
237
Here is the caller graph for this function:

◆ bcc_shell3_energy()

real(real64) function bw_hamiltonian::bcc_shell3_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 258 of file bw_hamiltonian.f90.

261
262 integer(array_int), dimension(:,:,:,:), intent(in) :: config
263 real(real64) :: energy
264 class(run_params), intent(in) :: setup
265 integer, intent(in) :: site_b, site_i, site_j, site_k
266 integer(array_int), intent(in) :: species
267 integer(array_int), allocatable, dimension(:) :: nbrs
268 integer :: i, ip2, im2, jp2, jm2, kp2, km2, ib
269
270 energy=0.0_real64
271
272 ! Compute where my neighbours are
273 ip2 = modulo(site_i+1, 2*setup%n_1) + 1
274 im2 = modulo(site_i-3, 2*setup%n_1) + 1
275 jp2 = modulo(site_j+1, 2*setup%n_2) + 1
276 jm2 = modulo(site_j-3, 2*setup%n_2) + 1
277 kp2 = modulo(site_k+1, 2*setup%n_3) + 1
278 km2 = modulo(site_k-3, 2*setup%n_3) + 1
279
280 ! Basis index (always =1 for this lattice implementation,
281 ! but keep here for generality)
282 ib = site_b
283
284 allocate(nbrs(12))
285
286 nbrs(1) = config(ib,site_i, jm2, km2)
287 nbrs(2) = config(ib, ip2, site_j, km2)
288 nbrs(3) = config(ib, im2, site_j, km2)
289 nbrs(4) = config(ib,site_i, jp2, km2)
290 nbrs(5) = config(ib, ip2, jm2, site_k)
291 nbrs(6) = config(ib, im2, jm2, site_k)
292 nbrs(7) = config(ib, ip2, jp2, site_k)
293 nbrs(8) = config(ib, im2, jp2, site_k)
294 nbrs(9) = config(ib,site_i, jm2, kp2)
295 nbrs(10) = config(ib, ip2, site_j, kp2)
296 nbrs(11) = config(ib, im2, site_j, kp2)
297 nbrs(12) = config(ib,site_i, jp2, kp2)
298
299 do i=1, 12
300 energy = energy + v_ex(species, nbrs(i), 3)
301 end do
302
303 deallocate(nbrs)
304
Here is the caller graph for this function:

◆ bcc_shell4_energy()

real(real64) function bw_hamiltonian::bcc_shell4_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 325 of file bw_hamiltonian.f90.

328
329 integer(array_int), dimension(:,:,:,:), intent(in) :: config
330 real(real64) :: energy
331 class(run_params), intent(in) :: setup
332 integer, intent(in) :: site_b, site_i, site_j, site_k
333 integer(array_int), intent(in) :: species
334 integer(array_int), allocatable, dimension(:) :: nbrs
335 integer :: i, up, dn, fw, bw, lt, rt, upupup, dndndn, &
336 fwfwfw, bwbwbw, ltltlt, rtrtrt, ib
337
338 energy=0.0_real64
339
340 up = modulo(site_i, 2*setup%n_1) + 1
341 dn = modulo(site_i-2, 2*setup%n_1) + 1
342 lt = modulo(site_j, 2*setup%n_2) + 1
343 rt = modulo(site_j-2, 2*setup%n_2) + 1
344 fw = modulo(site_k, 2*setup%n_3) + 1
345 bw = modulo(site_k-2, 2*setup%n_3) + 1
346 up = modulo(site_i, 2*setup%n_1) + 1
347 dn = modulo(site_i-2, 2*setup%n_1) + 1
348 upupup = modulo(site_i+2, 2*setup%n_1) + 1
349 dndndn = modulo(site_i-4, 2*setup%n_1) + 1
350 ltltlt = modulo(site_j+2, 2*setup%n_2) + 1
351 rtrtrt = modulo(site_j-4, 2*setup%n_2) + 1
352 fwfwfw = modulo(site_k+2, 2*setup%n_3) + 1
353 bwbwbw = modulo(site_k-4, 2*setup%n_3) + 1
354
355 ! Basis index (always =1 for this lattice implementation,
356 ! but keep here for generality)
357 ib = site_b
358
359 allocate(nbrs(24))
360
361 nbrs(1) = config(ib, up, lt, fwfwfw)
362 nbrs(2) = config(ib, dn, lt, fwfwfw)
363 nbrs(3) = config(ib, up, rt, fwfwfw)
364 nbrs(4) = config(ib, dn, rt, fwfwfw)
365 nbrs(5) = config(ib, up, lt, bwbwbw)
366 nbrs(6) = config(ib, dn, lt, bwbwbw)
367 nbrs(7) = config(ib, up, rt, bwbwbw)
368 nbrs(8) = config(ib, dn, rt, bwbwbw)
369 nbrs(9) = config(ib, up, ltltlt, fw)
370 nbrs(10) = config(ib, dn, ltltlt, fw)
371 nbrs(11) = config(ib, up, ltltlt, bw)
372 nbrs(12) = config(ib, dn, ltltlt, bw)
373 nbrs(13) = config(ib, up, rtrtrt, fw)
374 nbrs(14) = config(ib, dn, rtrtrt, fw)
375 nbrs(15) = config(ib, up, rtrtrt, bw)
376 nbrs(16) = config(ib, dn, rtrtrt, bw)
377 nbrs(17) = config(ib, upupup, lt, fw)
378 nbrs(18) = config(ib, upupup, rt, fw)
379 nbrs(19) = config(ib, upupup, lt, bw)
380 nbrs(20) = config(ib, upupup, rt, bw)
381 nbrs(21) = config(ib, dndndn, lt, fw)
382 nbrs(22) = config(ib, dndndn, rt, fw)
383 nbrs(23) = config(ib, dndndn, lt, bw)
384 nbrs(24) = config(ib, dndndn, rt, bw)
385
386 ! Sum them
387 do i=1, 24
388 energy = energy + v_ex(species, nbrs(i),4)
389 end do
390
391 deallocate(nbrs)
392
Here is the caller graph for this function:

◆ bcc_shell5_energy()

real(real64) function bw_hamiltonian::bcc_shell5_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 413 of file bw_hamiltonian.f90.

416
417 integer(array_int), dimension(:,:,:,:), intent(in) :: config
418 real(real64) :: energy
419 class(run_params), intent(in) :: setup
420 integer, intent(in) :: site_b, site_i, site_j, site_k
421 integer(array_int), intent(in) :: species
422 integer(array_int), allocatable, dimension(:) :: nbrs
423 integer :: i, upup, dndn, fwfw, bwbw, ltlt, rtrt, ib
424
425 energy=0.0_real64
426
427 upup = modulo(site_i+1, 2*setup%n_1) + 1
428 dndn = modulo(site_i-3, 2*setup%n_1) + 1
429 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
430 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
431 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
432 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
433
434 ! Basis index (always =1 for this lattice implementation,
435 ! but keep here for generality)
436 ib = site_b
437
438 allocate(nbrs(8))
439
440 nbrs(1) = config(ib, upup, ltlt, fwfw)
441 nbrs(2) = config(ib, dndn, ltlt, fwfw)
442 nbrs(3) = config(ib, upup, rtrt, fwfw)
443 nbrs(4) = config(ib, dndn, rtrt, fwfw)
444 nbrs(5) = config(ib, upup, ltlt, bwbw)
445 nbrs(6) = config(ib, dndn, ltlt, bwbw)
446 nbrs(7) = config(ib, upup, rtrt, bwbw)
447 nbrs(8) = config(ib, dndn, rtrt, bwbw)
448
449 ! Sum them
450 do i=1, 8
451 energy = energy + v_ex(species, nbrs(i),5)
452 end do
453
454 deallocate(nbrs)
455
Here is the caller graph for this function:

◆ bcc_shell6_energy()

real(real64) function bw_hamiltonian::bcc_shell6_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 476 of file bw_hamiltonian.f90.

479
480 integer(array_int), dimension(:,:,:,:), intent(in) :: config
481 real(real64) :: energy
482 class(run_params), intent(in) :: setup
483 integer, intent(in) :: site_b, site_i, site_j, site_k
484 integer(array_int), intent(in) :: species
485 integer(array_int), allocatable, dimension(:) :: nbrs
486 integer :: i, upupupup, dndndndn, fwfwfwfw, bwbwbwbw, &
487 ltltltlt, rtrtrtrt, ib
488
489 energy=0.0_real64
490
491 upupupup = modulo(site_i+3, 2*setup%n_1) + 1
492 dndndndn = modulo(site_i-5, 2*setup%n_1) + 1
493 ltltltlt = modulo(site_j+3, 2*setup%n_2) + 1
494 rtrtrtrt = modulo(site_j-5, 2*setup%n_2) + 1
495 fwfwfwfw = modulo(site_k+3, 2*setup%n_3) + 1
496 bwbwbwbw = modulo(site_k-5, 2*setup%n_3) + 1
497
498 ! Basis index (always =1 for this lattice implementation,
499 ! but keep here for generality)
500 ib = site_b
501
502 allocate(nbrs(6))
503
504 nbrs(1) = config(ib, upupupup, site_j, site_k)
505 nbrs(2) = config(ib, dndndndn, site_j, site_k)
506 nbrs(3) = config(ib, site_i, ltltltlt, site_k)
507 nbrs(4) = config(ib, site_i, rtrtrtrt, site_k)
508 nbrs(5) = config(ib, site_i, site_j, fwfwfwfw)
509 nbrs(6) = config(ib, site_i, site_j, bwbwbwbw)
510
511 ! Sum them
512 do i=1, 6
513 energy = energy + v_ex(species, nbrs(i),6)
514 end do
515
516 deallocate(nbrs)
517
Here is the caller graph for this function:

◆ bcc_shell7_energy()

real(real64) function bw_hamiltonian::bcc_shell7_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 7th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 7th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 538 of file bw_hamiltonian.f90.

541
542 integer(array_int), dimension(:,:,:,:), intent(in) :: config
543 real(real64) :: energy
544 class(run_params), intent(in) :: setup
545 integer, intent(in) :: site_b, site_i, site_j, site_k
546 integer(array_int), intent(in) :: species
547 integer(array_int), allocatable, dimension(:) :: nbrs
548 integer :: i, up, dn, fw, bw, lt, rt, upupup, dndndn, &
549 fwfwfw, bwbwbw, ltltlt, rtrtrt, ib
550
551 energy=0.0_real64
552
553 up = modulo(site_i, 2*setup%n_1) + 1
554 dn = modulo(site_i-2, 2*setup%n_1) + 1
555 lt = modulo(site_j, 2*setup%n_2) + 1
556 rt = modulo(site_j-2, 2*setup%n_2) + 1
557 fw = modulo(site_k, 2*setup%n_3) + 1
558 bw = modulo(site_k-2, 2*setup%n_3) + 1
559 upupup = modulo(site_i+2, 2*setup%n_1) + 1
560 dndndn = modulo(site_i-4, 2*setup%n_1) + 1
561 ltltlt = modulo(site_j+2, 2*setup%n_2) + 1
562 rtrtrt = modulo(site_j-4, 2*setup%n_2) + 1
563 fwfwfw = modulo(site_k+2, 2*setup%n_3) + 1
564 bwbwbw = modulo(site_k-4, 2*setup%n_3) + 1
565
566 ! Basis index (always =1 for this lattice implementation,
567 ! but keep here for generality)
568 ib = site_b
569
570 allocate(nbrs(24))
571
572 nbrs(1) = config(ib, up, ltltlt, fwfwfw)
573 nbrs(2) = config(ib, dn, ltltlt, fwfwfw)
574 nbrs(3) = config(ib, upupup, lt, fwfwfw)
575 nbrs(4) = config(ib, dndndn, lt, fwfwfw)
576 nbrs(5) = config(ib, upupup, rt, fwfwfw)
577 nbrs(6) = config(ib, dndndn, rt, fwfwfw)
578 nbrs(7) = config(ib, up, rtrtrt, fwfwfw)
579 nbrs(8) = config(ib, dn, rtrtrt, fwfwfw)
580 nbrs(9) = config(ib, upupup, ltltlt, fw)
581 nbrs(10) = config(ib, dndndn, ltltlt, fw)
582 nbrs(11) = config(ib, upupup, rtrtrt, fw)
583 nbrs(12) = config(ib, dndndn, rtrtrt, fw)
584 nbrs(13) = config(ib, upupup, ltltlt, bw)
585 nbrs(14) = config(ib, dndndn, ltltlt, bw)
586 nbrs(15) = config(ib, upupup, rtrtrt, bw)
587 nbrs(16) = config(ib, dndndn, rtrtrt, bw)
588 nbrs(17) = config(ib, up, ltltlt, bwbwbw)
589 nbrs(18) = config(ib, dn, ltltlt, bwbwbw)
590 nbrs(19) = config(ib, upupup, lt, bwbwbw)
591 nbrs(20) = config(ib, dndndn, lt, bwbwbw)
592 nbrs(21) = config(ib, upupup, rt, bwbwbw)
593 nbrs(22) = config(ib, dndndn, rt, bwbwbw)
594 nbrs(23) = config(ib, up, rtrtrt, bwbwbw)
595 nbrs(24) = config(ib, dn, rtrtrt, bwbwbw)
596
597 ! Sum them
598 do i=1, 24
599 energy = energy + v_ex(species, nbrs(i),7)
600 end do
601
602 deallocate(nbrs)
603
Here is the caller graph for this function:

◆ bcc_shell8_energy()

real(real64) function bw_hamiltonian::bcc_shell8_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 8th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 8th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 624 of file bw_hamiltonian.f90.

627
628 integer(array_int), dimension(:,:,:,:), intent(in) :: config
629 real(real64) :: energy
630 class(run_params), intent(in) :: setup
631 integer, intent(in) :: site_b, site_i, site_j, site_k
632 integer(array_int), intent(in) :: species
633 integer(array_int), allocatable, dimension(:) :: nbrs
634 integer :: i, upup, dndn, fwfw, bwbw, ltlt, rtrt, upupupup, &
635 dndndndn, fwfwfwfw, bwbwbwbw, ltltltlt, rtrtrtrt, ib
636
637 energy=0.0_real64
638
639 upup = modulo(site_i+1, 2*setup%n_1) + 1
640 dndn = modulo(site_i-3, 2*setup%n_1) + 1
641 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
642 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
643 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
644 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
645 upupupup = modulo(site_i+3, 2*setup%n_1) + 1
646 dndndndn = modulo(site_i-5, 2*setup%n_1) + 1
647 ltltltlt = modulo(site_j+3, 2*setup%n_2) + 1
648 rtrtrtrt = modulo(site_j-5, 2*setup%n_2) + 1
649 fwfwfwfw = modulo(site_k+3, 2*setup%n_3) + 1
650 bwbwbwbw = modulo(site_k-5, 2*setup%n_3) + 1
651
652 ! Basis index (always =1 for this lattice implementation,
653 ! but keep here for generality)
654 ib = site_b
655
656 allocate(nbrs(24))
657
658 nbrs(1) = config(ib, site_i, ltlt, fwfwfwfw)
659 nbrs(2) = config(ib, upup, site_j, fwfwfwfw)
660 nbrs(3) = config(ib, dndn, site_j, fwfwfwfw)
661 nbrs(4) = config(ib, site_i, rtrt, fwfwfwfw)
662 nbrs(5) = config(ib, site_i, ltltltlt, fwfw)
663 nbrs(6) = config(ib, dndndndn, site_j, fwfw)
664 nbrs(7) = config(ib, upupupup, site_j, fwfw)
665 nbrs(8) = config(ib, site_i, rtrtrtrt, fwfw)
666 nbrs(9) = config(ib, upup, ltltltlt, site_k)
667 nbrs(10) = config(ib, dndn, ltltltlt, site_k)
668 nbrs(11) = config(ib, upupupup, ltlt, site_k)
669 nbrs(12) = config(ib, dndndndn, ltlt, site_k)
670 nbrs(13) = config(ib, upupupup, rtrt, site_k)
671 nbrs(14) = config(ib, dndndndn, rtrt, site_k)
672 nbrs(15) = config(ib, site_i, ltltltlt, site_k)
673 nbrs(16) = config(ib, dndndndn, site_j, site_k)
674 nbrs(17) = config(ib, site_i, ltltltlt, bwbw)
675 nbrs(18) = config(ib, dndndndn, site_j, bwbw)
676 nbrs(19) = config(ib, upupupup, site_j, bwbw)
677 nbrs(20) = config(ib, site_i, rtrtrtrt, bwbw)
678 nbrs(21) = config(ib, site_i, ltlt, bwbwbwbw)
679 nbrs(22) = config(ib, upup, site_j, bwbwbwbw)
680 nbrs(23) = config(ib, dndn, site_j, bwbwbwbw)
681 nbrs(24) = config(ib, site_i, rtrt, bwbwbwbw)
682
683 ! Sum them
684 do i=1, 24
685 energy = energy + v_ex(species, nbrs(i),8)
686 end do
687
688 deallocate(nbrs)
689
Here is the caller graph for this function:

◆ bcc_shell9_energy()

real(real64) function bw_hamiltonian::bcc_shell9_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 9th-nearest neighbours on the bcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 9th-nearest neighbours on the bcc lattice (cubic representation)

Definition at line 710 of file bw_hamiltonian.f90.

713
714 integer(array_int), dimension(:,:,:,:), intent(in) :: config
715 real(real64) :: energy
716 class(run_params), intent(in) :: setup
717 integer, intent(in) :: site_b, site_i, site_j, site_k
718 integer(array_int), intent(in) :: species
719 integer(array_int), allocatable, dimension(:) :: nbrs
720 integer :: i, upup, dndn, fwfw, bwbw, ltlt, rtrt, upupupup, &
721 dndndndn, fwfwfwfw, bwbwbwbw, ltltltlt, rtrtrtrt, ib
722
723 energy=0.0_real64
724
725 upup = modulo(site_i+1, 2*setup%n_1) + 1
726 dndn = modulo(site_i-3, 2*setup%n_1) + 1
727 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
728 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
729 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
730 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
731 upupupup = modulo(site_i+3, 2*setup%n_1) + 1
732 dndndndn = modulo(site_i-5, 2*setup%n_1) + 1
733 ltltltlt = modulo(site_j+3, 2*setup%n_2) + 1
734 rtrtrtrt = modulo(site_j-5, 2*setup%n_2) + 1
735 fwfwfwfw = modulo(site_k+3, 2*setup%n_3) + 1
736 bwbwbwbw = modulo(site_k-5, 2*setup%n_3) + 1
737
738 ! Basis index (always =1 for this lattice implementation,
739 ! but keep here for generality)
740 ib = site_b
741
742 allocate(nbrs(24))
743
744 nbrs(1) = config(ib, upup, ltlt, fwfwfwfw)
745 nbrs(2) = config(ib, dndn, ltlt, fwfwfwfw)
746 nbrs(3) = config(ib, upup, rtrt, fwfwfwfw)
747 nbrs(4) = config(ib, dndn, rtrt, fwfwfwfw)
748 nbrs(5) = config(ib, upup, ltltltlt, fwfw)
749 nbrs(6) = config(ib, dndn, ltltltlt, fwfw)
750 nbrs(7) = config(ib, upupupup, ltlt, fwfw)
751 nbrs(8) = config(ib, dndndndn, ltlt, fwfw)
752 nbrs(9) = config(ib, upupupup, rtrt, fwfw)
753 nbrs(10) = config(ib, dndndndn, rtrt, fwfw)
754 nbrs(11) = config(ib, upup, rtrtrtrt, fwfw)
755 nbrs(12) = config(ib, dndn, rtrtrtrt, fwfw)
756 nbrs(13) = config(ib, upup, ltltltlt, bwbw)
757 nbrs(14) = config(ib, dndn, ltltltlt, bwbw)
758 nbrs(15) = config(ib, upupupup, ltlt, bwbw)
759 nbrs(16) = config(ib, dndndndn, ltlt, bwbw)
760 nbrs(17) = config(ib, upupupup, rtrt, bwbw)
761 nbrs(18) = config(ib, dndndndn, rtrt, bwbw)
762 nbrs(19) = config(ib, upup, rtrtrtrt, bwbw)
763 nbrs(20) = config(ib, dndn, rtrtrtrt, bwbw)
764 nbrs(21) = config(ib, upup, ltlt, bwbwbwbw)
765 nbrs(22) = config(ib, dndn, ltlt, bwbwbwbw)
766 nbrs(23) = config(ib, upup, rtrt, bwbwbwbw)
767 nbrs(24) = config(ib, dndn, rtrt, bwbwbwbw)
768
769 ! Sum them
770 do i=1, 24
771 energy = energy + v_ex(species, nbrs(i),9)
772 end do
773
774 deallocate(nbrs)
775
Here is the caller graph for this function:

◆ fcc_energy_1shells()

real(real64) function, public bw_hamiltonian::fcc_energy_1shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1712 of file bw_hamiltonian.f90.

1714
1715 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1716 real(real64) :: energy
1717 class(run_params), intent(in) :: setup
1718 integer, intent(in) :: site_b, site_i, site_j, site_k
1719 integer(array_int) :: species
1720
1721 species = config(site_b, site_i, site_j, site_k)
1722
1723 energy= fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species)
1724
Here is the call graph for this function:

◆ fcc_energy_2shells()

real(real64) function, public bw_hamiltonian::fcc_energy_2shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1746 of file bw_hamiltonian.f90.

1748
1749 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1750 real(real64) :: energy
1751 class(run_params), intent(in) :: setup
1752 integer, intent(in) :: site_b, site_i, site_j, site_k
1753 integer(array_int) :: species
1754
1755 species = config(site_b, site_i, site_j, site_k)
1756
1757 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1758 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species)
1759
Here is the call graph for this function:

◆ fcc_energy_3shells()

real(real64) function, public bw_hamiltonian::fcc_energy_3shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 3rd-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1781 of file bw_hamiltonian.f90.

1783
1784 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1785 real(real64) :: energy
1786 class(run_params), intent(in) :: setup
1787 integer, intent(in) :: site_b, site_i, site_j, site_k
1788 integer(array_int) :: species
1789
1790 species = config(site_b, site_i, site_j, site_k)
1791
1792 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1793 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1794 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species)
1795
Here is the call graph for this function:

◆ fcc_energy_4shells()

real(real64) function, public bw_hamiltonian::fcc_energy_4shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 4th-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1817 of file bw_hamiltonian.f90.

1819
1820 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1821 real(real64) :: energy
1822 class(run_params), intent(in) :: setup
1823 integer, intent(in) :: site_b, site_i, site_j, site_k
1824 integer(array_int) :: species
1825
1826 species = config(site_b, site_i, site_j, site_k)
1827
1828 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1829 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1830 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1831 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species)
1832
Here is the call graph for this function:

◆ fcc_energy_5shells()

real(real64) function, public bw_hamiltonian::fcc_energy_5shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 5th-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1854 of file bw_hamiltonian.f90.

1856
1857 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1858 real(real64) :: energy
1859 class(run_params), intent(in) :: setup
1860 integer, intent(in) :: site_b, site_i, site_j, site_k
1861 integer(array_int) :: species
1862
1863 species = config(site_b, site_i, site_j, site_k)
1864
1865 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1866 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1867 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1868 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1869 + fcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species)
1870
Here is the call graph for this function:

◆ fcc_energy_6shells()

real(real64) function, public bw_hamiltonian::fcc_energy_6shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 6th-nearest neighbours on the fcc lattice (cubic representation).

Definition at line 1892 of file bw_hamiltonian.f90.

1894
1895 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1896 real(real64) :: energy
1897 class(run_params), intent(in) :: setup
1898 integer, intent(in) :: site_b, site_i, site_j, site_k
1899 integer(array_int) :: species
1900
1901 species = config(site_b, site_i, site_j, site_k)
1902
1903 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1904 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1905 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1906 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1907 + fcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1908 + fcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species)
1909
Here is the call graph for this function:

◆ fcc_shell1_energy()

real(real64) function bw_hamiltonian::fcc_shell1_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1282 of file bw_hamiltonian.f90.

1285
1286 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1287 real(real64) :: energy
1288 class(run_params), intent(in) :: setup
1289 integer, intent(in) :: site_b, site_i, site_j, site_k
1290 integer(array_int), intent(in) :: species
1291 integer(array_int), allocatable, dimension(:) :: nbrs
1292 integer :: i, up, dn, fw, bw, lt, rt, ib
1293
1294 energy=0.0_real64
1295
1296 ! Compute where my neighbours are
1297 up = modulo(site_i, 2*setup%n_1) + 1
1298 dn = modulo(site_i-2, 2*setup%n_1) + 1
1299 lt = modulo(site_j, 2*setup%n_2) + 1
1300 rt = modulo(site_j-2, 2*setup%n_2) + 1
1301 fw = modulo(site_k, 2*setup%n_3) + 1
1302 bw = modulo(site_k-2, 2*setup%n_3) + 1
1303
1304 ! Basis index (always =1 for this lattice implementation,
1305 ! but keep here for generality)
1306 ib = site_b
1307
1308 allocate(nbrs(12))
1309
1310 nbrs(1) = config(ib, site_i, rt, fw)
1311 nbrs(2) = config(ib, site_i, rt, bw)
1312 nbrs(3) = config(ib, site_i, lt, fw)
1313 nbrs(4) = config(ib, site_i, lt, bw)
1314 nbrs(5) = config(ib, up, rt, site_k)
1315 nbrs(6) = config(ib, up, lt, site_k)
1316 nbrs(7) = config(ib, up, site_j, fw)
1317 nbrs(8) = config(ib, up, site_j, bw)
1318 nbrs(9) = config(ib, dn, rt, site_k)
1319 nbrs(10) = config(ib, dn, lt, site_k)
1320 nbrs(11) = config(ib, dn, site_j, fw)
1321 nbrs(12) = config(ib, dn, site_j, bw)
1322
1323 do i=1, 12
1324 energy = energy + v_ex(species, nbrs(i), 1)
1325 end do
1326
1327 deallocate(nbrs)
1328
Here is the caller graph for this function:

◆ fcc_shell2_energy()

real(real64) function bw_hamiltonian::fcc_shell2_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1349 of file bw_hamiltonian.f90.

1352
1353 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1354 real(real64) :: energy
1355 class(run_params), intent(in) :: setup
1356 integer, intent(in) :: site_b, site_i, site_j, site_k
1357 integer(array_int), intent(in) :: species
1358 integer(array_int), allocatable, dimension(:) :: nbrs
1359 integer :: i
1360 integer :: upup, dndn, fwfw, bwbw, ltlt, rtrt, ib
1361
1362 energy=0.0_real64
1363
1364 upup = modulo(site_i+1, 2*setup%n_1) + 1
1365 dndn = modulo(site_i-3, 2*setup%n_1) + 1
1366 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
1367 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
1368 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
1369 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
1370
1371 ! Basis index (always =1 for this lattice implementation,
1372 ! but keep here for generality)
1373 ib = site_b
1374
1375 allocate(nbrs(6))
1376
1377 nbrs(1) = config(ib, upup, site_j, site_k)
1378 nbrs(2) = config(ib, dndn, site_j, site_k)
1379 nbrs(3) = config(ib, site_i, ltlt, site_k)
1380 nbrs(4) = config(ib, site_i, rtrt, site_k)
1381 nbrs(5) = config(ib, site_i, site_j, fwfw)
1382 nbrs(6) = config(ib, site_i, site_j, bwbw)
1383
1384 do i=1, 6
1385 energy = energy + v_ex(species, nbrs(i), 2)
1386 end do
1387
1388 deallocate(nbrs)
1389
Here is the caller graph for this function:

◆ fcc_shell3_energy()

real(real64) function bw_hamiltonian::fcc_shell3_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 3rd-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1410 of file bw_hamiltonian.f90.

1413
1414 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1415 real(real64) :: energy
1416 class(run_params), intent(in) :: setup
1417 integer, intent(in) :: site_b, site_i, site_j, site_k
1418 integer(array_int), intent(in) :: species
1419 integer(array_int), allocatable, dimension(:) :: nbrs
1420 integer :: i, up, dn, fw, bw, lt, rt
1421 integer :: upup, dndn, fwfw, bwbw, ltlt, rtrt, ib
1422
1423 energy=0.0_real64
1424
1425 up = modulo(site_i, 2*setup%n_1) + 1
1426 dn = modulo(site_i-2, 2*setup%n_1) + 1
1427 lt = modulo(site_j, 2*setup%n_2) + 1
1428 rt = modulo(site_j-2, 2*setup%n_2) + 1
1429 fw = modulo(site_k, 2*setup%n_3) + 1
1430 bw = modulo(site_k-2, 2*setup%n_3) + 1
1431
1432 upup = modulo(site_i+1, 2*setup%n_1) + 1
1433 dndn = modulo(site_i-3, 2*setup%n_1) + 1
1434 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
1435 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
1436 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
1437 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
1438
1439 ! Basis index (always =1 for this lattice implementation,
1440 ! but keep here for generality)
1441 ib = site_b
1442
1443 allocate(nbrs(24))
1444
1445 nbrs(1) = config(ib, dndn, lt, fw)
1446 nbrs(2) = config(ib, dndn, lt, bw)
1447 nbrs(3) = config(ib, dndn, rt, fw)
1448 nbrs(4) = config(ib, dndn, rt, bw)
1449 nbrs(5) = config(ib, upup, lt, fw)
1450 nbrs(6) = config(ib, upup, lt, bw)
1451 nbrs(7) = config(ib, upup, rt, fw)
1452 nbrs(8) = config(ib, upup, rt, bw)
1453 nbrs(9) = config(ib, up, ltlt, fw)
1454 nbrs(10) = config(ib, dn, ltlt, fw)
1455 nbrs(11) = config(ib, up, ltlt, bw)
1456 nbrs(12) = config(ib, dn, ltlt, bw)
1457 nbrs(13) = config(ib, up, rtrt, fw)
1458 nbrs(14) = config(ib, dn, rtrt, fw)
1459 nbrs(15) = config(ib, up, rtrt, bw)
1460 nbrs(16) = config(ib, dn, rtrt, bw)
1461 nbrs(17) = config(ib, up, lt, fwfw)
1462 nbrs(18) = config(ib, dn, lt, fwfw)
1463 nbrs(19) = config(ib, up, rt, fwfw)
1464 nbrs(20) = config(ib, dn, rt, fwfw)
1465 nbrs(21) = config(ib, up, lt, bwbw)
1466 nbrs(22) = config(ib, dn, lt, bwbw)
1467 nbrs(23) = config(ib, up, rt, bwbw)
1468 nbrs(24) = config(ib, dn, rt, bwbw)
1469
1470 do i=1, 24
1471 energy = energy + v_ex(species, nbrs(i), 3)
1472 end do
1473
1474 deallocate(nbrs)
1475
Here is the caller graph for this function:

◆ fcc_shell4_energy()

real(real64) function bw_hamiltonian::fcc_shell4_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 4th-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1496 of file bw_hamiltonian.f90.

1499
1500 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1501 real(real64) :: energy
1502 class(run_params), intent(in) :: setup
1503 integer, intent(in) :: site_b, site_i, site_j, site_k
1504 integer(array_int), intent(in) :: species
1505 integer(array_int), allocatable, dimension(:) :: nbrs
1506 integer :: i
1507 integer :: upup, dndn, fwfw, bwbw, ltlt, rtrt, ib
1508
1509 energy=0.0_real64
1510
1511 upup = modulo(site_i+1, 2*setup%n_1) + 1
1512 dndn = modulo(site_i-3, 2*setup%n_1) + 1
1513 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
1514 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
1515 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
1516 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
1517
1518 ! Basis index (always =1 for this lattice implementation,
1519 ! but keep here for generality)
1520 ib = site_b
1521
1522 allocate(nbrs(12))
1523
1524 nbrs(1) = config(ib, upup, site_j, bwbw)
1525 nbrs(2) = config(ib, dndn, site_j, bwbw)
1526 nbrs(3) = config(ib, site_i, ltlt, bwbw)
1527 nbrs(4) = config(ib, site_i, rtrt, bwbw)
1528 nbrs(5) = config(ib, upup, ltlt, site_k)
1529 nbrs(6) = config(ib, dndn, ltlt, site_k)
1530 nbrs(7) = config(ib, upup, rtrt, site_k)
1531 nbrs(8) = config(ib, dndn, rtrt, site_k)
1532 nbrs(9) = config(ib, upup, site_j, fwfw)
1533 nbrs(10) = config(ib, dndn, site_j, fwfw)
1534 nbrs(11) = config(ib, site_i, ltlt, fwfw)
1535 nbrs(12) = config(ib, site_i, rtrt, fwfw)
1536
1537 do i=1, 12
1538 energy = energy + v_ex(species, nbrs(i), 4)
1539 end do
1540
1541 deallocate(nbrs)
1542
Here is the caller graph for this function:

◆ fcc_shell5_energy()

real(real64) function bw_hamiltonian::fcc_shell5_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 5th-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1563 of file bw_hamiltonian.f90.

1566
1567 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1568 real(real64) :: energy
1569 class(run_params), intent(in) :: setup
1570 integer, intent(in) :: site_b, site_i, site_j, site_k
1571 integer(array_int), intent(in) :: species
1572 integer(array_int), allocatable, dimension(:) :: nbrs
1573 integer :: i, up, dn, fw, bw, lt, rt
1574 integer :: upupup, dndndn, fwfwfw, bwbwbw, ltltlt, rtrtrt, ib
1575
1576 energy=0.0_real64
1577
1578 up = modulo(site_i, 2*setup%n_1) + 1
1579 dn = modulo(site_i-2, 2*setup%n_1) + 1
1580 lt = modulo(site_j, 2*setup%n_2) + 1
1581 rt = modulo(site_j-2, 2*setup%n_2) + 1
1582 fw = modulo(site_k, 2*setup%n_3) + 1
1583 bw = modulo(site_k-2, 2*setup%n_3) + 1
1584
1585 upupup = modulo(site_i+2, 2*setup%n_1) + 1
1586 dndndn = modulo(site_i-4, 2*setup%n_1) + 1
1587 ltltlt = modulo(site_j+2, 2*setup%n_2) + 1
1588 rtrtrt = modulo(site_j-4, 2*setup%n_2) + 1
1589 fwfwfw = modulo(site_k+2, 2*setup%n_3) + 1
1590 bwbwbw = modulo(site_k-4, 2*setup%n_3) + 1
1591
1592 ! Basis index (always =1 for this lattice implementation,
1593 ! but keep here for generality)
1594 ib = site_b
1595
1596 allocate(nbrs(24))
1597
1598 nbrs(1) = config(ib, up, site_j, bwbwbw)
1599 nbrs(2) = config(ib, dn, site_j, bwbwbw)
1600 nbrs(3) = config(ib, site_i, rt, bwbwbw)
1601 nbrs(4) = config(ib, site_i, lt, bwbwbw)
1602 nbrs(5) = config(ib, site_i, ltltlt, bw)
1603 nbrs(6) = config(ib, upupup, site_j, bw)
1604 nbrs(7) = config(ib, dndndn, site_j, bw)
1605 nbrs(8) = config(ib, site_i, rtrtrt, bw)
1606 nbrs(9) = config(ib, up, ltltlt, site_k)
1607 nbrs(10) = config(ib, dn, ltltlt, site_k)
1608 nbrs(11) = config(ib, upupup, lt, site_k)
1609 nbrs(12) = config(ib, dndndn, lt, site_k)
1610 nbrs(13) = config(ib, upupup, rt, site_k)
1611 nbrs(14) = config(ib, dndndn, rt, site_k)
1612 nbrs(15) = config(ib, up, rtrtrt, site_k)
1613 nbrs(16) = config(ib, dn, rtrtrt, site_k)
1614 nbrs(17) = config(ib, site_i, ltltlt, fw)
1615 nbrs(18) = config(ib, upupup, site_j, fw)
1616 nbrs(19) = config(ib, dndndn, site_j, fw)
1617 nbrs(20) = config(ib, site_i, rtrtrt, fw)
1618 nbrs(21) = config(ib, up, site_j, fwfwfw)
1619 nbrs(22) = config(ib, dn, site_j, fwfwfw)
1620 nbrs(23) = config(ib, site_i, rt, fwfwfw)
1621 nbrs(24) = config(ib, site_i, lt, fwfwfw)
1622
1623 do i=1, 24
1624 energy = energy + v_ex(species, nbrs(i), 5)
1625 end do
1626
1627 deallocate(nbrs)
1628
Here is the caller graph for this function:

◆ fcc_shell6_energy()

real(real64) function bw_hamiltonian::fcc_shell6_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int), intent(in) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the fcc lattice (cubic representation)

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 6th-nearest neighbours on the fcc lattice (cubic representation)

Definition at line 1649 of file bw_hamiltonian.f90.

1652
1653 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1654 real(real64) :: energy
1655 class(run_params), intent(in) :: setup
1656 integer, intent(in) :: site_b, site_i, site_j, site_k
1657 integer(array_int), intent(in) :: species
1658 integer(array_int), allocatable, dimension(:) :: nbrs
1659 integer :: i, upup, dndn, fwfw, bwbw, ltlt, rtrt, ib
1660
1661 energy=0.0_real64
1662
1663 upup = modulo(site_i+1, 2*setup%n_1) + 1
1664 dndn = modulo(site_i-3, 2*setup%n_1) + 1
1665 ltlt = modulo(site_j+1, 2*setup%n_2) + 1
1666 rtrt = modulo(site_j-3, 2*setup%n_2) + 1
1667 fwfw = modulo(site_k+1, 2*setup%n_3) + 1
1668 bwbw = modulo(site_k-3, 2*setup%n_3) + 1
1669
1670 ! Basis index (always =1 for this lattice implementation,
1671 ! but keep here for generality)
1672 ib = site_b
1673
1674 allocate(nbrs(8))
1675
1676 nbrs(1) = config(ib, upup, ltlt, bwbw)
1677 nbrs(2) = config(ib, dndn, ltlt, bwbw)
1678 nbrs(3) = config(ib, upup, rtrt, bwbw)
1679 nbrs(4) = config(ib, dndn, rtrt, bwbw)
1680 nbrs(5) = config(ib, upup, ltlt, fwfw)
1681 nbrs(6) = config(ib, dndn, ltlt, fwfw)
1682 nbrs(7) = config(ib, upup, rtrt, fwfw)
1683 nbrs(8) = config(ib, dndn, rtrt, fwfw)
1684
1685 do i=1, 8
1686 energy = energy + v_ex(species, nbrs(i), 6)
1687 end do
1688
1689 deallocate(nbrs)
1690
Here is the caller graph for this function:

◆ pair_energy()

real(real64) function, public bw_hamiltonian::pair_energy ( type(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, dimension(4), intent(in) idx1,
integer, dimension(4), intent(in) idx2 )

Function to compute the contribution to the simulation energy of a simulation from a selected pair of atoms.

This routine should be used when evaluating a change in energy due to a swap of a pair of atoms.

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
configCurrent atomic configuration
idx1Indices of the first atom in the pair
idx2Indices of the second atom in the pair
Returns
The contribution made by the pair of atoms to the total energy of the simulation configuration

Definition at line 99 of file bw_hamiltonian.f90.

101
102 integer(array_int), dimension(:,:,:,:), intent(in) :: config
103 type(run_params), intent(in) :: setup
104 integer, dimension(4), intent(in) :: idx1, idx2
105 real(real64) :: energy
106
107 ! The function nbr_energy will only evaluate the portion of the
108 ! energy coming from the atoms around a site interacting with the
109 ! atom on that site. There is NO factor of 1/2 because there is no
110 ! double-counting in this routine.
111 energy = setup%nbr_energy(config, idx1(1), idx1(2), idx1(3), idx1(4)) &
112 + setup%nbr_energy(config, idx2(1), idx2(2), idx2(3), idx2(4))
113
Here is the caller graph for this function:

◆ simple_cubic_1shell_energy()

real(real64) function bw_hamiltonian::simple_cubic_1shell_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the simple cubic lattice.

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 1st-nearest neighbours on the simple cubic lattice

Definition at line 1930 of file bw_hamiltonian.f90.

1932
1933 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1934 real(real64) :: energy
1935 class(run_params), intent(in) :: setup
1936 integer, intent(in) :: site_b, site_i, site_j, site_k
1937 integer(array_int) :: species
1938 integer(array_int), allocatable, dimension(:) :: nbrs
1939 integer :: i, up, dn, fw, bw, lt, rt, ib
1940
1941 energy=0.0_real64
1942
1943 ! Compute where my neighbours are
1944 up = modulo( site_i, setup%n_1) + 1
1945 dn = modulo(site_i-2, setup%n_1) + 1
1946 lt = modulo( site_j, setup%n_2) + 1
1947 rt = modulo(site_j-2, setup%n_2) + 1
1948 fw = modulo( site_k, setup%n_3) + 1
1949 bw = modulo(site_k-2, setup%n_3) + 1
1950
1951 ! Basis index (always =1 for this lattice implementation,
1952 ! but keep here for generality)
1953 ib = site_b
1954
1955 allocate(nbrs(6))
1956
1957 ! Compute the energies of neighbours
1958 nbrs(1) = config(ib, up, site_j, site_k)
1959 nbrs(2) = config(ib, dn, site_j, site_k)
1960 nbrs(3) = config(ib,site_i, lt, site_k)
1961 nbrs(4) = config(ib,site_i, rt, site_k)
1962 nbrs(5) = config(ib,site_i, site_j, fw)
1963 nbrs(6) = config(ib,site_i, site_j, bw)
1964
1965 ! Sum them
1966 do i=1, 6
1967 energy = energy + v_ex(species, nbrs(i),1)
1968 end do
1969
1970 deallocate(nbrs)
1971
Here is the caller graph for this function:

◆ simple_cubic_2shell_energy()

real(real64) function bw_hamiltonian::simple_cubic_2shell_energy ( class(run_params), intent(in) setup,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer(array_int) species )
private

Function to compute the contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the simple cubic lattice.

Author
C. D. Woodgate
Date
2019-2026
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with its 2nd-nearest neighbours on the simple cubic lattice

Definition at line 1992 of file bw_hamiltonian.f90.

1994 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1995 real(real64) :: energy
1996 class(run_params), intent(in) :: setup
1997 integer, intent(in) :: site_b, site_i, site_j, site_k
1998 integer(array_int) :: species
1999 integer(array_int), allocatable, dimension(:) :: nbrs
2000 integer :: i, up, dn, fw, bw, lt, rt, ib
2001
2002 energy=0.0_real64
2003
2004 ! Compute where my neighbours are
2005 up = modulo( site_i, setup%n_1) + 1
2006 dn = modulo(site_i-2, setup%n_1) + 1
2007 lt = modulo( site_j, setup%n_2) + 1
2008 rt = modulo(site_j-2, setup%n_2) + 1
2009 fw = modulo( site_k, setup%n_3) + 1
2010 bw = modulo(site_k-2, setup%n_3) + 1
2011
2012 ! Basis index (always =1 for this lattice implementation,
2013 ! but keep here for generality)
2014 ib = site_b
2015
2016 allocate(nbrs(12))
2017
2018 ! Compute the energies of neighbours
2019 nbrs(1) = config(ib,site_i, lt, bw)
2020 nbrs(2) = config(ib, dn, site_j, bw)
2021 nbrs(3) = config(ib, up, site_j, bw)
2022 nbrs(4) = config(ib,site_i, rt, bw)
2023 nbrs(5) = config(ib, up, lt, site_k)
2024 nbrs(6) = config(ib, dn, lt, site_k)
2025 nbrs(7) = config(ib, up, rt, site_k)
2026 nbrs(8) = config(ib, dn, rt, site_k)
2027 nbrs(9) = config(ib,site_i, lt, fw)
2028 nbrs(10) = config(ib, dn, site_j, fw)
2029 nbrs(11) = config(ib, up, site_j, fw)
2030 nbrs(12) = config(ib,site_i, rt, fw)
2031
2032 ! Sum them
2033 do i=1, 12
2034 energy = energy + v_ex(species, nbrs(i),2)
2035 end do
2036
2037 deallocate(nbrs)
Here is the caller graph for this function:

◆ simple_cubic_energy_1shells()

real(real64) function, public bw_hamiltonian::simple_cubic_energy_1shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the simple cubic lattice.

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 1st-nearest neighbours on the simple cubic lattice

Definition at line 2059 of file bw_hamiltonian.f90.

2061
2062 integer(array_int), dimension(:,:,:,:), intent(in) :: config
2063 real(real64) :: energy
2064 class(run_params), intent(in) :: setup
2065 integer, intent(in) :: site_b, site_i, site_j, site_k
2066 integer(array_int) :: species
2067
2068 species = config(site_b, site_i, site_j, site_k)
2069
2070 energy = simple_cubic_1shell_energy(setup, site_b, site_i, site_j, site_k, config, species)
2071
Here is the call graph for this function:

◆ simple_cubic_energy_2shells()

real(real64) function, public bw_hamiltonian::simple_cubic_energy_2shells ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config,
integer, intent(in) site_b,
integer, intent(in) site_i,
integer, intent(in) site_j,
integer, intent(in) site_k )

Function to compute the contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the simple cubic lattice.

Author
C. D. Woodgate
Date
2019-2026
Parameters
setupDerived type containing simulation parameters
site_bBasis index (always =1 for this lattice)
site_iLattice vector index 1
site_jLattice vector index 2
site_kLattice vector index 3
configCurrent atomic configuration
species
Returns
The contribution to the simulation energy made by an atom interacting with atoms up to and including its 2nd-nearest neighbours on the simple cubic lattice

Definition at line 2093 of file bw_hamiltonian.f90.

2095 integer(array_int), dimension(:,:,:,:), intent(in) :: config
2096 real(real64) :: energy
2097 class(run_params), intent(in) :: setup
2098 integer, intent(in) :: site_b, site_i, site_j, site_k
2099 integer(array_int) :: species
2100
2101 species = config(site_b, site_i, site_j, site_k)
2102
2103 energy = simple_cubic_1shell_energy(setup, site_b, site_i, site_j, site_k, config, species) &
2104 + simple_cubic_2shell_energy(setup, site_b, site_i, site_j, site_k, config, species)
2105
Here is the call graph for this function:

◆ total_energy()

real(real64) function, public bw_hamiltonian::total_energy ( class(run_params), intent(in) setup,
integer(array_int), dimension(:,:,:,:), intent(in) config )

Function to compute the total energy of a simulation configuration.

This should only be called when you need a total energy evaluation. Otherwise it is possible to just evaluate the energy associated with swapping pairs of atoms in the simulation cell.

Author
C. D. Woodgate
Date
2019-2025
Parameters
setupDerived type containing simulation parameters
configCurrent atomic configuration
Returns
The total energy of the simulation configuration

Definition at line 58 of file bw_hamiltonian.f90.

59
60 integer(array_int), dimension(:,:,:,:), intent(in) :: config
61 real(real64) :: energy
62 class(run_params), intent(in) :: setup
63 integer :: i, j, k, l
64
65 energy=0.0_real64
66
67 do l=1, 2*setup%n_3
68 do k=1, 2*setup%n_2
69 do j=1, 2*setup%n_1
70 do i=1, setup%n_basis
71 if (config(i,j,k,l) .eq. 0_array_int) cycle
72 energy = energy + setup%nbr_energy(config, i, j, k, l)
73 end do
74 end do
75 end do
76 end do
77
78 ! Divide by two to correct double-counting
79 energy = 0.5_real64*energy
80