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, 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.
 

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 1239 of file bw_hamiltonian.f90.

1241 !integer(array_int), allocatable, dimension(:,:,:,:), intent(in) :: config
1242 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1243 real(real64) :: energy
1244 class(run_params), intent(in) :: setup
1245 integer, intent(in) :: site_b, site_i, site_j, site_k
1246 integer(array_int) :: species
1247
1248 species = config(site_b, site_i, site_j, site_k)
1249
1250 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1251 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1252 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1253 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1254 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1255 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1256 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1257 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1258 + bcc_shell9_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1259 + bcc_shell10_energy(setup, site_b, site_i, site_j, site_k, config, species)
1260
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 897 of file bw_hamiltonian.f90.

899
900 integer(array_int), dimension(:,:,:,:), intent(in) :: config
901 real(real64) :: energy
902 class(run_params), intent(in) :: setup
903 integer, intent(in) :: site_b, site_i, site_j, site_k
904 integer(array_int) :: species
905
906 species = config(site_b, site_i, site_j, site_k)
907
908 energy= bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species)
909
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 931 of file bw_hamiltonian.f90.

933
934 integer(array_int), dimension(:,:,:,:), intent(in) :: config
935 real(real64) :: energy
936 class(run_params), intent(in) :: setup
937 integer, intent(in) :: site_b, site_i, site_j, site_k
938 integer(array_int) :: species
939
940 species = config(site_b, site_i, site_j, site_k)
941
942 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
943 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species)
944
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 966 of file bw_hamiltonian.f90.

968
969 integer(array_int), dimension(:,:,:,:), intent(in) :: config
970 real(real64) :: energy
971 class(run_params), intent(in) :: setup
972 integer, intent(in) :: site_b, site_i, site_j, site_k
973 integer(array_int) :: species
974
975 species = config(site_b, site_i, site_j, site_k)
976
977 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
978 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
979 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species)
980
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 1002 of file bw_hamiltonian.f90.

1004
1005 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1006 real(real64) :: energy
1007 class(run_params), intent(in) :: setup
1008 integer, intent(in) :: site_b, site_i, site_j, site_k
1009 integer(array_int) :: species
1010
1011 species = config(site_b, site_i, site_j, site_k)
1012
1013 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1014 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1015 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1016 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species)
1017
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 1039 of file bw_hamiltonian.f90.

1041
1042 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1043 real(real64) :: energy
1044 class(run_params), intent(in) :: setup
1045 integer, intent(in) :: site_b, site_i, site_j, site_k
1046 integer(array_int) :: species
1047
1048 species = config(site_b, site_i, site_j, site_k)
1049
1050 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1051 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1052 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1053 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1054 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species)
1055
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 1077 of file bw_hamiltonian.f90.

1079
1080 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1081 real(real64) :: energy
1082 class(run_params), intent(in) :: setup
1083 integer, intent(in) :: site_b, site_i, site_j, site_k
1084 integer(array_int) :: species
1085
1086 species = config(site_b, site_i, site_j, site_k)
1087
1088 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1089 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1090 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1091 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1092 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1093 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species)
1094
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 1116 of file bw_hamiltonian.f90.

1118
1119 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1120 real(real64) :: energy
1121 class(run_params), intent(in) :: setup
1122 integer, intent(in) :: site_b, site_i, site_j, site_k
1123 integer(array_int) :: species
1124
1125 species = config(site_b, site_i, site_j, site_k)
1126
1127 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1128 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1129 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1130 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1131 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1132 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1133 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species)
1134
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 1156 of file bw_hamiltonian.f90.

1158
1159 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1160 real(real64) :: energy
1161 class(run_params), intent(in) :: setup
1162 integer, intent(in) :: site_b, site_i, site_j, site_k
1163 integer(array_int) :: species
1164
1165 species = config(site_b, site_i, site_j, site_k)
1166
1167 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1168 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1169 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1170 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1171 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1172 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1173 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1174 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species)
1175
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 1197 of file bw_hamiltonian.f90.

