Naposledy aktivní 1736964636

yuanpeng's Avatar yuanpeng revidoval tento gist 1736964636. Přejít na revizi

1 file changed, 0 insertions, 0 deletions

uniform_move_snippet přejmenováno na uniform_move_snippet.f90

Soubor přejmenován beze změn

yuanpeng's Avatar yuanpeng revidoval tento gist 1736964625. Přejít na revizi

1 file changed, 20 insertions

uniform_move_snippet(vytvořil soubor)

@@ -0,0 +1,20 @@
1 + ! For the polar angle part, since projection is involved and therefore
2 + ! we need to guarantee that the projection is uniform. We don't need
3 + ! to do this for the phi angle since only rotation is involved in
4 + ! that case.
5 + polar_ang = dacos(2.0d0*(rmca_ran(1)-0.5d0))
6 + azim_ang = rmca_ran(1) * 2.0d0 * pi
7 + rand_x = delta(move_type) * dsin(polar_ang) * dcos(azim_ang)
8 + rand_y = delta(move_type) * dsin(polar_ang) * dsin(azim_ang)
9 + rand_z = delta(move_type) * dcos(polar_ang)
10 + ! We go from the Cartesian coordinates to fractional with respect
11 + ! to the lattice.
12 + move(4) = rand_x * inv_vectors_init(1,1) + &
13 + rand_y * inv_vectors_init(1,2) + &
14 + rand_z * inv_vectors_init(1,3)
15 + move(5) = rand_x * inv_vectors_init(2,1) + &
16 + rand_y * inv_vectors_init(2,2) + &
17 + rand_z * inv_vectors_init(2,3)
18 + move(6) = rand_x * inv_vectors_init(3,1) + &
19 + rand_y * inv_vectors_init(3,2) + &
20 + rand_z * inv_vectors_init(3,3)
Novější Starší