Merge lp:~nickpapior/siesta/4.1-streamline-file-dim-nc-soc into lp:siesta/4.1

Proposed by Nick Papior
Status: Merged
Merge reported by: Alberto Garcia
Merged at revision: not available
Proposed branch: lp:~nickpapior/siesta/4.1-streamline-file-dim-nc-soc
Merge into: lp:siesta/4.1
Diff against target: 1060 lines (+555/-116) (has conflicts)
24 files modified
Src/ioeig.f (+33/-17)
Src/writewave.F (+3/-3)
Tests/bi2se3-stm-denchar/Makefile (+6/-0)
Tests/bi2se3-stm-denchar/README (+9/-0)
Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf (+185/-0)
Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos (+1/-0)
Tests/bi2se3-sts-denchar/Makefile (+6/-0)
Tests/bi2se3-sts-denchar/README (+9/-0)
Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf (+182/-0)
Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos (+1/-0)
Util/COOP/dm_creator.F90 (+8/-3)
Util/COOP/fat.f90 (+6/-4)
Util/COOP/mprop.f90 (+1/-1)
Util/COOP/spin_texture.f90 (+1/-1)
Util/Denchar/Src/denchar.f (+1/-1)
Util/Denchar/Src/wavofr.f (+73/-69)
Util/Eig2DOS/Eig2DOS.f90 (+15/-9)
Util/STM/ol-stm/Src/mainstm.F (+1/-1)
Util/STM/ol-stm/Src/stm.f (+6/-3)
Util/WFS/readwfx.f90 (+1/-1)
Util/WFS/wfs2wfsx.f (+1/-1)
Util/WFS/wfsnc2wfsx.F90 (+1/-1)
Util/WFS/wfsx2wfs.f (+1/-1)
version.info (+4/-0)
Text conflict in version.info
To merge this branch: bzr merge lp:~nickpapior/siesta/4.1-streamline-file-dim-nc-soc
Reviewer Review Type Date Requested Status
Alberto Garcia Approve
Review via email: mp+372995@code.launchpad.net

Commit message

Changed spin-index integers from NC/SOC == 4, to NC == 4, SOC == 8

This is to streamline the files across and enables utilities
to distinguish between NC and SOC calculations.
Such distinguishing is generally not needed, but it may be
useful in some cases.

Two test cases are added:
- bi2se3-stm-denchar
- bi2se3-sts-denchar

where I have tested this against 4.1 for stm and denchar
executable.

Description of the change

Some of the files contains the nspin index which generally was limited to 4.

However, to ensure an equal file basis across the files we now allow nspin == 8 for SOC
calculations.

This is to enable utilities to differentiate between NC and SOC calculations which may be
useful in some situations.

Out of consistency it is better to unify this across all files to ensure correct handling.

To post a comment you must log in.
Revision history for this message
Alberto Garcia (albertog) wrote :

I agree with most changes, except those mentioned in the comments below. One is cosmetic, the other I think it leads to wrong behavior.

Beyond these, I have some other cosmetic comments in the code:

- Change 'adviced' to 'advised' (this comes from earlier commits)
- In the new output of Eig2DOS, a message appropriate for nspin=1 is missing. It would print
        "# Eigenvalues calculated from a spin-polarized calculation"

review: Needs Fixing
1121. By Nick Papior

Backported a change in Denchar-wavofr which was wrong

Also fixed NC/SOC NumberOfEigenstates outputs for eigenvalues.
This simply required a streamlining of data in the ioeig routine
which was very simple.

Revision history for this message
Nick Papior (nickpapior) wrote :

I have backported the wrong-doings!

1. wavofr now is the same as before (please do double check)
2. I have reverted Eig2DOS and ioeig to write out bands. I also added a comment
3. I have fixed the NumberOfEigenstates output for ioeig in case of NC/SOC calculations and tested this on the mix_broyden test (NC).

I will fix adviced on the 4.1 branch (I can only find it in unrelated codes).

Revision history for this message
Nick Papior (nickpapior) wrote :

Added comments to comments ;)

Revision history for this message
Alberto Garcia (albertog) wrote :

OK.

I have added a few more comments around the "ravel" call in ioeig.

Also, I have included a check for nspin>2 in the wfs2wfsx converters, as they will not work in that case. There should be no WFS or WFS.nc files with nspin>2...

The changes are in my working directory. I will do the merge directly myself after pulling later
changes to 4.1. That is why I say "comment only" now.

Revision history for this message
Alberto Garcia (albertog) wrote :

