The Elk Code
Loading...
Searching...
No Matches
axangsu2.f90
Go to the documentation of this file.
1
2
! Copyright (C) 2007-2008 J. K. Dewhurst, S. Sharma and C. Ambrosch-Draxl.
3
! This file is distributed under the terms of the GNU General Public License.
4
! See the file COPYING for license details.
5
6
!BOP
7
! !ROUTINE: axangsu2
8
! !INTERFACE:
9
pure
subroutine
axangsu2
(v,th,su2)
10
! !INPUT/OUTPUT PARAMETERS:
11
! v : rotation axis vector (in,real(3))
12
! th : rotation angle (in,real)
13
! su2 : SU(2) representation of rotation (out,complex(2,2))
14
! !DESCRIPTION:
15
! Finds the complex ${\rm SU}(2)$ representation of a rotation defined by an
16
! axis vector $\hat{\bf v}$ and angle $\theta$. The spinor rotation matrix is
17
! given explicitly by
18
! $$ R^{1/2}(\hat{\bf v},\theta)=I\cos\frac{\theta}{2}
19
! -i(\hat{\bf v}\cdot\vec{\sigma})\sin\frac{\theta}{2}. $$
20
!
21
! !REVISION HISTORY:
22
! Created August 2007 (JKD)
23
!EOP
24
!BOC
25
implicit none
26
! arguments
27
real
(8),
intent(in)
:: v(3),th
28
complex(8)
,
intent(out)
:: su2(2,2)
29
! local variables
30
real
(8) x,y,z,cs,sn,t1
31
x=v(1); y=v(2); z=v(3)
32
t1=sqrt(x**2+y**2+z**2)
33
! return the identity matrix for a zero-length axis
34
if
(t1 < 1.d-8)
then
35
su2(1,1)=1.d0
36
su2(2,1)=0.d0
37
su2(1,2)=0.d0
38
su2(2,2)=1.d0
39
return
40
end if
41
! normalise the vector
42
t1=1.d0/t1
43
x=x*t1; y=y*t1; z=z*t1
44
cs=cos(0.5d0*th)
45
sn=sin(0.5d0*th)
46
su2(1,1)=cmplx(cs,-z*sn,8)
47
su2(2,1)=cmplx(y*sn,-x*sn,8)
48
su2(1,2)=cmplx(-y*sn,-x*sn,8)
49
su2(2,2)=cmplx(cs,z*sn,8)
50
end subroutine
51
!EOC
52
axangsu2
pure subroutine axangsu2(v, th, su2)
Definition
axangsu2.f90:10
axangsu2.f90
Generated by
1.9.8