Line data Source code
1 : MODULE m_writeOutParameters
2 :
3 : IMPLICIT NONE
4 :
5 : CONTAINS
6 :
7 80 : SUBROUTINE writeOutParameters(fmpi,input,sym,stars,atoms,vacuum,kpts,&
8 : hybinp,cell,banddos,sliceplot,xcpot,&
9 : noco,enpara,sphhar)
10 :
11 : USE m_types
12 : USE m_xmlOutput
13 :
14 : TYPE(t_mpi), INTENT(IN) :: fmpi
15 : TYPE(t_input), INTENT(IN) :: input
16 : TYPE(t_sym), INTENT(IN) :: sym
17 : TYPE(t_stars), INTENT(IN) :: stars
18 : TYPE(t_atoms), INTENT(IN) :: atoms
19 : TYPE(t_vacuum), INTENT(IN) :: vacuum
20 : TYPE(t_kpts), INTENT(IN) :: kpts
21 :
22 : TYPE(t_hybinp), INTENT(IN) :: hybinp
23 : TYPE(t_cell), INTENT(IN) :: cell
24 : TYPE(t_banddos), INTENT(IN) :: banddos
25 : TYPE(t_sliceplot), INTENT(IN) :: sliceplot
26 : CLASS(t_xcpot), INTENT(IN) :: xcpot
27 : TYPE(t_noco), INTENT(IN) :: noco
28 :
29 : TYPE(t_enpara), INTENT(IN) :: enpara
30 : TYPE(t_sphhar), INTENT(IN) :: sphhar
31 :
32 : INTEGER :: i
33 : REAL :: sumWeight
34 : CHARACTER(LEN=20) :: attributes(7)
35 :
36 80 : CALL openXMLElementNoAttributes('numericalParameters')
37 :
38 80 : WRITE(attributes(1),'(i0)') atoms%nat
39 80 : WRITE(attributes(2),'(i0)') atoms%ntype
40 80 : WRITE(attributes(3),'(i0)') atoms%jmtd
41 80 : WRITE(attributes(4),'(i0)') atoms%n_u
42 80 : WRITE(attributes(5),'(i0)') atoms%n_hia
43 80 : WRITE(attributes(6),'(i0)') atoms%n_opc
44 : CALL writeXMLElementFormPoly('atomsInCell',(/'nat ','ntype','jmtd ','n_u ','n_hia', 'n_opc'/),&
45 560 : attributes(:6),reshape((/3,6,6,6,6,6,8,8,8,8,8/),(/5,2/)))
46 :
47 80 : WRITE(attributes(1),'(i0)') lapw_dim_nvd
48 80 : WRITE(attributes(2),'(i0)') atoms%lmaxd
49 80 : WRITE(attributes(3),'(i0)') atoms%nlotot
50 : CALL writeXMLElementFormPoly('basis',(/'nvd ','lmaxd ','nlotot'/),&
51 320 : attributes(:3),reshape((/9,6,6,8,8,8/),(/3,2/)))
52 :
53 80 : WRITE(attributes(1),'(i0)') stars%ng3
54 80 : WRITE(attributes(2),'(i0)') stars%ng2
55 : CALL writeXMLElementFormPoly('density',(/'ng3','ng2'/),&
56 240 : attributes(:2),reshape((/7,6,8,8/),(/2,2/)))
57 :
58 80 : WRITE(attributes(1),'(i0)') input%neig
59 : CALL writeXMLElementFormPoly('bands',(/'numbands'/),&
60 160 : attributes(:1),reshape((/9,8/),(/1,2/)))
61 :
62 80 : WRITE(attributes(1),'(f0.8)') cell%vol
63 80 : WRITE(attributes(2),'(f0.8)') cell%volint
64 80 : IF(input%film) THEN
65 11 : WRITE(attributes(3),'(f0.8)') cell%omtil
66 11 : WRITE(attributes(4),'(f0.8)') cell%area
67 11 : WRITE(attributes(5),'(f0.8)') cell%z1
68 : CALL openXMLElementFormPoly('volumes',(/'unitCell ', 'interstitial', 'omegaTilda ', 'surfaceArea ', 'z1 '/),&
69 66 : attributes(:5),reshape((/8,12,10,11,2,10,10,10,10,10/),(/5,2/)))
70 : ELSE
71 : CALL openXMLElementFormPoly('volumes',(/'unitCell ', 'interstitial'/),&
72 207 : attributes(:2),reshape((/8,12,10,10/),(/2,2/)))
73 : END IF
74 217 : DO i = 1, atoms%ntype
75 137 : WRITE(attributes(1),'(i0)') i
76 137 : WRITE(attributes(2),'(f0.8)') atoms%rmt(i)
77 137 : WRITE(attributes(3),'(f0.8)') atoms%volmts(i)
78 : CALL writeXMLElementFormPoly('mtVolume',(/'atomType','mtRadius','mtVolume'/),&
79 628 : attributes(:3),reshape((/8,8,8,5,10,10/),(/3,2/)))
80 : END DO
81 80 : CALL closeXMLElement('volumes')
82 :
83 718 : sumWeight = SUM(kpts%wtkpt(:kpts%nkpt))
84 80 : WRITE(attributes(1),'(f0.8)') sumWeight
85 80 : WRITE(attributes(2),'(i0)') kpts%nkpt
86 : CALL openXMLElementFormPoly('kPointList',(/ 'weightScale', 'count '/),&
87 240 : attributes(:2),reshape((/11,5,10,10/),(/2,2/)))
88 718 : DO i = 1, kpts%nkpt
89 638 : WRITE(attributes(1),'(f12.6)') kpts%wtkpt(i)
90 638 : WRITE(attributes(2),'(f12.6)') kpts%bk(1,i)
91 638 : WRITE(attributes(3),'(f12.6)') kpts%bk(2,i)
92 638 : WRITE(attributes(4),'(f12.6)') kpts%bk(3,i)
93 1356 : CALL writeXMLElementForm('kPoint', (/'weight'/), attributes(:1),reshape((/6,12/),(/1,2/)),attributes(2:4))
94 : END DO
95 80 : CALL closeXMLElement('kPointList')
96 :
97 80 : CALL closeXMLElement('numericalParameters')
98 :
99 80 : END SUBROUTINE writeOutParameters
100 :
101 : END MODULE m_writeOutParameters
|