File: set_hubbard_n.f90

package info (click to toggle)
espresso 6.7-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 311,068 kB
  • sloc: f90: 447,429; ansic: 52,566; sh: 40,631; xml: 37,561; tcl: 20,077; lisp: 5,923; makefile: 4,503; python: 4,379; perl: 1,219; cpp: 761; fortran: 618; java: 568; awk: 128
file content (128 lines) | stat: -rw-r--r-- 3,217 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
!
! Copyright (C) 2001-2020 Quantum ESPRESSO group
! This file is distributed under the terms of the
! GNU General Public License. See the file `License'
! in the root directory of the present distribution,
! or http://www.gnu.org/copyleft/gpl.txt .
!
!---------------------------------------------------------------------------
FUNCTION set_hubbard_n( psd ) RESULT( hubbard_n )
  !---------------------------------------------------------------------------
  !
  USE io_global, ONLY : stdout
  !
  IMPLICIT NONE
  !
  INTEGER                      :: hubbard_n
  CHARACTER(LEN=2), INTENT(IN) :: psd
  !
  !
  SELECT CASE( TRIM(ADJUSTL(psd)) )
     !
     ! ... transition metals, 4-th row 
     !
     CASE( 'Ti', 'V',  'Cr', 'Mn', 'Fe', 'Co', 'Ni', 'Cu', 'Zn')  
         hubbard_n=3
     !
     !  ... transition metals, 5-th  row
     !
     CASE( 'Zr', 'Nb', 'Mo', 'Tc', 'Ru', 'Rh', 'Pd', 'Ag', 'Cd') 
         hubbard_n=4
     ! 
     ! ... transition metals, 6-th  row 
     !
     CASE( 'Hf', 'Ta', 'W',  'Re', 'Os', 'Ir', 'Pt', 'Au', 'Hg'  )
     !
        hubbard_n = 5  
     !
     !
     ! ... rare earths (lanthanoid) 
     !
     CASE('Ce','Pr','Nd','Pm','Sm','Eu','Gd','Tb','Dy','Ho','Er','Tm','Yb','Lu' ) 
     !  
        hubbard_n = 4 
     !  ... rare earths (actinoids )
     CASE ('Th','Pa','U', 'Np','Pu','Am','Cm','Bk','Cf','Es','Fm','Md','No','Lr' )
        !
        hubbard_n = 5
        !
     !
     ! ... other elements
     !
     CASE( 'H' )
        !
        hubbard_n =  1
        !
     CASE( 'C', 'N', 'O' )
        !
        hubbard_n =  2
        !
     CASE( 'Ga' ) 
        !
        hubbard_n =  3
        !
     CASE ( 'In', 'As' )
        ! 
        hubbard_n = 4  
        ! 
     CASE DEFAULT
        !
        hubbard_n = -1
        !
        WRITE( stdout, '(/,"psd = ",A,/)' ) psd
        !
        CALL errore( 'set_hubbard_n', 'pseudopotential not yet inserted', 1 )
        !
  END SELECT
  !
  RETURN  
  !
END FUNCTION set_hubbard_n
!---------------------------------------------------------------------------

!---------------------------------------------------------------------------
FUNCTION set_hubbard_n_back( psd ) RESULT( hubbard_n_back )
  !---------------------------------------------------------------------------
  !
  ! IT: Note, currently this routine is not used anywhere. The data reported 
  !     here is not complete.
  !
  USE io_global, ONLY : stdout
  !
  IMPLICIT NONE
  !
  INTEGER                      :: hubbard_n_back
  CHARACTER(LEN=2), INTENT(IN) :: psd
  !
  !
  SELECT CASE( TRIM(ADJUSTL(psd)) )
     !
     ! ... transition metals
     !

     CASE( 'H', 'He', 'Li', 'Be', 'Na', 'Mg', 'K', 'Ca', 'Rb', 'Sr', 'Cs', 'Ba',&
           'Fr', 'Ra' )
        !
        hubbard_n_back =  -1 ! no background states
        !
     CASE( 'Se' )
        !
        hubbard_n_back =  3
        !
     CASE( 'Zn' ) 
        !
        hubbard_n_back =  3
        !
     CASE DEFAULT
        !
        hubbard_n_back = -1
        !
        WRITE( stdout, '(/,"psd = ",A,/)' ) psd
        !
        CALL errore( 'set_hubbard_n_back', 'pseudopotential not yet inserted', 1 )
        !
  END SELECT
  !
  RETURN  
  !
END FUNCTION set_hubbard_n_back