~ubuntu-branches/debian/stretch/abinit/stretch

« back to all changes in this revision

Viewing changes to src/defs/defs_elphon.F90

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2007-09-14 13:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20070914130500-1kzh2mrgo6ir4b6i
Tags: upstream-5.3.4.dfsg
ImportĀ upstreamĀ versionĀ 5.3.4.dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
!{\src2tex{textfont=tt}}
 
2
!!****m* ABINIT/defs_elphon
 
3
!!
 
4
!! NAME
 
5
!! defs_elphon
 
6
!!
 
7
!! FUNCTION
 
8
!! This module contains the datastructures for elphon
 
9
!!  the different (huge) matrices will either be allocated and
 
10
!!  used, or be written to disk. All combinations should be feasible.
 
11
!!
 
12
!! COPYRIGHT
 
13
!! Copyright (C) 2004-2007 ABINIT group (MVer, MG)
 
14
!! This file is distributed under the terms of the
 
15
!! GNU General Public Licence, see ~abinit/COPYING
 
16
!! or http://www.gnu.org/copyleft/gpl.txt .
 
17
!! For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
 
18
!!
 
19
!! INPUTS
 
20
!!
 
21
!! OUTPUT
 
22
!!
 
23
!! NOTES
 
24
!!  Contains two datastructures:
 
25
!!   elph_type contains data and dimensions for the kpoints near the
 
26
!!    fermi surface and the $g_{k k+q}$ matrix elements
 
27
!!   phon_type contains the necessary data to interpolate the
 
28
!!    phonon bandstructure and eigenvectors in reciprocal space (ie.
 
29
!!    interatomic force constants and corresponding real space grid info).
 
30
!!
 
31
!! PARENTS
 
32
!!
 
33
!! CHILDREN
 
34
!!
 
35
!! SOURCE
 
36
 
 
37
#if defined HAVE_CONFIG_H
 
38
#include "config.h"
 
39
#endif
 
40
 
 
41
module defs_elphon
 
42
 
 
43
  use defs_basis
 
44
 
 
45
  implicit none
 
46
 
 
47
!!***
 
48
 
 
49
!----------------------------------------------------------------------
 
50
 
 
51
!!****t* defs_elphon/elph_type
 
52
!! NAME
 
53
!! elph_type
 
54
!!
 
55
!! FUNCTION
 
56
!! elph_type contains data and dimensions for the kpoints near the
 
57
!! fermi surface and the $g_{k k+q}$ matrix elements
 
58
!!
 
59
!! SOURCE
 
60
 
 
61
#if defined HAVE_CONFIG_H
 
62
#include "config.h"
 
63
#endif
 
64
 
 
65
  type elph_type
 
66
     
 
67
   integer :: natom,nbranch,nFSband 
 
68
   integer :: nFSkpt,nFSkptirred,nqpt            !Matrix dimensions (natom is redundant)
 
69
   integer :: minFSband,maxFSband                !Index of lower and upper bands used for the FS
 
70
 
 
71
   integer :: ngkkband                           !Number of bands kept in final gkk matrix elements:
 
72
                                                 !either 1 if sum is performed immediately
 
73
                                                 !or = nband if all elements are kept based on flag tkeepbands
 
74
 
 
75
   integer :: nqptirred                          !number of irred q-points
 
76
 
 
77
 
 
78
   integer :: unita2f,unit_gkk2,unit_gkk_rpt
 
79
   integer :: unitgkq,unitphfrq                  !units for file output
 
80
     
 
81
   integer :: gkqexist,gkqwrite                              
 
82
   integer :: gkk2exist,gkk2write
 
83
   integer :: gkk_rptexist,gkk_rptwrite
 
84
   integer :: phfrqwrite,phfrqexist              !flags for existence and RAM/disk status for each matrix below
 
85
 
 
86
   integer :: doscalprod                         !flag to perform the scalar product
 
87
   integer :: tsymgkq                            !flag to symmetrize gkq matrix elements
 
88
   integer :: tkeepbands                         !flag to sum over bands or not
 
89
 
 
90
   
 
91
   integer :: na2f                               !dimensions and increments for a2F function
 
92
   real(dp) :: omega_min,omega_max 
 
93
   real(dp) :: a2fsmear,domega
 
94
 
 
95
   real(dp) :: n0                                !DOS at the Fermi level (states/Ha/spin)
 
96
   real(dp) :: mustar                            !mustar parameter
 
97
   real(dp) :: fermie                            !Fermi energy (Ha), either comes from wfk file or from anaddb input file
 
98
 
 
99
   character(len=fnlen) :: elph_base_name        !base name for output files
 
100
 
 
101
   integer,pointer :: qirredtofull(:)            !mapping between the qpoints found in the GGK file
 
102
                                                 !and the array of qpoints generated by the code
 
103
 
 
104
   real(dp),pointer :: wtq(:)                    !weight for each qpoint in the full grid spqt
 
105
                                                 !if a point is not in the IBZ ==>  wtq=0 
 
106
                                                 !MG we can also use indqpt
 
107
 
 
108
   real(dp),pointer :: spqpt(:,:)                !special q points obtained by the Monkhorst & Pack method,
 
109
                                                 !in reduced coordinates.These vectors have to be multiplied
 
110
                                                 !by the reciprocal basis vectors
 
111
 
 
112
   real(dp),pointer :: FSkpt(:,:)                !coordinates of the full kpoints close to the FS
 
113
 
 
114
   real(dp),pointer :: FSintweight(:,:)          !integration weights (see also gkk_intweight)
 
115
   real(dp),pointer :: FSkptirred(:,:)
 
116
 
 
117
   real(dp),pointer :: gkk_intweight(:,:)        !integration weights for gkk matrix elements on FS:
 
118
                                                 !if tkeepbands == 0 all are 1
 
119
                                                 !if tkeepbands == 1 then = to FSintweight in elphon
 
120
                                                 !DOES NOT INCLUDE FACTOR OF 1/nFSkpt
 
121
 
 
122
   !real(dp),pointer :: gkk_qpt(:,:,:,:,:,:)
 
123
   real(dp),pointer :: gkk_qpt(:,:,:,:,:,:,:)    !Now gkq contains gkk2 matrices on basic qpts, 
 
124
                                                 !summed over bands if ngkkband==1
 
125
 
 
126
 
 
127
   real(dp),pointer :: gkk_rpt(:,:,:,:,:,:,:)    !For the moment, gkk_rpt in memory is out of the question
 
128
   real(dp),pointer :: gkk2(:,:,:,:,:)           !real(dp),pointer :: gkk_rpt(:,:,:,:,:,:)
 
129
                                                 !Same for real space:
 
130
 
 
131
   real(dp),pointer :: gamma_qpt(:,:,:,:)        !gamma matrices integrated over kpoint coeff and bands: still depends on qpt
 
132
   real(dp),pointer :: gamma_rpt(:,:,:,:)
 
133
 
 
134
   real(dp),pointer :: phfrq(:,:)                !phonon frequencies
 
135
   real(dp),pointer :: a2f(:,:,:)                !a2f function
 
136
 
 
137
   real(dp),pointer :: qgrid_data(:,:,:)         !e-ph values calculated over the irreducible part of the q-grid:
 
138
                                                 !first entry  =  index of the q-point,
 
139
                                                 !second index =  branch index
 
140
                                                 !the third slice contains the frequency, the linewidth and lambda(q,nu)
 
141
                                                 !for that particular phonon mode
 
142
 
 
143
  end type elph_type
 
144
!!***
 
145
 
 
146
!----------------------------------------------------------------------
 
147
 
 
148
!!****t* defs_elphon/phon_type
 
149
!! NAME
 
150
!! phon_type
 
151
!!
 
152
!! FUNCTION
 
153
!! phon_type contains the necessary data to interpolate the
 
154
!! phonon bandstructure and eigenvectors in reciprocal space 
 
155
!! (ie. interatomic force constants and corresponding real space grid info).
 
156
!!
 
157
!! SOURCE
 
158
 
 
159
#if defined HAVE_CONFIG_H
 
160
#include "config.h"
 
161
#endif
 
162
 
 
163
 type phon_type
 
164
 
 
165
  integer :: dipdip
 
166
  integer :: mpert,nsym
 
167
  integer :: natom,ntypat,nrpt
 
168
  integer,pointer :: indsym(:,:,:),symrel(:,:,:),typat(:)
 
169
  real(dp) :: ucvol
 
170
  real(dp),pointer :: acell(:),amu(:),atmfrc(:,:,:,:,:,:)
 
171
  real(dp),pointer :: dielt(:,:),dyewq0(:,:,:),gprim(:,:),gmet(:,:)
 
172
  real(dp),pointer :: xred(:,:),zeff(:,:,:)
 
173
  real(dp),pointer :: rcan(:,:),rmet(:,:),rprim(:,:),rprimd(:,:),rpt(:,:)
 
174
  real(dp),pointer :: trans(:,:),wghatm(:,:,:)
 
175
 
 
176
 end type phon_type
 
177
 
 
178
!!****t* defs_elphon/elph_tr_type
 
179
!! NAME
 
180
!! phon_type
 
181
!!
 
182
!! FUNCTION
 
183
!! elph_tr_ds contains the necessary data for the transport properties
 
184
!!
 
185
!! SOURCE
 
186
 
 
187
  type elph_tr_type
 
188
 
 
189
     integer :: ifltransport
 
190
     integer :: unitgkq_trin,unitgkq_trout
 
191
     integer :: gkqwrite
 
192
     integer :: onegkksize
 
193
     real(dp),pointer :: el_veloc(:,:,:) 
 
194
     real(dp),pointer :: gkk_qpt_tr(:,:,:,:,:,:,:) ! 
 
195
     real(dp),pointer :: gkk_qpt_trin(:,:,:,:,:,:,:) 
 
196
     real(dp),pointer :: gkk_qpt_trout(:,:,:,:,:,:,:) 
 
197
     real(dp),pointer :: gamma_qpt_tr(:,:,:,:)
 
198
     real(dp),pointer :: gamma_qpt_trin(:,:,:,:)
 
199
     real(dp),pointer :: gamma_qpt_trout(:,:,:,:)
 
200
     real(dp),pointer :: gamma_rpt_tr(:,:,:,:)
 
201
     real(dp),pointer :: gamma_rpt_trin(:,:,:,:)
 
202
     real(dp),pointer :: gamma_rpt_trout(:,:,:,:)
 
203
     real(dp),pointer :: a2f_1d_tr(:)
 
204
     real(dp),pointer :: a2f_1d_trin(:)
 
205
     real(dp),pointer :: a2f_1d_trout(:)
 
206
 
 
207
    real(dp) ::  FSelecveloc_sq
 
208
 
 
209
 
 
210
 
 
211
  end type elph_tr_type
 
212
 
 
213
end module defs_elphon
 
214
!!***