1199
1200 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1201 real(real64) :: energy
1202 class(run_params), intent(in) :: setup
1203 integer, intent(in) :: site_b, site_i, site_j, site_k
1204 integer(array_int) :: species
1205
1206 species = config(site_b, site_i, site_j, site_k)
1207
1208 energy = bcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1209 + bcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1210 + bcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1211 + bcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1212 + bcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1213 + bcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1214 + bcc_shell7_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1215 + bcc_shell8_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1216 + bcc_shell9_energy(setup, site_b, site_i, site_j, site_k, config, species)
1217
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 795 of file bw_hamiltonian.f90.

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

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

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

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

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

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

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

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

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

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

1713
1714 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1715 real(real64) :: energy
1716 class(run_params), intent(in) :: setup
1717 integer, intent(in) :: site_b, site_i, site_j, site_k
1718 integer(array_int) :: species
1719
1720 species = config(site_b, site_i, site_j, site_k)
1721
1722 energy= fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species)
1723
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 1745 of file bw_hamiltonian.f90.

1747
1748 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1749 real(real64) :: energy
1750 class(run_params), intent(in) :: setup
1751 integer, intent(in) :: site_b, site_i, site_j, site_k
1752 integer(array_int) :: species
1753
1754 species = config(site_b, site_i, site_j, site_k)
1755
1756 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1757 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species)
1758
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 1780 of file bw_hamiltonian.f90.

1782
1783 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1784 real(real64) :: energy
1785 class(run_params), intent(in) :: setup
1786 integer, intent(in) :: site_b, site_i, site_j, site_k
1787 integer(array_int) :: species
1788
1789 species = config(site_b, site_i, site_j, site_k)
1790
1791 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1792 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1793 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species)
1794
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 1816 of file bw_hamiltonian.f90.

1818
1819 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1820 real(real64) :: energy
1821 class(run_params), intent(in) :: setup
1822 integer, intent(in) :: site_b, site_i, site_j, site_k
1823 integer(array_int) :: species
1824
1825 species = config(site_b, site_i, site_j, site_k)
1826
1827 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1828 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1829 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1830 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species)
1831
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 1853 of file bw_hamiltonian.f90.

1855
1856 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1857 real(real64) :: energy
1858 class(run_params), intent(in) :: setup
1859 integer, intent(in) :: site_b, site_i, site_j, site_k
1860 integer(array_int) :: species
1861
1862 species = config(site_b, site_i, site_j, site_k)
1863
1864 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1865 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1866 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1867 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1868 + fcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species)
1869
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 1891 of file bw_hamiltonian.f90.

1893
1894 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1895 real(real64) :: energy
1896 class(run_params), intent(in) :: setup
1897 integer, intent(in) :: site_b, site_i, site_j, site_k
1898 integer(array_int) :: species
1899
1900 species = config(site_b, site_i, site_j, site_k)
1901
1902 energy = fcc_shell1_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1903 + fcc_shell2_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1904 + fcc_shell3_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1905 + fcc_shell4_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1906 + fcc_shell5_energy(setup, site_b, site_i, site_j, site_k, config, species) &
1907 + fcc_shell6_energy(setup, site_b, site_i, site_j, site_k, config, species)
1908
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 1281 of file bw_hamiltonian.f90.

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

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

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

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

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

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

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

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

1994
1995 integer(array_int), dimension(:,:,:,:), intent(in) :: config
1996 real(real64) :: energy
1997 class(run_params), intent(in) :: setup
1998 integer, intent(in) :: site_b, site_i, site_j, site_k
1999 integer(array_int) :: species
2000
2001 species = config(site_b, site_i, site_j, site_k)
2002
2003 energy = simple_cubic_1shell_energy(setup, site_b, site_i, site_j, site_k, config, species)
2004
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 57 of file bw_hamiltonian.f90.

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