Approved and merged.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Src/ioeig.f'
--- Src/ioeig.f 2019-02-25 14:21:14 +0000
+++ Src/ioeig.f 2019-09-26 07:10:24 +0000
@@ -20,13 +20,13 @@
20 implicit none20 implicit none
2121
22 integer, intent(in) :: no ! no_u: number of orbitals in unit cell22 integer, intent(in) :: no ! no_u: number of orbitals in unit cell
23 integer, intent(in) :: nspin ! 'nspin_grid': 1, 2, or 423 integer, intent(in) :: nspin ! 'nspin_grid': 1, 2, 4 or 8
24 integer, intent(in) :: nk24 integer, intent(in) :: nk
25 integer, intent(in) :: maxo ! no_u again25 integer, intent(in) :: maxo ! no_u again
26 integer, intent(in) :: nspinor26 integer, intent(in) :: nspinor
27 integer, intent(in) :: maxk27 integer, intent(in) :: maxk
28 real(dp), intent(in) :: ef28 real(dp), intent(in) :: ef
29 real(dp), intent(in) :: eo(maxo, nspinor, maxk)29 real(dp), intent(in), target :: eo(maxo, nspinor, maxk)
30 real(dp), intent(in) :: kpoints(3,nk)30 real(dp), intent(in) :: kpoints(3,nk)
31 real(dp), intent(in) :: kweights(nk)31 real(dp), intent(in) :: kweights(nk)
32 32
@@ -34,6 +34,7 @@
3434
35c Internal 35c Internal
36 integer ik, iu, io, is36 integer ik, iu, io, is
37 real(dp), pointer :: eok(:)
3738
38 character(len=label_length+4) :: fname39 character(len=label_length+4) :: fname
39c -------------------------------------------------------------------40c -------------------------------------------------------------------
@@ -44,20 +45,25 @@
44 open( iu, file=fname, form='formatted', status='unknown' ) 45 open( iu, file=fname, form='formatted', status='unknown' )
4546
46 write(iu,"(e17.9)") ef/eV47 write(iu,"(e17.9)") ef/eV
48 ! The output corresponds to the number of bands.
49 ! Thus it shouldn't be confused with the number of orbitals,
50 ! although they are related!
47 if ( nspin > nspinor ) then51 if ( nspin > nspinor ) then
48 ! NC/SOC case: a single block of wavefunctions (without spin tag)52 write(iu,"(tr1,i10,tr1,i0,tr1,i10)") 2*no, nspin, nk
49 ! nspin (4) will be used here to signal NC/SOC to utilities such as
50 ! Eig2DOS
51 write(iu,"(tr1,i10,i2,tr1,i10)") no*2, nspin, nk
52 else53 else
53 write(iu,"(tr1,i10,i2,tr1,i10)") no, min(nspin,2), nk54 ! This will always be nspin == nspinor with max(nspinor) == 2
55 write(iu,"(tr1,i10,tr1,i0,tr1,i10)") no, nspin, nk
54 end if56 end if
55 do ik = 1,nk57 do ik = 1,nk
56 ! This statement will correctly print eo in the NC/SOC case,58 if ( nspin > nspinor ) then
57 ! as the eigenvalues take up two complete 'io' columns,59 ! ensure we catch users doing neigwanted calculations
58 ! and nspinor = 2. 60 call ravel(maxo * nspinor, eo(1,1,ik), eok)
59 write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")61 write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")
60 . ik, ((eo(io,is,ik)/eV,io=1,no),is=1,nspinor)62 . ik, (eok(io)/eV,io=1,no*nspinor)
63 else
64 write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")
65 . ik, ((eo(io,is,ik)/eV,io=1,no),is=1,nspinor)
66 end if
61 enddo67 enddo
6268
63 call io_close( iu )69 call io_close( iu )
@@ -74,12 +80,13 @@
74 call cmlStartPropertyList(mainXML, dictRef='siesta:kpt_band')80 call cmlStartPropertyList(mainXML, dictRef='siesta:kpt_band')
75 do ik = 1, nk81 do ik = 1, nk
76 call cmlAddKPoint(xf=mainXML, coords=kpoints(:, ik), 82 call cmlAddKPoint(xf=mainXML, coords=kpoints(:, ik),
77 . weight=kweights(ik))83 . weight=kweights(ik))
84 ! ensure we catch users doing neigwanted calculations
85 call ravel(maxo * nspinor, eo(1,1,ik), eok)
78 call cmlAddProperty(xf=mainXML,86 call cmlAddProperty(xf=mainXML,
79 . value=reshape(eo(1:no,1:nspinor,ik)/eV,87 . value=eok(no*nspinor)/eV,
80 . (/no*nspinor/)),88 . dictRef='siesta:eigenenergies',
81 . dictRef='siesta:eigenenergies',89 . units='siestaUnits:ev')
82 . units='siestaUnits:ev')
83 end do90 end do
84 call cmlEndPropertyList(mainXML)91 call cmlEndPropertyList(mainXML)
85 else92 else
@@ -105,5 +112,14 @@
105 end if112 end if
106 call cmlEndPropertyList(mainXML)113 call cmlEndPropertyList(mainXML)
107 endif114 endif
115
116 contains
117
118 subroutine ravel(n, eo, eop)
119 integer, intent(in) :: n
120 real(dp), intent(in), target :: eo(n)
121 real(dp), pointer :: eop(:)
122 eop => eo(:)
123 end subroutine
108 124
109 end subroutine ioeig125 end subroutine ioeig
110126
=== modified file 'Src/writewave.F'
--- Src/writewave.F 2019-08-08 11:55:07 +0000
+++ Src/writewave.F 2019-09-26 07:10:24 +0000
@@ -540,12 +540,12 @@
540 write(6,'(a)') 'writewave: Wave Functions Coefficients'540 write(6,'(a)') 'writewave: Wave Functions Coefficients'
541 write(6,*)541 write(6,*)
542 write(6,'(a26,2x,i6)') 'Number of k-points = ', nk542 write(6,'(a26,2x,i6)') 'Number of k-points = ', nk
543 write(6,'(a26,2x,i6)') 'Number of Spins = ', spin%Grid543 write(6,'(a26,2x,i6)') 'Number of Spins = ', spin%H
544 write(6,'(a26,2x,i6)') 'Number of basis orbs = ',nuotot544 write(6,'(a26,2x,i6)') 'Number of basis orbs = ',nuotot
545 write(6,*)545 write(6,*)
546 endif546 endif
547 write(iu) nk, gamma547 write(iu) nk, gamma
548 write(iu) spin%Grid ! This will be 1, 2, or 4548 write(iu) spin%H ! This will be 1, 2, 4 or 8 (to signal NC from SOC)
549 write(iu) nuotot549 write(iu) nuotot
550 write(iu) (iaorb(j),labelfis(isa(iaorb(j))),550 write(iu) (iaorb(j),labelfis(isa(iaorb(j))),
551 . iphorb(j), cnfigfio(isa(iaorb(j)),iphorb(j)),551 . iphorb(j), cnfigfio(isa(iaorb(j)),iphorb(j)),
@@ -738,7 +738,7 @@
738 write(6,*)738 write(6,*)
739 write(6,'(a22,2x,i6,2x,3f10.6)') 'k-point = ',ik, k(1:3)739 write(6,'(a22,2x,i6,2x,3f10.6)') 'k-point = ',ik, k(1:3)
740 if (non_coll) then740 if (non_coll) then
741 write(6,'(a22,2x,i6)') 'Spin component (non-collinear)= ',0741 write(6,'(a22,2x)') 'Spinors are mixed'
742 else742 else
743 write(6,'(a22,2x,i6)') 'Spin component = ',ispin743 write(6,'(a22,2x,i6)') 'Spin component = ',ispin
744 endif744 endif
745745
=== added directory 'Tests/bi2se3-stm-denchar'
=== added file 'Tests/bi2se3-stm-denchar/Makefile'
--- Tests/bi2se3-stm-denchar/Makefile 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-stm-denchar/Makefile 2019-09-26 07:10:24 +0000
@@ -0,0 +1,6 @@
1#
2# Single-test makefile
3#
4name=bi2se3-stm-denchar
5#
6include ../test.mk
07
=== added file 'Tests/bi2se3-stm-denchar/README'
--- Tests/bi2se3-stm-denchar/README 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-stm-denchar/README 2019-09-26 07:10:24 +0000
@@ -0,0 +1,9 @@
1This example also involves denchar and stm.
2
3To complete this example you also need to
4run the following things:
5
61. Go into work directory
72. Create a soft-link using: ln -s bi2se3-stm-denchar.bands.WFSX bi2se3-stm-denchar.WFSX
83. Run denchar < ../bi2se3-stm-denchar.fdf
94. Run stm < ../bi2se3-stm-denchar.fdf
010
=== added file 'Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf'
--- Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf 2019-09-26 07:10:24 +0000
@@ -0,0 +1,185 @@
1#
2# Three quintuple layers of Bi2Se3 to test the calculation of the spin texture.
3# This calculation will produce HSX and WFSX files that can be processed by
4# the Util/COOP/spin_texture utility program.
5#
6# (thanks to Roberto Robles)
7#
8SystemName bi2se3-stm-denchar
9SystemLabel bi2se3-stm-denchar
10
11# Geom
12NumberOfAtoms 15
13NumberOfSpecies 2
14%block ChemicalSpeciesLabel
15 1 83 Bi
16 2 34 Se
17%endblock ChemicalSpeciesLabel
18LatticeConstant 4.13800000 Ang
19%block LatticeVectors
20 1.0000000000000000 0.0000000000000000 0.0000000000000000
21 -0.5000000000000000 0.8660254037844386 0.0000000000000000
22 0.0000000000000000 0.0000000000000000 11.7544706113098112
23%endblock LatticeVectors
24AtomicCoordinatesFormat Fractional
25%block AtomicCoordinatesAndAtomicSpecies
26 0.6666666666666667 0.3333333333333333 0.2650624783220366 1 1 Bi
27 0.3333333333333333 0.6666666666666667 0.3423936279930260 1 2 Bi
28 0.3333333333333333 0.6666666666666667 0.4613344252566094 1 3 Bi
29 0.0000000000000000 0.0000000000000000 0.5386655576677342 1 4 Bi
30 0.0000000000000000 0.0000000000000000 0.6576063590530268 1 5 Bi
31 0.6666666666666667 0.3333333333333333 0.7349374737996754 1 6 Bi
32 0.3333333333333333 0.6666666666666667 0.2287521714264216 2 7 Se
33 0.0000000000000000 0.0000000000000000 0.3037280662035826 2 8 Se
34 0.6666666666666667 0.3333333333333333 0.3787039395991627 2 9 Se
35 0.0000000000000000 0.0000000000000000 0.4250241177721818 2 10 Se
36 0.6666666666666667 0.3333333333333333 0.5000000000000000 2 11 Se
37 0.3333333333333333 0.6666666666666667 0.5749758645633420 2 12 Se
38 0.6666666666666667 0.3333333333333333 0.6212960521574118 2 13 Se
39 0.3333333333333333 0.6666666666666667 0.6962719343852299 2 14 Se
40 0.0000000000000000 0.0000000000000000 0.7712478166130481 2 15 Se
41%endblock AtomicCoordinatesAndAtomicSpecies
42
43# Basis
44PAO.EnergyShift 100 meV ! Extension of AOs (smaller => more extended)
45PAO.SplitNorm 0.15
46PAO.SplitNormH 0.50
47PAO.SoftDefault T
48%block PAO.Basis
49 Se 3
50 n=4 0 2 ! n,l,#zetas
51 0.0 0.0 ! default
52 n=4 1 2
53 0.0 0.0
54 n=3 2 1
55 0.0
56 Bi 3
57 n=6 0 2
58 0.0 0.0
59 n=6 1 2
60 0.0 0.0
61 n=5 2 1
62 0.0
63%endblock PAO.Basis
64
65xc.functional GGA # Exchange-correlation functional
66xc.authors PBE # Exchange-correlation version
67
68%block DM.InitSpin
69 1 0. 0. 0.
70 2 0. 0. 0.
71 3 0. 0. 0.
72 4 0. 0. 0.
73 5 0. 0. 0.
74 6 0. 0. 0.
75 7 0. 0. 0.
76 8 0. 0. 0.
77 9 0. 0. 0.
7810 0. 0. 0.
7911 0. 0. 0.
8012 0. 0. 0.
8113 0. 0. 0.
8214 0. 0. 0.
8315 0. 0. 0.
84%endblock DM.InitSpin
85
86SolutionMethod diagon
87
88%block kgrid_Monkhorst_Pack
89 3 0 0 0.0
90 0 3 0 0.0
91 0 0 1 0.0
92%endblock kgrid_Monkhorst_Pack
93
94 ################ SCF options #############
95SolutionMethod diagon
96ElectronicTemperature 0.0010 eV
97MaxSCFIterations 300
98DM.NumberPulay 3
99DM.MixingWeight 0.0100
100MeshCutoff 300.0000 Ry
101DM.Tolerance 1.E-4
102SCF.H.Converge F
103UseSaveData F
104DM.UseSaveDM T
105SpinOrbit T
106SaveElectrostaticPotential true
107
108# ---- SPIN TEXTURE
109#
110# We use a 'BandPoints' block to generate the states at chosen k-points
111# These keywords are necessary to generate the HSX and WFSX files
112#
113SaveHS T
114WFS.Write.For.Bands T
115#
116# These keywords could be used to limit the number of bands stored in the WFSX file
117
118Wfs.band.min 190
119Wfs.band.max 230
120
121BandLinesScale pi/a
122%block BandPoints
123 0.0 0.0 0.0 1
124 0.2 0.1 0.0 1.
125%endblock BandPoints
126
127
128
129# *************************************************************************
130# Input variables for Denchar
131# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
132# *************************************************************************
133
134Write.Denchar true
135Denchar.TypeOfRun 3D
136
137Denchar.PlotCharge F
138Denchar.PlotWaveFunctions T
139
140Denchar.CoorUnits bohr # Format for coordinate of the points
141 # Bohr
142 # Ang
143
144Denchar.DensityUnits Ele/bohr**3 # Units of Charge Density
145 # Ele/bohr**3
146 # Ele/Ang**3
147 # Ele/UnitCell
148
149Denchar.MinX -0.10 bohr # Minimum coord of the window in X-dir
150Denchar.MaxX 4.0 bohr # Maximum coord of the window in X-dir
151
152Denchar.MinY -0.1 bohr # Minimum coord of the window in Y-dir
153Denchar.MaxY 5.0 bohr # Maximum coord of the window in Y-dir
154
155Denchar.MinZ 23.0 bohr # Maximum coord of the window in X-dir
156Denchar.MaxZ 71.0 bohr # Maximum coord of the window in X-dir
157
158Denchar.NumberPointsX 30 # Number of points in X-axis
159Denchar.NumberPointsY 30 # Number of points in Y-axis
160Denchar.NumberPointsZ 30 # Number of points in Y-axis
161
162
163# *************************************************************************
164# Input variables for STM
165# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
166# *************************************************************************
167STM.DensityUnits Ele/bohr**3 # Units of Charge Density
168 # Ele/bohr**3
169 # Ele/Ang**3
170 # Ele/UnitCell
171
172STM.MinZ 37.0 Ang # Minimum coordinate of the window in Z-dir
173STM.MaxZ 40.0 Ang # Maximum coordinate of the window in Z-dir
174STM.RefZ 37.0 Ang # Reference plane to propagate wf into vacuum
175STM.VacZ 40.0 Ang # Reference plane to compute vacuum potential
176
177STM.Emin -6.3 eV
178STM.Emax -1.0 eV
179
180STM.NumberPointsX 48 # Number of points in X-axis
181STM.NumberPointsY 48 # Number of points in Y-axis
182STM.NumberPointsZ 48 # Number of points in Z-axis
183
184STM.NumberCellsX 1
185STM.NumberCellsY 1
0186
=== added file 'Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos'
--- Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos 2019-09-26 07:10:24 +0000
@@ -0,0 +1,1 @@
1Bi Se
02
=== added directory 'Tests/bi2se3-sts-denchar'
=== added file 'Tests/bi2se3-sts-denchar/Makefile'
--- Tests/bi2se3-sts-denchar/Makefile 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-sts-denchar/Makefile 2019-09-26 07:10:24 +0000
@@ -0,0 +1,6 @@
1#
2# Single-test makefile
3#
4name=bi2se3-sts-denchar
5#
6include ../test.mk
07
=== added file 'Tests/bi2se3-sts-denchar/README'
--- Tests/bi2se3-sts-denchar/README 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-sts-denchar/README 2019-09-26 07:10:24 +0000
@@ -0,0 +1,9 @@
1This example also involves denchar and stm.
2
3To complete this example you also need to
4run the following things:
5
61. Go into work directory
72. Create a soft-link using: ln -s bi2se3-sts-denchar.bands.WFSX bi2se3-sts-denchar.WFSX
83. Run denchar < ../bi2se3-sts-denchar.fdf
94. Run stm < ../bi2se3-sts-denchar.fdf
010
=== added file 'Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf'
--- Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf 2019-09-26 07:10:24 +0000
@@ -0,0 +1,182 @@
1#
2# Three quintuple layers of Bi2Se3 to test the calculation of the spin texture.
3# This calculation will produce HSX and WFSX files that can be processed by
4# the Util/COOP/spin_texture utility program.
5#
6# (thanks to Roberto Robles)
7#
8SystemName bi2se3-sts-denchar
9SystemLabel bi2se3-sts-denchar
10
11# Geom
12NumberOfAtoms 15
13NumberOfSpecies 2
14%block ChemicalSpeciesLabel
15 1 83 Bi
16 2 34 Se
17%endblock ChemicalSpeciesLabel
18LatticeConstant 4.13800000 Ang
19%block LatticeVectors
20 1.0000000000000000 0.0000000000000000 0.0000000000000000
21 -0.5000000000000000 0.8660254037844386 0.0000000000000000
22 0.0000000000000000 0.0000000000000000 11.7544706113098112
23%endblock LatticeVectors
24AtomicCoordinatesFormat Fractional
25%block AtomicCoordinatesAndAtomicSpecies
26 0.6666666666666667 0.3333333333333333 0.2650624783220366 1 1 Bi
27 0.3333333333333333 0.6666666666666667 0.3423936279930260 1 2 Bi
28 0.3333333333333333 0.6666666666666667 0.4613344252566094 1 3 Bi
29 0.0000000000000000 0.0000000000000000 0.5386655576677342 1 4 Bi
30 0.0000000000000000 0.0000000000000000 0.6576063590530268 1 5 Bi
31 0.6666666666666667 0.3333333333333333 0.7349374737996754 1 6 Bi
32 0.3333333333333333 0.6666666666666667 0.2287521714264216 2 7 Se
33 0.0000000000000000 0.0000000000000000 0.3037280662035826 2 8 Se
34 0.6666666666666667 0.3333333333333333 0.3787039395991627 2 9 Se
35 0.0000000000000000 0.0000000000000000 0.4250241177721818 2 10 Se
36 0.6666666666666667 0.3333333333333333 0.5000000000000000 2 11 Se
37 0.3333333333333333 0.6666666666666667 0.5749758645633420 2 12 Se
38 0.6666666666666667 0.3333333333333333 0.6212960521574118 2 13 Se
39 0.3333333333333333 0.6666666666666667 0.6962719343852299 2 14 Se
40 0.0000000000000000 0.0000000000000000 0.7712478166130481 2 15 Se
41%endblock AtomicCoordinatesAndAtomicSpecies
42
43# Basis
44PAO.EnergyShift 100 meV ! Extension of AOs (smaller => more extended)
45PAO.SplitNorm 0.15
46PAO.SplitNormH 0.50
47PAO.SoftDefault T
48%block PAO.Basis
49 Se 3
50 n=4 0 2 ! n,l,#zetas
51 0.0 0.0 ! default
52 n=4 1 2
53 0.0 0.0
54 n=3 2 1
55 0.0
56 Bi 3
57 n=6 0 2
58 0.0 0.0
59 n=6 1 2
60 0.0 0.0
61 n=5 2 1
62 0.0
63%endblock PAO.Basis
64
65xc.functional GGA # Exchange-correlation functional
66xc.authors PBE # Exchange-correlation version
67
68%block DM.InitSpin
69 1 0. 0. 0.
70 2 0. 0. 0.
71 3 0. 0. 0.
72 4 0. 0. 0.
73 5 0. 0. 0.
74 6 0. 0. 0.
75 7 0. 0. 0.
76 8 0. 0. 0.
77 9 0. 0. 0.
7810 0. 0. 0.
7911 0. 0. 0.
8012 0. 0. 0.
8113 0. 0. 0.
8214 0. 0. 0.
8315 0. 0. 0.
84%endblock DM.InitSpin
85
86SolutionMethod diagon
87
88%block kgrid_Monkhorst_Pack
89 3 0 0 0.0
90 0 3 0 0.0
91 0 0 1 0.0
92%endblock kgrid_Monkhorst_Pack
93
94 ################ SCF options #############
95SolutionMethod diagon
96ElectronicTemperature 0.0010 eV
97MaxSCFIterations 300
98DM.NumberPulay 3
99DM.MixingWeight 0.0100
100MeshCutoff 300.0000 Ry
101DM.Tolerance 1.E-4
102SCF.H.Converge F
103UseSaveData F
104DM.UseSaveDM T
105SpinOrbit T
106SaveElectrostaticPotential true
107
108# ---- SPIN TEXTURE
109#
110# We use a 'BandPoints' block to generate the states at chosen k-points
111# These keywords are necessary to generate the HSX and WFSX files
112#
113SaveHS T
114WFS.Write.For.Bands T
115#
116# These keywords could be used to limit the number of bands stored in the WFSX file
117
118Wfs.band.min 190
119Wfs.band.max 230
120
121BandLinesScale pi/a
122%block BandPoints
123 0.0 0.0 0.0 1
124 0.2 0.1 0.0 1.
125%endblock BandPoints
126
127
128# *************************************************************************
129# Input variables for Denchar
130# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
131# *************************************************************************
132
133Write.Denchar true
134Denchar.TypeOfRun 3D
135
136Denchar.PlotCharge F
137Denchar.PlotWaveFunctions T
138
139Denchar.CoorUnits bohr # Format for coordinate of the points
140 # Bohr
141 # Ang
142
143Denchar.DensityUnits Ele/bohr**3 # Units of Charge Density
144 # Ele/bohr**3
145 # Ele/Ang**3
146 # Ele/UnitCell
147
148Denchar.MinX -0.10 bohr # Minimum coord of the window in X-dir
149Denchar.MaxX 4.0 bohr # Maximum coord of the window in X-dir
150
151Denchar.MinY -0.1 bohr # Minimum coord of the window in Y-dir
152Denchar.MaxY 5.0 bohr # Maximum coord of the window in Y-dir
153
154Denchar.MinZ 23.0 bohr # Maximum coord of the window in X-dir
155Denchar.MaxZ 71.0 bohr # Maximum coord of the window in X-dir
156
157Denchar.NumberPointsX 30 # Number of points in X-axis
158Denchar.NumberPointsY 30 # Number of points in Y-axis
159Denchar.NumberPointsZ 30 # Number of points in Y-axis
160
161
162# *************************************************************************
163# Input variables for STM
164# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
165# *************************************************************************
166STS.NumberOfPoints 30
167STM.DensityUnits Ele/bohr**3 # Units of Charge Density
168 # Ele/bohr**3
169 # Ele/Ang**3
170 # Ele/UnitCell
171
172STM.MinZ 37.0 Ang # Minimum coordinate of the window in Z-dir
173STM.MaxZ 37.0 Ang # Maximum coordinate of the window in Z-dir
174STM.RefZ 37.0 Ang # Reference plane to propagate wf into vacuum
175STM.VacZ 40.0 Ang # Reference plane to compute vacuum potential
176
177STM.Emin -6.3 eV
178STM.Emax -1.0 eV
179
180STM.NumberPointsX 48 # Number of points in X-axis
181STM.NumberPointsY 48 # Number of points in Y-axis
182STM.NumberPointsZ 1 # Number of points in Z-axis
0183
=== added file 'Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos'
--- Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos 1970-01-01 00:00:00 +0000
+++ Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos 2019-09-26 07:10:24 +0000
@@ -0,0 +1,1 @@
1Bi Se
02
=== modified file 'Util/COOP/dm_creator.F90'
--- Util/COOP/dm_creator.F90 2019-02-26 09:08:49 +0000
+++ Util/COOP/dm_creator.F90 2019-09-26 07:10:24 +0000
@@ -78,13 +78,18 @@
78 allocate (wk(nkp), pk(3,nkp))78 allocate (wk(nkp), pk(3,nkp))
7979
80 read(wfs_u) nsp80 read(wfs_u) nsp
81 non_coll = (nsp == 4)
82 read(wfs_u) nao81 read(wfs_u) nao
83 read(wfs_u) !! Symbols, etc82 read(wfs_u) !! Symbols, etc
84 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao83 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao
8584
86 if (non_coll) then85 if ( nsp == 8 ) then
87 nspin_blocks = 186 if (debug) print *, "WFSX from spin-orbit calculation"
87 nspin_blocks = 1
88 non_coll = .true.
89 else if ( nsp == 4 ) then
90 if (debug) print *, "WFSX from non-collinear calculation"
91 nspin_blocks = 1
92 non_coll = .true.
88 else93 else
89 nspin_blocks = nsp94 nspin_blocks = nsp
90 endif95 endif
9196
=== modified file 'Util/COOP/fat.f90'
--- Util/COOP/fat.f90 2019-02-15 15:50:41 +0000
+++ Util/COOP/fat.f90 2019-09-26 07:10:24 +0000
@@ -120,7 +120,7 @@
120 allocate (wk(nkp), pk(3,nkp))120 allocate (wk(nkp), pk(3,nkp))
121121
122 read(wfs_u) nsp122 read(wfs_u) nsp
123 non_coll = (nsp == 4)123 non_coll = (nsp >= 4)
124 read(wfs_u) nao124 read(wfs_u) nao
125 read(wfs_u) !! Symbols, etc125 read(wfs_u) !! Symbols, etc
126 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao126 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao
@@ -273,10 +273,12 @@
273 enddo273 enddo
274 enddo274 enddo
275275
276 if (non_coll) then276 if ( nsp == 8 ) then
277 write(stt_u,"(/'SPIN (non-coll): ',i2)") nspin_blocks277 write(stt_u,"(/'SPIN (spin-orbit): ',i2)") nspin_blocks
278 else if ( nsp == 4 ) then
279 write(stt_u,"(/'SPIN (non-coll): ',i2)") nspin_blocks
278 else280 else
279 write(stt_u,"(/'SPIN: ',i2)") nspin_blocks281 write(stt_u,"(/'SPIN: ',i2)") nspin_blocks
280 endif282 endif
281 283
282 write(stt_u,"(/'AO LIST:')")284 write(stt_u,"(/'AO LIST:')")
283285
=== modified file 'Util/COOP/mprop.f90'
--- Util/COOP/mprop.f90 2019-02-27 15:31:08 +0000
+++ Util/COOP/mprop.f90 2019-09-26 07:10:24 +0000
@@ -141,7 +141,7 @@
141 allocate (wk(nkp), pk(3,nkp))141 allocate (wk(nkp), pk(3,nkp))
142142
143 read(wfs_u) wfs_spin_flag ! 1, 2, or 4 143 read(wfs_u) wfs_spin_flag ! 1, 2, or 4
144 non_coll = (wfs_spin_flag == 4)144 non_coll = (wfs_spin_flag >= 4)
145 read(wfs_u) nao145 read(wfs_u) nao
146 read(wfs_u) !! Symbols, etc146 read(wfs_u) !! Symbols, etc
147 if (debug) print *, "WFSX read: nkp, nspin_flag, nnao: ", nkp, wfs_spin_flag, nao147 if (debug) print *, "WFSX read: nkp, nspin_flag, nnao: ", nkp, wfs_spin_flag, nao
148148
=== modified file 'Util/COOP/spin_texture.f90'
--- Util/COOP/spin_texture.f90 2019-06-07 16:27:46 +0000
+++ Util/COOP/spin_texture.f90 2019-09-26 07:10:24 +0000
@@ -102,7 +102,7 @@
102 allocate (wk(nkp), pk(3,nkp))102 allocate (wk(nkp), pk(3,nkp))
103103
104 read(wfs_u) nsp104 read(wfs_u) nsp
105 non_coll = (nsp == 4)105 non_coll = (nsp >= 4)
106 if (.not. (non_coll)) then106 if (.not. (non_coll)) then
107 STOP "Spin texture not available for collinear-spin"107 STOP "Spin texture not available for collinear-spin"
108 endif108 endif
109109
=== modified file 'Util/Denchar/Src/denchar.f'
--- Util/Denchar/Src/denchar.f 2019-06-08 15:41:39 +0000
+++ Util/Denchar/Src/denchar.f 2019-09-26 07:10:24 +0000
@@ -264,7 +264,7 @@
264264
265 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin265 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin
266 ! files, which contain two spin blocks per k section.266 ! files, which contain two spin blocks per k section.
267 non_coll = (nspin_wfsx == 4)267 non_coll = (nspin_wfsx >= 4)
268 nspin_blocks = nspin_wfsx268 nspin_blocks = nspin_wfsx
269 if (non_coll) nspin_blocks = 1269 if (non_coll) nspin_blocks = 1
270270
271271
=== modified file 'Util/Denchar/Src/wavofr.f'
--- Util/Denchar/Src/wavofr.f 2019-06-08 15:41:39 +0000
+++ Util/Denchar/Src/wavofr.f 2019-09-26 07:10:24 +0000
@@ -49,7 +49,7 @@
49C INTEGER NO : Total number of orbitals in Supercell49C INTEGER NO : Total number of orbitals in Supercell
50C INTEGER NO_U : Total number of orbitals in Unit Cell50C INTEGER NO_U : Total number of orbitals in Unit Cell
51C INTEGER MAXNA : Maximum number of neighbours of any atom51C INTEGER MAXNA : Maximum number of neighbours of any atom
52C INTEGER NSPIN : Number of different spin polarizations: 1, 2, 452C INTEGER NSPIN : Number of different spin polarizations: 1, 2, 4, 8
53! integer nspin_blocks : blocks in WFSX file 53! integer nspin_blocks : blocks in WFSX file
54! logical non_coll : NC/SOC wfs data?54! logical non_coll : NC/SOC wfs data?
55C INTEGER ISA(NA) : Species index of each atom55C INTEGER ISA(NA) : Species index of each atom
@@ -174,6 +174,17 @@
174174
175 PI = 4.0D0 * ATAN(1.0D0)175 PI = 4.0D0 * ATAN(1.0D0)
176176
177 select case ( NSPIN )
178 case ( 1, 2, 4, 8 )
179! ok
180 case default
181 WRITE(6,*)'BAD NUMBER NSPIN IN WAVOFR.F'
182 WRITE(6,*)'NSPIN = ',NSPIN
183 WRITE(6,*)'IT MUST BE 1, 2, 4 or 8'
184 STOP
185 end select
186
187
177 NPLAMAX = NPX * NPY * NPZ188 NPLAMAX = NPX * NPY * NPZ
178189
179 ALLOCATE(PLAPO(NPLAMAX,3))190 ALLOCATE(PLAPO(NPLAMAX,3))
@@ -343,7 +354,7 @@
343 . FORM = 'FORMATTED')354 . FORM = 'FORMATTED')
344 REWIND(UNITPH1)355 REWIND(UNITPH1)
345356
346 ELSEIF ((NSPIN .EQ. 2) .or. (NSPIN == 4)) THEN357 ELSE ! nspin >= 2
347 ! We will reuse 'up' and 'down' for the spinor components358 ! We will reuse 'up' and 'down' for the spinor components
348 IF (IDIMEN .EQ. 2) THEN359 IF (IDIMEN .EQ. 2) THEN
349 FN_URE = TRIM(SNAME)//'.CON.K' //360 FN_URE = TRIM(SNAME)//'.CON.K' //
@@ -405,11 +416,6 @@
405 OPEN(UNIT = UNITPH2, FILE = FN_DPH, STATUS = 'UNKNOWN',416 OPEN(UNIT = UNITPH2, FILE = FN_DPH, STATUS = 'UNKNOWN',
406 . FORM = 'FORMATTED')417 . FORM = 'FORMATTED')
407 REWIND(UNITPH2)418 REWIND(UNITPH2)
408 ELSE
409 WRITE(6,*)'BAD NUMBER NSPIN IN WAVOFR.F'
410 WRITE(6,*)'NSPIN = ',NSPIN
411 WRITE(6,*)'IT MUST BE 1, 2, or 4'
412 STOP
413 ENDIF419 ENDIF
414420
415 IF (IDIMEN .EQ. 2) THEN421 IF (IDIMEN .EQ. 2) THEN
@@ -465,16 +471,16 @@
465 call write_cube_header(unitmo2,fn_dmo)471 call write_cube_header(unitmo2,fn_dmo)
466 call write_cube_header(unitph2,fn_dph)472 call write_cube_header(unitph2,fn_dph)
467 endif473 endif
468 ELSE IF (NSPIN .EQ. 4) THEN474 ELSE ! 4 or 8
469 call write_cube_header(unitre1,fn_ure)475 call write_cube_header(unitre1,fn_ure)
470 call write_cube_header(unitim1,fn_uim)476 call write_cube_header(unitim1,fn_uim)
471 call write_cube_header(unitmo1,fn_umo)477 call write_cube_header(unitmo1,fn_umo)
472 call write_cube_header(unitph1,fn_uph)478 call write_cube_header(unitph1,fn_uph)
473479
474 call write_cube_header(unitre2,fn_dre)480 call write_cube_header(unitre2,fn_dre)
475 call write_cube_header(unitim2,fn_dim)481 call write_cube_header(unitim2,fn_dim)
476 call write_cube_header(unitmo2,fn_dmo)482 call write_cube_header(unitmo2,fn_dmo)
477 call write_cube_header(unitph2,fn_dph)483 call write_cube_header(unitph2,fn_dph)
478484
479 ENDIF485 ENDIF
480 ENDIF486 ENDIF
@@ -576,7 +582,7 @@
576 call mod_and_phase(rwavedn,iwavedn,mwavedn,pwavedn)582 call mod_and_phase(rwavedn,iwavedn,mwavedn,pwavedn)
577 endif583 endif
578584
579 ELSEIF (NSPIN .EQ. 4) THEN585 ELSE ! 4 or 8
580586
581 rwaveup = real(cwave(1), dp)587 rwaveup = real(cwave(1), dp)
582 iwaveup = aimag(cwave(1))588 iwaveup = aimag(cwave(1))
@@ -605,19 +611,19 @@
605 call write_plapo(unitmo2,mwavedn)611 call write_plapo(unitmo2,mwavedn)
606 call write_plapo(unitph2,pwavedn)612 call write_plapo(unitph2,pwavedn)
607 endif613 endif
608 ELSEIF ( NSPIN .EQ. 4 ) THEN614 ELSE ! 4 or 8
609615
610 call write_plapo(unitre1,rwaveup)616 call write_plapo(unitre1,rwaveup)
611 call write_plapo(unitim1,iwaveup)617 call write_plapo(unitim1,iwaveup)
612 call write_plapo(unitmo1,mwaveup)618 call write_plapo(unitmo1,mwaveup)
613 call write_plapo(unitph1,pwaveup)619 call write_plapo(unitph1,pwaveup)
614620
615 call write_plapo(unitre2,rwavedn)621 call write_plapo(unitre2,rwavedn)
616 call write_plapo(unitim2,iwavedn)622 call write_plapo(unitim2,iwavedn)
617 call write_plapo(unitmo2,mwavedn)623 call write_plapo(unitmo2,mwavedn)
618 call write_plapo(unitph2,pwavedn)624 call write_plapo(unitph2,pwavedn)
619625
620 ENDIF626 ENDIF
621 627
622 ELSE IF (IDIMEN .EQ. 3) THEN628 ELSE IF (IDIMEN .EQ. 3) THEN
623 IF (NSPIN .EQ. 1) THEN629 IF (NSPIN .EQ. 1) THEN
@@ -637,17 +643,17 @@
637 MWF(NPO,2) = MWAVEDN643 MWF(NPO,2) = MWAVEDN
638 PWF(NPO,2) = PWAVEDN644 PWF(NPO,2) = PWAVEDN
639 endif645 endif
640 ELSE IF (NSPIN .EQ. 4) THEN646 ELSE ! 4 or 8
641647
642 RWF(NPO,1) = RWAVEUP648 RWF(NPO,1) = RWAVEUP
643 IMWF(NPO,1) = IWAVEUP649 IMWF(NPO,1) = IWAVEUP
644 MWF(NPO,1) = MWAVEUP650 MWF(NPO,1) = MWAVEUP
645 PWF(NPO,1) = PWAVEUP651 PWF(NPO,1) = PWAVEUP
646652
647 RWF(NPO,2) = RWAVEDN653 RWF(NPO,2) = RWAVEDN
648 IMWF(NPO,2) = IWAVEDN654 IMWF(NPO,2) = IWAVEDN
649 MWF(NPO,2) = MWAVEDN655 MWF(NPO,2) = MWAVEDN
650 PWF(NPO,2) = PWAVEDN656 PWF(NPO,2) = PWAVEDN
651657
652 ENDIF658 ENDIF
653 ENDIF659 ENDIF
@@ -668,32 +674,30 @@
668 DO NX=1,NPX674 DO NX=1,NPX
669 DO NY=1,NPY675 DO NY=1,NPY
670676
671 if ( (NSPIN .EQ. 1) .or.677 if ( NSPIN == 1 .or.
672 $ ((NSPIN .EQ.2).and.(ispin.eq.1)) .or. 678 & (NSPIN == 2 .and. ispin == 1 ) .or.
673 $ (NSPIN .EQ.4) ) then679 & NSPIN >= 4 ) then
674680 WRITE(UNITRE1,'(6e13.5)')
675 WRITE(UNITRE1,'(6e13.5)')681 $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
676 $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)682 WRITE(UNITIM1,'(6e13.5)')
677 WRITE(UNITIM1,'(6e13.5)')683 $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
678 $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)684 WRITE(UNITMO1,'(6e13.5)')
679 WRITE(UNITMO1,'(6e13.5)')685 $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
680 $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)686 WRITE(UNITPH1,'(6e13.5)')
681 WRITE(UNITPH1,'(6e13.5)')687 $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
682 $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)688 end if
683 endif
684 689
685 if ( ((NSPIN .EQ.2).and.(ispin.eq.2)) .or. 690 if ( (NSPIN == 2 .and. ispin == 2) .or.
686 $ (NSPIN .EQ.4) ) then691 & NSPIN >= 4 ) then
687692 WRITE(UNITRE2,'(6e13.5)')
688 WRITE(UNITRE2,'(6e13.5)')693 $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
689 $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)694 WRITE(UNITIM2,'(6e13.5)')
690 WRITE(UNITIM2,'(6e13.5)')695 $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
691 $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)696 WRITE(UNITMO2,'(6e13.5)')
692 WRITE(UNITMO2,'(6e13.5)')697 $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
693 $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)698 WRITE(UNITPH2,'(6e13.5)')
694 WRITE(UNITPH2,'(6e13.5)')699 $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
695 $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)700 end if
696 endif
697 ENDDO701 ENDDO
698 ENDDO702 ENDDO
699703
@@ -705,7 +709,7 @@
705 WRITE(6,'(A,A)') ' ',FN_IM709 WRITE(6,'(A,A)') ' ',FN_IM
706 WRITE(6,'(A,A)') ' ',FN_MO710 WRITE(6,'(A,A)') ' ',FN_MO
707 WRITE(6,'(A,A)') ' ',FN_PH711 WRITE(6,'(A,A)') ' ',FN_PH
708 ELSE IF ((NSPIN .EQ. 2) .or. (NSPIN .EQ. 4)) THEN712 ELSE ! 2, 4 or 8
709 WRITE(6,'(A,A)') ' ',FN_URE713 WRITE(6,'(A,A)') ' ',FN_URE
710 WRITE(6,'(A,A)') ' ',FN_UIM714 WRITE(6,'(A,A)') ' ',FN_UIM
711 WRITE(6,'(A,A)') ' ',FN_DRE715 WRITE(6,'(A,A)') ' ',FN_DRE
@@ -714,7 +718,7 @@
714 WRITE(6,'(A,A)') ' ',FN_UPH718 WRITE(6,'(A,A)') ' ',FN_UPH
715 WRITE(6,'(A,A)') ' ',FN_DMO719 WRITE(6,'(A,A)') ' ',FN_DMO
716 WRITE(6,'(A,A)') ' ',FN_DPH720 WRITE(6,'(A,A)') ' ',FN_DPH
717 if (nspin == 4) write(6,"(a)")721 if (nspin >= 4) write(6,"(a)")
718 $ "... up and down for spinor components"722 $ "... up and down for spinor components"
719 ENDIF723 ENDIF
720 ENDIF ! 3D724 ENDIF ! 3D
721725
=== modified file 'Util/Eig2DOS/Eig2DOS.f90'
--- Util/Eig2DOS/Eig2DOS.f90 2019-03-02 23:57:58 +0000
+++ Util/Eig2DOS/Eig2DOS.f90 2019-09-26 07:10:24 +0000
@@ -56,12 +56,12 @@
56 real(dp) :: emin = -huge(1.0_dp)56 real(dp) :: emin = -huge(1.0_dp)
57 real(dp) :: emax = huge(1.0_dp)57 real(dp) :: emax = huge(1.0_dp)
58 real(dp) :: smear = 0.2_dp58 real(dp) :: smear = 0.2_dp
59 real(dp) :: smear2
59 logical :: loren = .false.60 logical :: loren = .false.
60 logical :: emin_given = .false.61 logical :: emin_given = .false.
61 logical :: emax_given = .false.62 logical :: emax_given = .false.
62 logical :: using_weights = .false.63 logical :: using_weights = .false.
63 logical :: shift_efermi = .false.64 logical :: shift_efermi = .false.
64 logical :: non_coll
65 integer :: min_band = 065 integer :: min_band = 0
66 integer :: max_band = 066 integer :: max_band = 0
6767
@@ -155,13 +155,18 @@
155 action="read")155 action="read")
156 read(1,*) Ef156 read(1,*) Ef
157 read(1,*) nband, nspin, nk157 read(1,*) nband, nspin, nk
158 non_coll = (nspin == 4)
159158
160 if (non_coll) then159 nspin_blocks = 1
161 nspin_blocks = 1160 if ( nspin == 8 ) then
162 else161 write(*,"(a)") "# Eigenvalues calculated from a spin-orbit calculation"
163 nspin_blocks = nspin162 else if ( nspin == 4 ) then
164 endif163 write(*,"(a)") "# Eigenvalues calculated from a non-collinear calculation"
164 else if ( nspin == 2 ) then
165 write(*,"(a)") "# Eigenvalues calculated from a spin-polarized calculation"
166 nspin_blocks = nspin
167 else if ( nspin == 1 ) then
168 write(*,"(a)") "# Eigenvalues calculated from a non-polarized calculation"
169 end if
165 170
166 write(*,"(a)") "# Eigenvalues read from " // trim(eig_file)171 write(*,"(a)") "# Eigenvalues read from " // trim(eig_file)
167 if ( debug ) print *, "Ef, nband, nspin, nk:", Ef, nband, nspin, nk172 if ( debug ) print *, "Ef, nband, nspin, nk:", Ef, nband, nspin, nk
@@ -197,6 +202,7 @@
197 endif202 endif
198203
199204
205 smear2 = smear * smear
200 write(*,"(a,f8.4)") "# Using smearing parameter: ", smear206 write(*,"(a,f8.4)") "# Using smearing parameter: ", smear
201 write(*,"(a,i0,a)") "# Using ", npts_energy, " points in the energy range"207 write(*,"(a,i0,a)") "# Using ", npts_energy, " points in the energy range"
202 write(*,"(2(a,i0))") "# Selected bands: ", min_band ," to: ", max_band208 write(*,"(2(a,i0))") "# Selected bands: ", min_band ," to: ", max_band
@@ -253,9 +259,9 @@
253 do ie = 1, npts_energy259 do ie = 1, npts_energy
254 x = emin + (ie-1)*eincr - e260 x = emin + (ie-1)*eincr - e
255 if (loren) then261 if (loren) then
256 DOS(ie,is) = DOS(ie,is) + weight * smear / (smear*smear + x*x) 262 DOS(ie,is) = DOS(ie,is) + weight * smear / (smear2 + x*x)
257 else263 else
258 DOS(ie,is) = DOS(ie,is) + weight * exp( - x*x/(smear*smear) )264 DOS(ie,is) = DOS(ie,is) + weight * exp( - x*x/smear2 )
259 end if265 end if
260 end do266 end do
261 end do267 end do
262268
=== modified file 'Util/STM/ol-stm/Src/mainstm.F'
--- Util/STM/ol-stm/Src/mainstm.F 2019-06-06 09:34:48 +0000
+++ Util/STM/ol-stm/Src/mainstm.F 2019-09-26 07:10:24 +0000
@@ -158,7 +158,7 @@
158158
159 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin159 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin
160 ! files, which contain two spin blocks per k section.160 ! files, which contain two spin blocks per k section.
161 non_coll = (nspin == 4)161 non_coll = (nspin >= 4)
162 nspin_blocks = nspin162 nspin_blocks = nspin
163 if (non_coll) nspin_blocks = 1163 if (non_coll) nspin_blocks = 1
164164
165165
=== modified file 'Util/STM/ol-stm/Src/stm.f'
--- Util/STM/ol-stm/Src/stm.f 2019-06-05 08:47:53 +0000
+++ Util/STM/ol-stm/Src/stm.f 2019-09-26 07:10:24 +0000
@@ -104,6 +104,7 @@
104 104
105 LOGICAL FIRST105 LOGICAL FIRST
106 integer :: idummy, number_of_wfns, spinor_comps106 integer :: idummy, number_of_wfns, spinor_comps
107 integer :: nspin_max
107108
108 CHARACTER :: SNAME*40, FNAME*256, stm_label*60109 CHARACTER :: SNAME*40, FNAME*256, stm_label*60
109110
@@ -168,10 +169,12 @@
168 ALLOCATE(R2IJ(MAXNA))169 ALLOCATE(R2IJ(MAXNA))
169 ALLOCATE(XIJ(3,MAXNA))170 ALLOCATE(XIJ(3,MAXNA))
170171
172 nspin_max = min(4,nspin)
173
171 allocate(CWAVE(spinor_comps))174 allocate(CWAVE(spinor_comps))
172 ALLOCATE(CW(0:NPX-1,0:NPY-1,spinor_comps))175 ALLOCATE(CW(0:NPX-1,0:NPY-1,spinor_comps))
173 ALLOCATE(CWE(0:NPX-1,0:NPY-1,0:NPZ-1,spinor_comps))176 ALLOCATE(CWE(0:NPX-1,0:NPY-1,0:NPZ-1,spinor_comps))
174 ALLOCATE(RHO(0:NPX-1,0:NPY-1,0:NPZ-1,nspin))177 ALLOCATE(RHO(0:NPX-1,0:NPY-1,0:NPZ-1,nspin_max))
175178
176 FIRST = .TRUE.179 FIRST = .TRUE.
177 DO I = 1,3180 DO I = 1,3
@@ -423,9 +426,9 @@
423 $ [0.0_dp, 0.0_dp, ZMIN], ! Extra info for origin426 $ [0.0_dp, 0.0_dp, ZMIN], ! Extra info for origin
424 $ [.true.,.true.,.false.] ! Periodic ?427 $ [.true.,.true.,.false.] ! Periodic ?
425428
426 WRITE(grid_u) NPX, NPY, NPZ, nspin 429 WRITE(grid_u) NPX, NPY, NPZ, nspin_max
427430
428 do ispin = 1, nspin431 do ispin = 1, nspin_max
429 DO IZ=0,NPZ-1432 DO IZ=0,NPZ-1
430 DO IY=0,NPY-1433 DO IY=0,NPY-1
431 WRITE(grid_u) (REAL(RHO(IX,IY,IZ,ispin),sp),IX=0,NPX-1)434 WRITE(grid_u) (REAL(RHO(IX,IY,IZ,ispin),sp),IX=0,NPX-1)
432435
=== modified file 'Util/WFS/readwfx.f90'
--- Util/WFS/readwfx.f90 2019-03-18 10:51:45 +0000
+++ Util/WFS/readwfx.f90 2019-09-26 07:10:24 +0000
@@ -121,7 +121,7 @@
121 read(wfs_u) nk, gamma121 read(wfs_u) nk, gamma
122122
123 read(wfs_u) wfs_spin_flag ! 1, 2, or 4 123 read(wfs_u) wfs_spin_flag ! 1, 2, or 4
124 non_coll = (wfs_spin_flag == 4)124 non_coll = (wfs_spin_flag >= 4)
125 read(wfs_u) nuotot125 read(wfs_u) nuotot
126 read(wfs_u) !! Symbols, etc126 read(wfs_u) !! Symbols, etc
127127
128128
=== modified file 'Util/WFS/wfs2wfsx.f'
--- Util/WFS/wfs2wfsx.f 2016-01-25 16:00:16 +0000
+++ Util/WFS/wfs2wfsx.f 2019-09-26 07:10:24 +0000
@@ -75,7 +75,7 @@
75 orb_info_written = .false.75 orb_info_written = .false.
7676
77 do iik = 1,nk77 do iik = 1,nk
78 do iispin = 1,nspin78 do iispin = 1,min(4,nspin)
7979
80 read(iu) ik,k(1),k(2),k(3)80 read(iu) ik,k(1),k(2),k(3)
81 if (ik .ne. iik) stop 'error in index of k-point'81 if (ik .ne. iik) stop 'error in index of k-point'
8282
=== modified file 'Util/WFS/wfsnc2wfsx.F90'
--- Util/WFS/wfsnc2wfsx.F90 2016-01-25 16:00:16 +0000
+++ Util/WFS/wfsnc2wfsx.F90 2019-09-26 07:10:24 +0000
@@ -103,7 +103,7 @@
103 symfio(j), j=1,nuotot)103 symfio(j), j=1,nuotot)
104104
105 do iik = 1,nk105 do iik = 1,nk
106 do iispin = 1,nspin106 do iispin = 1,min(4,nspin)
107107
108 write(io) iik,kp(1:3,iik), wk(iik)108 write(io) iik,kp(1:3,iik), wk(iik)
109 write(io) iispin109 write(io) iispin
110110
=== modified file 'Util/WFS/wfsx2wfs.f'
--- Util/WFS/wfsx2wfs.f 2016-09-12 13:30:18 +0000
+++ Util/WFS/wfsx2wfs.f 2019-09-26 07:10:24 +0000
@@ -61,7 +61,7 @@
61 . symfio(j), j=1,nuotot)61 . symfio(j), j=1,nuotot)
6262
63 do iik = 1,nk63 do iik = 1,nk
64 do iispin = 1,nspin64 do iispin = 1,min(4,nspin)
6565
66 read(iu) ik,k(1),k(2),k(3)66 read(iu) ik,k(1),k(2),k(3)
67 write(io) ik,k(1),k(2),k(3)67 write(io) ik,k(1),k(2),k(3)
6868
=== modified file 'version.info'
--- version.info 2019-09-25 09:49:02 +0000
+++ version.info 2019-09-26 07:10:24 +0000
@@ -1,1 +1,5 @@
1<<<<<<< TREE
1siesta-4.1-11262siesta-4.1-1126
3=======
4siesta-4.1-1119--streamline-file-dim-nc-soc-2
5>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches