Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
fleur
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
51
Issues
51
List
Boards
Labels
Service Desk
Milestones
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
fleur
fleur
Commits
8f168658
Commit
8f168658
authored
Mar 16, 2018
by
Gregor Michalicek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Put orbital magnetic moments output into own subroutine
parent
c4fb6bfe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
40 deletions
+70
-40
cdn_mt/CMakeLists.txt
cdn_mt/CMakeLists.txt
+1
-0
cdn_mt/orbMagMoms.f90
cdn_mt/orbMagMoms.f90
+66
-0
main/cdngen.F90
main/cdngen.F90
+3
-40
No files found.
cdn_mt/CMakeLists.txt
View file @
8f168658
...
...
@@ -9,6 +9,7 @@ cdn_mt/abcof.F90
cdn_mt/abcof3.F90
cdn_mt/abcrot2.f90
cdn_mt/cdnmt.f90
cdn_mt/orbMagMoms.f90
cdn_mt/orb_comp2.f90
cdn_mt/radfun.f90
cdn_mt/rhomt.f90
...
...
cdn_mt/orbMagMoms.f90
0 → 100644
View file @
8f168658
MODULE
m_orbMagMoms
CONTAINS
SUBROUTINE
orbMagMoms
(
dimension
,
atoms
,
noco
,
clmom
)
USE
m_types
USE
m_xmlOutput
IMPLICIT
NONE
TYPE
(
t_dimension
),
INTENT
(
IN
)
::
dimension
TYPE
(
t_atoms
),
INTENT
(
IN
)
::
atoms
TYPE
(
t_noco
),
INTENT
(
IN
)
::
noco
REAL
,
INTENT
(
INOUT
)
::
clmom
(
3
,
atoms
%
ntype
,
dimension
%
jspd
)
INTEGER
::
iType
,
j
REAL
::
thetai
,
phii
,
slmom
,
slxmom
,
slymom
CHARACTER
(
LEN
=
20
)
::
attributes
(
4
)
thetai
=
noco
%
theta
phii
=
noco
%
phi
WRITE
(
6
,
FMT
=
9020
)
WRITE
(
16
,
FMT
=
9020
)
CALL
openXMLElement
(
'orbitalMagneticMomentsInMTSpheres'
,(/
'units'
/),(/
'muBohr'
/))
DO
iType
=
1
,
atoms
%
ntype
IF
(
noco
%
l_noco
)
THEN
thetai
=
noco
%
beta
(
iType
)
phii
=
noco
%
alph
(
iType
)
END
IF
! magn. moment(-)
slxmom
=
clmom
(
1
,
iType
,
1
)
+
clmom
(
1
,
iType
,
2
)
slymom
=
clmom
(
2
,
iType
,
1
)
+
clmom
(
2
,
iType
,
2
)
slmom
=
clmom
(
3
,
iType
,
1
)
+
clmom
(
3
,
iType
,
2
)
! rotation: orbital moment || spin moment (extended to incude phi - hopefully)
slmom
=
cos
(
thetai
)
*
slmom
+
sin
(
thetai
)
*
(
cos
(
phii
)
*
slxmom
+
sin
(
phii
)
*
slymom
)
clmom
(
3
,
iType
,
1
)
=
cos
(
thetai
)
*
clmom
(
3
,
iType
,
1
)
+
&
sin
(
thetai
)
*
(
cos
(
phii
)
*
clmom
(
1
,
iType
,
1
)
+
&
sin
(
phii
)
*
clmom
(
2
,
iType
,
1
))
clmom
(
3
,
iType
,
2
)
=
cos
(
thetai
)
*
clmom
(
3
,
iType
,
2
)
+
&
sin
(
thetai
)
*
(
cos
(
phii
)
*
clmom
(
1
,
iType
,
2
)
+
&
sin
(
phii
)
*
clmom
(
2
,
iType
,
2
))
WRITE
(
6
,
FMT
=
8030
)
iType
,
slmom
,(
clmom
(
3
,
iType
,
j
),
j
=
1
,
2
)
WRITE
(
16
,
FMT
=
8030
)
iType
,
slmom
,(
clmom
(
3
,
iType
,
j
),
j
=
1
,
2
)
attributes
=
''
WRITE
(
attributes
(
1
),
'(i0)'
)
iType
WRITE
(
attributes
(
2
),
'(f15.10)'
)
slmom
WRITE
(
attributes
(
3
),
'(f15.10)'
)
clmom
(
3
,
iType
,
1
)
WRITE
(
attributes
(
4
),
'(f15.10)'
)
clmom
(
3
,
iType
,
2
)
CALL
writeXMLElementFormPoly
(
'orbMagMoment'
,(/
'atomType '
,
'moment '
,
'spinUpCharge '
,&
'spinDownCharge'
/),&
attributes
,
reshape
((/
8
,
6
,
12
,
14
,
6
,
15
,
15
,
15
/),(/
4
,
2
/)))
END
DO
CALL
closeXMLElement
(
'orbitalMagneticMomentsInMTSpheres'
)
9020
FORMAT
(
/
,
/
,
10x
,
'orb. magnetic moments in the spheres:'
,
/
,
10x
,
&
'type'
,
t22
,
'moment'
,
t33
,
'spin-up'
,
t43
,
'spin-down'
)
8030
FORMAT
(
2x
,
'--> mm'
,
i8
,
2x
,
3f12.5
)
END
SUBROUTINE
orbMagMoms
END
MODULE
m_orbMagMoms
main/cdngen.F90
View file @
8f168658
...
...
@@ -35,6 +35,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
USE
m_m_perp
USE
m_types
USE
m_xmlOutput
USE
m_orbMagMoms
#ifdef CPP_MPI
USE
m_mpi_bc_potden
USE
m_mpi_bc_coreden
...
...
@@ -74,7 +75,7 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
!Local Scalars
REAL
fix
,
qtot
,
scor
,
seig
,
smom
,
stot
,
sval
,
dummy
REAL
s
lmom
,
slxmom
,
slymom
,
sum
,
thetai
,
phii
,
fermiEnergyTemp
REAL
s
um
,
fermiEnergyTemp
INTEGER
iter
,
ivac
,
j
,
jspin
,
jspmax
,
k
,
n
,
nt
,
ieig
,
ikpt
INTEGER
ityp
,
ilayer
,
urec
,
itype
,
iatom
LOGICAL
l_relax_any
,
exst
,
n_exist
,
l_qfix
,
l_enpara
...
...
@@ -394,49 +395,11 @@ SUBROUTINE cdngen(eig_id,mpi,input,banddos,sliceplot,vacuum,&
CLOSE
(
24
)
END
IF
IF
(
noco
%
l_soc
)
THEN
thetai
=
noco
%
theta
phii
=
noco
%
phi
WRITE
(
6
,
FMT
=
9020
)
WRITE
(
16
,
FMT
=
9020
)
CALL
openXMLElement
(
'orbitalMagneticMomentsInMTSpheres'
,(/
'units'
/),(/
'muBohr'
/))
DO
n
=
1
,
atoms
%
ntype
IF
(
noco
%
l_noco
)
THEN
thetai
=
noco
%
beta
(
n
)
phii
=
noco
%
alph
(
n
)
END
IF
! magn. moment(-)
slxmom
=
clmom
(
1
,
n
,
1
)
+
clmom
(
1
,
n
,
2
)
slymom
=
clmom
(
2
,
n
,
1
)
+
clmom
(
2
,
n
,
2
)
slmom
=
clmom
(
3
,
n
,
1
)
+
clmom
(
3
,
n
,
2
)
! rotation: orbital moment || spin moment (extended to incude phi - hopefully)
slmom
=
cos
(
thetai
)
*
slmom
+
sin
(
thetai
)
*
(
cos
(
phii
)
*
slxmom
+
sin
(
phii
)
*
slymom
)
clmom
(
3
,
n
,
1
)
=
cos
(
thetai
)
*
clmom
(
3
,
n
,
1
)
+
&
sin
(
thetai
)
*
(
cos
(
phii
)
*
clmom
(
1
,
n
,
1
)
+
sin
(
phii
)
*
clmom
(
2
,
n
,
1
))
clmom
(
3
,
n
,
2
)
=
cos
(
thetai
)
*
clmom
(
3
,
n
,
2
)
+
&
sin
(
thetai
)
*
(
cos
(
phii
)
*
clmom
(
1
,
n
,
2
)
+
sin
(
phii
)
*
clmom
(
2
,
n
,
2
))
WRITE
(
6
,
FMT
=
8030
)
n
,
slmom
,(
clmom
(
3
,
n
,
j
),
j
=
1
,
2
)
WRITE
(
16
,
FMT
=
8030
)
n
,
slmom
,(
clmom
(
3
,
n
,
j
),
j
=
1
,
2
)
attributes
=
''
WRITE
(
attributes
(
1
),
'(i0)'
)
n
WRITE
(
attributes
(
2
),
'(f15.10)'
)
slmom
WRITE
(
attributes
(
3
),
'(f15.10)'
)
clmom
(
3
,
n
,
1
)
WRITE
(
attributes
(
4
),
'(f15.10)'
)
clmom
(
3
,
n
,
2
)
CALL
writeXMLElementFormPoly
(
'orbMagMoment'
,(/
'atomType '
,
'moment '
,
'spinUpCharge '
,&
'spinDownCharge'
/),&
attributes
,
reshape
((/
8
,
6
,
12
,
14
,
6
,
15
,
15
,
15
/),(/
4
,
2
/)))
END
DO
CALL
closeXMLElement
(
'orbitalMagneticMomentsInMTSpheres'
)
END
IF
IF
(
noco
%
l_soc
)
CALL
orbMagMoms
(
dimension
,
atoms
,
noco
,
clmom
)
END
IF
!block 2 unnecessary for slicing: end
END
IF
! .NOT.sliceplot%slice
9020
FORMAT
(
/
,
/
,
10x
,
'orb. magnetic moments in the spheres:'
,
/
,
10x
,
&
'type'
,
t22
,
'moment'
,
t33
,
'spin-up'
,
t43
,
'spin-down'
)
8000
FORMAT
(
/
,
/
,
10x
,
'spin density at the nucleus:'
,
/
,
10x
,
'type'
,
t25
,
&
'input%total'
,
t42
,
'valence'
,
t65
,
'core'
,
t90
,
&
'majority valence and input%total density'
,
/
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment