wann_optional.f 4.09 KB
 Gregor Michalicek committed Jun 29, 2016 1 2 3 4 5 6 ``````!-------------------------------------------------------------------------------- ! Copyright (c) 2016 Peter Grünberg Institut, Forschungszentrum Jülich, Germany ! This file is part of FLEUR and available as free software under the conditions ! of the MIT license as expressed in the LICENSE file in more detail. !-------------------------------------------------------------------------------- `````` Markus Betzinger committed Apr 26, 2016 7 8 9 `````` module m_wann_optional use m_juDFT contains `````` Gregor Michalicek committed Nov 29, 2017 10 `````` subroutine wann_optional(input,kpts,atoms,sym,cell,oneD,noco,wann) `````` Markus Betzinger committed Apr 26, 2016 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 ``````c************************************************** c Make preparations for the calculation of c Wannier functions. c Frank Freimuth c************************************************** use m_types use m_wann_read_inp use m_wann_projgen use m_wann_kpointgen use m_wann_w90kpointgen use m_wann_kptsreduc use m_wann_kptsreduc2 use m_wann_wan90prep use m_wann_dipole3 use m_wann_dipole implicit none `````` Gregor Michalicek committed Aug 10, 2017 28 `````` `````` 29 `````` TYPE(t_input), INTENT(IN) :: input `````` Gregor Michalicek committed Nov 29, 2017 30 `````` TYPE(t_kpts), INTENT(IN) :: kpts `````` 31 32 33 34 35 36 `````` TYPE(t_atoms), INTENT(IN) :: atoms TYPE(t_sym), INTENT(IN) :: sym TYPE(t_cell), INTENT(IN) :: cell TYPE(t_oneD), INTENT(IN) :: oneD TYPE(t_noco), INTENT(IN) :: noco TYPE(t_wann), INTENT(INOUT) :: wann `````` Gregor Michalicek committed Aug 10, 2017 37 `````` `````` Markus Betzinger committed Apr 26, 2016 38 39 40 `````` integer :: num_wann(2) logical :: l_nocosoc `````` Gregor Michalicek committed Aug 10, 2017 41 `````` l_nocosoc=noco%l_noco.or.noco%l_soc `````` Markus Betzinger committed Apr 26, 2016 42 43 `````` c-----read the input file to determine what to do `````` Gregor Michalicek committed Nov 29, 2017 44 `````` call wann_read_inp(input,.true.,wann) `````` Markus Betzinger committed Apr 26, 2016 45 46 47 48 `````` c-----generate projection-definition-file if(wann%l_projgen) then call wann_projgen( `````` Gregor Michalicek committed Aug 10, 2017 49 `````` > atoms%ntype,atoms%neq,atoms%nat,atoms%zatom,l_nocosoc,wann) `````` Markus Betzinger committed Apr 26, 2016 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 `````` wann%l_stopopt=.true. endif c-----generate k-point-files if(wann%l_kpointgen) then call wann_kpointgen() wann%l_stopopt=.true. endif if(wann%l_w90kpointgen) then call wann_w90kpointgen() wann%l_stopopt=.true. endif c-----find Wannier-irreducible part of BZ if(wann%l_kptsreduc)then call wann_kptsreduc( `````` Gregor Michalicek committed Aug 10, 2017 66 67 `````` > sym%nop,sym%mrot,cell%bmat,sym%tau,input%film, > oneD%odi%d1,l_nocosoc) `````` Markus Betzinger committed Apr 26, 2016 68 69 70 71 72 73 74 `````` wann%l_stopopt=.true. endif c-----find Wannier-irreducible part of BZ if(wann%l_kptsreduc2)then call wann_kptsreduc2( > wann%mhp, `````` Gregor Michalicek committed Aug 10, 2017 75 76 `````` > sym%nop,sym%mrot,cell%bmat,sym%tau,input%film, > oneD%odi%d1,l_nocosoc) `````` Markus Betzinger committed Apr 26, 2016 77 78 79 80 81 `````` wann%l_stopopt=.true. endif c-----generate WF1.win and bkpts if(wann%l_prepwan90)then `````` Gregor Michalicek committed Nov 29, 2017 82 `````` call wann_wan90prep(input,kpts, `````` Gregor Michalicek committed Aug 10, 2017 83 84 85 `````` > input%jspins,cell%amat,cell%bmat, > atoms%nat,atoms%taual,atoms%zatom,atoms%ntype, > atoms%ntype,atoms%neq,wann%l_bzsym,input%film, `````` Gregor Michalicek committed Aug 16, 2017 86 `````` > oneD%odi%d1,wann%l_ms,wann%l_sgwf,wann%l_socgwf, `````` P.Buhl committed Nov 24, 2017 87 88 `````` > wann%aux_latt_const,wann%param_file,wann%l_dim, > wann%wan90version) `````` Markus Betzinger committed Apr 26, 2016 89 90 91 92 93 94 95 96 `````` endif c-----calculate polarization, if not wannierize c-----if wannierize, then calculate polarization later (after wannierize) if(wann%l_dipole3.and..not.wann%l_wannierize)then num_wann(1)=wann%band_max(1)-wann%band_min(1)+1 num_wann(2)=wann%band_max(2)-wann%band_min(2)+1 call wann_dipole3( `````` Gregor Michalicek committed Aug 10, 2017 97 98 99 `````` > input%jspins,cell%omtil,atoms%nat,atoms%pos, > cell%amat,cell%bmat,atoms%taual,num_wann, > atoms%ntype,atoms%neq,atoms%zatom,l_nocosoc) `````` Markus Betzinger committed Apr 26, 2016 100 101 102 103 104 105 106 `````` wann%l_stopopt=.true. endif c-----calculate polarization, if not wannierize c-----if wannierize, then calculate polarization later (after wannierize) if(wann%l_dipole.and..not.wann%l_wannierize)then call wann_dipole( `````` Gregor Michalicek committed Aug 10, 2017 107 108 `````` > input%jspins,cell%omtil,atoms%nat,atoms%pos, > cell%amat,atoms%ntype,atoms%neq,atoms%zatom) `````` Markus Betzinger committed Apr 26, 2016 109 110 111 `````` wann%l_stopopt=.true. endif `````` Gregor Michalicek committed May 31, 2016 112 `````` IF(wann%l_stopopt) CALL juDFT_end("wann_optional done",1) ! The 1 is temporarily. Should be mpi%irank. `````` Markus Betzinger committed Apr 26, 2016 113 114 115 `````` end subroutine wann_optional end module m_wann_optional``````