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
1=== modified file 'Src/ioeig.f'
2--- Src/ioeig.f 2019-02-25 14:21:14 +0000
3+++ Src/ioeig.f 2019-09-26 07:10:24 +0000
4@@ -20,13 +20,13 @@
5 implicit none
6
7 integer, intent(in) :: no ! no_u: number of orbitals in unit cell
8- integer, intent(in) :: nspin ! 'nspin_grid': 1, 2, or 4
9+ integer, intent(in) :: nspin ! 'nspin_grid': 1, 2, 4 or 8
10 integer, intent(in) :: nk
11 integer, intent(in) :: maxo ! no_u again
12 integer, intent(in) :: nspinor
13 integer, intent(in) :: maxk
14 real(dp), intent(in) :: ef
15- real(dp), intent(in) :: eo(maxo, nspinor, maxk)
16+ real(dp), intent(in), target :: eo(maxo, nspinor, maxk)
17 real(dp), intent(in) :: kpoints(3,nk)
18 real(dp), intent(in) :: kweights(nk)
19
20@@ -34,6 +34,7 @@
21
22 c Internal
23 integer ik, iu, io, is
24+ real(dp), pointer :: eok(:)
25
26 character(len=label_length+4) :: fname
27 c -------------------------------------------------------------------
28@@ -44,20 +45,25 @@
29 open( iu, file=fname, form='formatted', status='unknown' )
30
31 write(iu,"(e17.9)") ef/eV
32+ ! The output corresponds to the number of bands.
33+ ! Thus it shouldn't be confused with the number of orbitals,
34+ ! although they are related!
35 if ( nspin > nspinor ) then
36- ! NC/SOC case: a single block of wavefunctions (without spin tag)
37- ! nspin (4) will be used here to signal NC/SOC to utilities such as
38- ! Eig2DOS
39- write(iu,"(tr1,i10,i2,tr1,i10)") no*2, nspin, nk
40+ write(iu,"(tr1,i10,tr1,i0,tr1,i10)") 2*no, nspin, nk
41 else
42- write(iu,"(tr1,i10,i2,tr1,i10)") no, min(nspin,2), nk
43+ ! This will always be nspin == nspinor with max(nspinor) == 2
44+ write(iu,"(tr1,i10,tr1,i0,tr1,i10)") no, nspin, nk
45 end if
46 do ik = 1,nk
47- ! This statement will correctly print eo in the NC/SOC case,
48- ! as the eigenvalues take up two complete 'io' columns,
49- ! and nspinor = 2.
50- write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")
51- . ik, ((eo(io,is,ik)/eV,io=1,no),is=1,nspinor)
52+ if ( nspin > nspinor ) then
53+ ! ensure we catch users doing neigwanted calculations
54+ call ravel(maxo * nspinor, eo(1,1,ik), eok)
55+ write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")
56+ . ik, (eok(io)/eV,io=1,no*nspinor)
57+ else
58+ write(iu,"(i10,10(tr1,e17.9),/,(tr10,10(tr1,e17.9)))")
59+ . ik, ((eo(io,is,ik)/eV,io=1,no),is=1,nspinor)
60+ end if
61 enddo
62
63 call io_close( iu )
64@@ -74,12 +80,13 @@
65 call cmlStartPropertyList(mainXML, dictRef='siesta:kpt_band')
66 do ik = 1, nk
67 call cmlAddKPoint(xf=mainXML, coords=kpoints(:, ik),
68- . weight=kweights(ik))
69+ . weight=kweights(ik))
70+ ! ensure we catch users doing neigwanted calculations
71+ call ravel(maxo * nspinor, eo(1,1,ik), eok)
72 call cmlAddProperty(xf=mainXML,
73- . value=reshape(eo(1:no,1:nspinor,ik)/eV,
74- . (/no*nspinor/)),
75- . dictRef='siesta:eigenenergies',
76- . units='siestaUnits:ev')
77+ . value=eok(no*nspinor)/eV,
78+ . dictRef='siesta:eigenenergies',
79+ . units='siestaUnits:ev')
80 end do
81 call cmlEndPropertyList(mainXML)
82 else
83@@ -105,5 +112,14 @@
84 end if
85 call cmlEndPropertyList(mainXML)
86 endif
87+
88+ contains
89+
90+ subroutine ravel(n, eo, eop)
91+ integer, intent(in) :: n
92+ real(dp), intent(in), target :: eo(n)
93+ real(dp), pointer :: eop(:)
94+ eop => eo(:)
95+ end subroutine
96
97 end subroutine ioeig
98
99=== modified file 'Src/writewave.F'
100--- Src/writewave.F 2019-08-08 11:55:07 +0000
101+++ Src/writewave.F 2019-09-26 07:10:24 +0000
102@@ -540,12 +540,12 @@
103 write(6,'(a)') 'writewave: Wave Functions Coefficients'
104 write(6,*)
105 write(6,'(a26,2x,i6)') 'Number of k-points = ', nk
106- write(6,'(a26,2x,i6)') 'Number of Spins = ', spin%Grid
107+ write(6,'(a26,2x,i6)') 'Number of Spins = ', spin%H
108 write(6,'(a26,2x,i6)') 'Number of basis orbs = ',nuotot
109 write(6,*)
110 endif
111 write(iu) nk, gamma
112- write(iu) spin%Grid ! This will be 1, 2, or 4
113+ write(iu) spin%H ! This will be 1, 2, 4 or 8 (to signal NC from SOC)
114 write(iu) nuotot
115 write(iu) (iaorb(j),labelfis(isa(iaorb(j))),
116 . iphorb(j), cnfigfio(isa(iaorb(j)),iphorb(j)),
117@@ -738,7 +738,7 @@
118 write(6,*)
119 write(6,'(a22,2x,i6,2x,3f10.6)') 'k-point = ',ik, k(1:3)
120 if (non_coll) then
121- write(6,'(a22,2x,i6)') 'Spin component (non-collinear)= ',0
122+ write(6,'(a22,2x)') 'Spinors are mixed'
123 else
124 write(6,'(a22,2x,i6)') 'Spin component = ',ispin
125 endif
126
127=== added directory 'Tests/bi2se3-stm-denchar'
128=== added file 'Tests/bi2se3-stm-denchar/Makefile'
129--- Tests/bi2se3-stm-denchar/Makefile 1970-01-01 00:00:00 +0000
130+++ Tests/bi2se3-stm-denchar/Makefile 2019-09-26 07:10:24 +0000
131@@ -0,0 +1,6 @@
132+#
133+# Single-test makefile
134+#
135+name=bi2se3-stm-denchar
136+#
137+include ../test.mk
138
139=== added file 'Tests/bi2se3-stm-denchar/README'
140--- Tests/bi2se3-stm-denchar/README 1970-01-01 00:00:00 +0000
141+++ Tests/bi2se3-stm-denchar/README 2019-09-26 07:10:24 +0000
142@@ -0,0 +1,9 @@
143+This example also involves denchar and stm.
144+
145+To complete this example you also need to
146+run the following things:
147+
148+1. Go into work directory
149+2. Create a soft-link using: ln -s bi2se3-stm-denchar.bands.WFSX bi2se3-stm-denchar.WFSX
150+3. Run denchar < ../bi2se3-stm-denchar.fdf
151+4. Run stm < ../bi2se3-stm-denchar.fdf
152
153=== added file 'Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf'
154--- Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf 1970-01-01 00:00:00 +0000
155+++ Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.fdf 2019-09-26 07:10:24 +0000
156@@ -0,0 +1,185 @@
157+#
158+# Three quintuple layers of Bi2Se3 to test the calculation of the spin texture.
159+# This calculation will produce HSX and WFSX files that can be processed by
160+# the Util/COOP/spin_texture utility program.
161+#
162+# (thanks to Roberto Robles)
163+#
164+SystemName bi2se3-stm-denchar
165+SystemLabel bi2se3-stm-denchar
166+
167+# Geom
168+NumberOfAtoms 15
169+NumberOfSpecies 2
170+%block ChemicalSpeciesLabel
171+ 1 83 Bi
172+ 2 34 Se
173+%endblock ChemicalSpeciesLabel
174+LatticeConstant 4.13800000 Ang
175+%block LatticeVectors
176+ 1.0000000000000000 0.0000000000000000 0.0000000000000000
177+ -0.5000000000000000 0.8660254037844386 0.0000000000000000
178+ 0.0000000000000000 0.0000000000000000 11.7544706113098112
179+%endblock LatticeVectors
180+AtomicCoordinatesFormat Fractional
181+%block AtomicCoordinatesAndAtomicSpecies
182+ 0.6666666666666667 0.3333333333333333 0.2650624783220366 1 1 Bi
183+ 0.3333333333333333 0.6666666666666667 0.3423936279930260 1 2 Bi
184+ 0.3333333333333333 0.6666666666666667 0.4613344252566094 1 3 Bi
185+ 0.0000000000000000 0.0000000000000000 0.5386655576677342 1 4 Bi
186+ 0.0000000000000000 0.0000000000000000 0.6576063590530268 1 5 Bi
187+ 0.6666666666666667 0.3333333333333333 0.7349374737996754 1 6 Bi
188+ 0.3333333333333333 0.6666666666666667 0.2287521714264216 2 7 Se
189+ 0.0000000000000000 0.0000000000000000 0.3037280662035826 2 8 Se
190+ 0.6666666666666667 0.3333333333333333 0.3787039395991627 2 9 Se
191+ 0.0000000000000000 0.0000000000000000 0.4250241177721818 2 10 Se
192+ 0.6666666666666667 0.3333333333333333 0.5000000000000000 2 11 Se
193+ 0.3333333333333333 0.6666666666666667 0.5749758645633420 2 12 Se
194+ 0.6666666666666667 0.3333333333333333 0.6212960521574118 2 13 Se
195+ 0.3333333333333333 0.6666666666666667 0.6962719343852299 2 14 Se
196+ 0.0000000000000000 0.0000000000000000 0.7712478166130481 2 15 Se
197+%endblock AtomicCoordinatesAndAtomicSpecies
198+
199+# Basis
200+PAO.EnergyShift 100 meV ! Extension of AOs (smaller => more extended)
201+PAO.SplitNorm 0.15
202+PAO.SplitNormH 0.50
203+PAO.SoftDefault T
204+%block PAO.Basis
205+ Se 3
206+ n=4 0 2 ! n,l,#zetas
207+ 0.0 0.0 ! default
208+ n=4 1 2
209+ 0.0 0.0
210+ n=3 2 1
211+ 0.0
212+ Bi 3
213+ n=6 0 2
214+ 0.0 0.0
215+ n=6 1 2
216+ 0.0 0.0
217+ n=5 2 1
218+ 0.0
219+%endblock PAO.Basis
220+
221+xc.functional GGA # Exchange-correlation functional
222+xc.authors PBE # Exchange-correlation version
223+
224+%block DM.InitSpin
225+ 1 0. 0. 0.
226+ 2 0. 0. 0.
227+ 3 0. 0. 0.
228+ 4 0. 0. 0.
229+ 5 0. 0. 0.
230+ 6 0. 0. 0.
231+ 7 0. 0. 0.
232+ 8 0. 0. 0.
233+ 9 0. 0. 0.
234+10 0. 0. 0.
235+11 0. 0. 0.
236+12 0. 0. 0.
237+13 0. 0. 0.
238+14 0. 0. 0.
239+15 0. 0. 0.
240+%endblock DM.InitSpin
241+
242+SolutionMethod diagon
243+
244+%block kgrid_Monkhorst_Pack
245+ 3 0 0 0.0
246+ 0 3 0 0.0
247+ 0 0 1 0.0
248+%endblock kgrid_Monkhorst_Pack
249+
250+ ################ SCF options #############
251+SolutionMethod diagon
252+ElectronicTemperature 0.0010 eV
253+MaxSCFIterations 300
254+DM.NumberPulay 3
255+DM.MixingWeight 0.0100
256+MeshCutoff 300.0000 Ry
257+DM.Tolerance 1.E-4
258+SCF.H.Converge F
259+UseSaveData F
260+DM.UseSaveDM T
261+SpinOrbit T
262+SaveElectrostaticPotential true
263+
264+# ---- SPIN TEXTURE
265+#
266+# We use a 'BandPoints' block to generate the states at chosen k-points
267+# These keywords are necessary to generate the HSX and WFSX files
268+#
269+SaveHS T
270+WFS.Write.For.Bands T
271+#
272+# These keywords could be used to limit the number of bands stored in the WFSX file
273+
274+Wfs.band.min 190
275+Wfs.band.max 230
276+
277+BandLinesScale pi/a
278+%block BandPoints
279+ 0.0 0.0 0.0 1
280+ 0.2 0.1 0.0 1.
281+%endblock BandPoints
282+
283+
284+
285+# *************************************************************************
286+# Input variables for Denchar
287+# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
288+# *************************************************************************
289+
290+Write.Denchar true
291+Denchar.TypeOfRun 3D
292+
293+Denchar.PlotCharge F
294+Denchar.PlotWaveFunctions T
295+
296+Denchar.CoorUnits bohr # Format for coordinate of the points
297+ # Bohr
298+ # Ang
299+
300+Denchar.DensityUnits Ele/bohr**3 # Units of Charge Density
301+ # Ele/bohr**3
302+ # Ele/Ang**3
303+ # Ele/UnitCell
304+
305+Denchar.MinX -0.10 bohr # Minimum coord of the window in X-dir
306+Denchar.MaxX 4.0 bohr # Maximum coord of the window in X-dir
307+
308+Denchar.MinY -0.1 bohr # Minimum coord of the window in Y-dir
309+Denchar.MaxY 5.0 bohr # Maximum coord of the window in Y-dir
310+
311+Denchar.MinZ 23.0 bohr # Maximum coord of the window in X-dir
312+Denchar.MaxZ 71.0 bohr # Maximum coord of the window in X-dir
313+
314+Denchar.NumberPointsX 30 # Number of points in X-axis
315+Denchar.NumberPointsY 30 # Number of points in Y-axis
316+Denchar.NumberPointsZ 30 # Number of points in Y-axis
317+
318+
319+# *************************************************************************
320+# Input variables for STM
321+# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
322+# *************************************************************************
323+STM.DensityUnits Ele/bohr**3 # Units of Charge Density
324+ # Ele/bohr**3
325+ # Ele/Ang**3
326+ # Ele/UnitCell
327+
328+STM.MinZ 37.0 Ang # Minimum coordinate of the window in Z-dir
329+STM.MaxZ 40.0 Ang # Maximum coordinate of the window in Z-dir
330+STM.RefZ 37.0 Ang # Reference plane to propagate wf into vacuum
331+STM.VacZ 40.0 Ang # Reference plane to compute vacuum potential
332+
333+STM.Emin -6.3 eV
334+STM.Emax -1.0 eV
335+
336+STM.NumberPointsX 48 # Number of points in X-axis
337+STM.NumberPointsY 48 # Number of points in Y-axis
338+STM.NumberPointsZ 48 # Number of points in Z-axis
339+
340+STM.NumberCellsX 1
341+STM.NumberCellsY 1
342
343=== added file 'Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos'
344--- Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos 1970-01-01 00:00:00 +0000
345+++ Tests/bi2se3-stm-denchar/bi2se3-stm-denchar.pseudos 2019-09-26 07:10:24 +0000
346@@ -0,0 +1,1 @@
347+Bi Se
348
349=== added directory 'Tests/bi2se3-sts-denchar'
350=== added file 'Tests/bi2se3-sts-denchar/Makefile'
351--- Tests/bi2se3-sts-denchar/Makefile 1970-01-01 00:00:00 +0000
352+++ Tests/bi2se3-sts-denchar/Makefile 2019-09-26 07:10:24 +0000
353@@ -0,0 +1,6 @@
354+#
355+# Single-test makefile
356+#
357+name=bi2se3-sts-denchar
358+#
359+include ../test.mk
360
361=== added file 'Tests/bi2se3-sts-denchar/README'
362--- Tests/bi2se3-sts-denchar/README 1970-01-01 00:00:00 +0000
363+++ Tests/bi2se3-sts-denchar/README 2019-09-26 07:10:24 +0000
364@@ -0,0 +1,9 @@
365+This example also involves denchar and stm.
366+
367+To complete this example you also need to
368+run the following things:
369+
370+1. Go into work directory
371+2. Create a soft-link using: ln -s bi2se3-sts-denchar.bands.WFSX bi2se3-sts-denchar.WFSX
372+3. Run denchar < ../bi2se3-sts-denchar.fdf
373+4. Run stm < ../bi2se3-sts-denchar.fdf
374
375=== added file 'Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf'
376--- Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf 1970-01-01 00:00:00 +0000
377+++ Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.fdf 2019-09-26 07:10:24 +0000
378@@ -0,0 +1,182 @@
379+#
380+# Three quintuple layers of Bi2Se3 to test the calculation of the spin texture.
381+# This calculation will produce HSX and WFSX files that can be processed by
382+# the Util/COOP/spin_texture utility program.
383+#
384+# (thanks to Roberto Robles)
385+#
386+SystemName bi2se3-sts-denchar
387+SystemLabel bi2se3-sts-denchar
388+
389+# Geom
390+NumberOfAtoms 15
391+NumberOfSpecies 2
392+%block ChemicalSpeciesLabel
393+ 1 83 Bi
394+ 2 34 Se
395+%endblock ChemicalSpeciesLabel
396+LatticeConstant 4.13800000 Ang
397+%block LatticeVectors
398+ 1.0000000000000000 0.0000000000000000 0.0000000000000000
399+ -0.5000000000000000 0.8660254037844386 0.0000000000000000
400+ 0.0000000000000000 0.0000000000000000 11.7544706113098112
401+%endblock LatticeVectors
402+AtomicCoordinatesFormat Fractional
403+%block AtomicCoordinatesAndAtomicSpecies
404+ 0.6666666666666667 0.3333333333333333 0.2650624783220366 1 1 Bi
405+ 0.3333333333333333 0.6666666666666667 0.3423936279930260 1 2 Bi
406+ 0.3333333333333333 0.6666666666666667 0.4613344252566094 1 3 Bi
407+ 0.0000000000000000 0.0000000000000000 0.5386655576677342 1 4 Bi
408+ 0.0000000000000000 0.0000000000000000 0.6576063590530268 1 5 Bi
409+ 0.6666666666666667 0.3333333333333333 0.7349374737996754 1 6 Bi
410+ 0.3333333333333333 0.6666666666666667 0.2287521714264216 2 7 Se
411+ 0.0000000000000000 0.0000000000000000 0.3037280662035826 2 8 Se
412+ 0.6666666666666667 0.3333333333333333 0.3787039395991627 2 9 Se
413+ 0.0000000000000000 0.0000000000000000 0.4250241177721818 2 10 Se
414+ 0.6666666666666667 0.3333333333333333 0.5000000000000000 2 11 Se
415+ 0.3333333333333333 0.6666666666666667 0.5749758645633420 2 12 Se
416+ 0.6666666666666667 0.3333333333333333 0.6212960521574118 2 13 Se
417+ 0.3333333333333333 0.6666666666666667 0.6962719343852299 2 14 Se
418+ 0.0000000000000000 0.0000000000000000 0.7712478166130481 2 15 Se
419+%endblock AtomicCoordinatesAndAtomicSpecies
420+
421+# Basis
422+PAO.EnergyShift 100 meV ! Extension of AOs (smaller => more extended)
423+PAO.SplitNorm 0.15
424+PAO.SplitNormH 0.50
425+PAO.SoftDefault T
426+%block PAO.Basis
427+ Se 3
428+ n=4 0 2 ! n,l,#zetas
429+ 0.0 0.0 ! default
430+ n=4 1 2
431+ 0.0 0.0
432+ n=3 2 1
433+ 0.0
434+ Bi 3
435+ n=6 0 2
436+ 0.0 0.0
437+ n=6 1 2
438+ 0.0 0.0
439+ n=5 2 1
440+ 0.0
441+%endblock PAO.Basis
442+
443+xc.functional GGA # Exchange-correlation functional
444+xc.authors PBE # Exchange-correlation version
445+
446+%block DM.InitSpin
447+ 1 0. 0. 0.
448+ 2 0. 0. 0.
449+ 3 0. 0. 0.
450+ 4 0. 0. 0.
451+ 5 0. 0. 0.
452+ 6 0. 0. 0.
453+ 7 0. 0. 0.
454+ 8 0. 0. 0.
455+ 9 0. 0. 0.
456+10 0. 0. 0.
457+11 0. 0. 0.
458+12 0. 0. 0.
459+13 0. 0. 0.
460+14 0. 0. 0.
461+15 0. 0. 0.
462+%endblock DM.InitSpin
463+
464+SolutionMethod diagon
465+
466+%block kgrid_Monkhorst_Pack
467+ 3 0 0 0.0
468+ 0 3 0 0.0
469+ 0 0 1 0.0
470+%endblock kgrid_Monkhorst_Pack
471+
472+ ################ SCF options #############
473+SolutionMethod diagon
474+ElectronicTemperature 0.0010 eV
475+MaxSCFIterations 300
476+DM.NumberPulay 3
477+DM.MixingWeight 0.0100
478+MeshCutoff 300.0000 Ry
479+DM.Tolerance 1.E-4
480+SCF.H.Converge F
481+UseSaveData F
482+DM.UseSaveDM T
483+SpinOrbit T
484+SaveElectrostaticPotential true
485+
486+# ---- SPIN TEXTURE
487+#
488+# We use a 'BandPoints' block to generate the states at chosen k-points
489+# These keywords are necessary to generate the HSX and WFSX files
490+#
491+SaveHS T
492+WFS.Write.For.Bands T
493+#
494+# These keywords could be used to limit the number of bands stored in the WFSX file
495+
496+Wfs.band.min 190
497+Wfs.band.max 230
498+
499+BandLinesScale pi/a
500+%block BandPoints
501+ 0.0 0.0 0.0 1
502+ 0.2 0.1 0.0 1.
503+%endblock BandPoints
504+
505+
506+# *************************************************************************
507+# Input variables for Denchar
508+# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
509+# *************************************************************************
510+
511+Write.Denchar true
512+Denchar.TypeOfRun 3D
513+
514+Denchar.PlotCharge F
515+Denchar.PlotWaveFunctions T
516+
517+Denchar.CoorUnits bohr # Format for coordinate of the points
518+ # Bohr
519+ # Ang
520+
521+Denchar.DensityUnits Ele/bohr**3 # Units of Charge Density
522+ # Ele/bohr**3
523+ # Ele/Ang**3
524+ # Ele/UnitCell
525+
526+Denchar.MinX -0.10 bohr # Minimum coord of the window in X-dir
527+Denchar.MaxX 4.0 bohr # Maximum coord of the window in X-dir
528+
529+Denchar.MinY -0.1 bohr # Minimum coord of the window in Y-dir
530+Denchar.MaxY 5.0 bohr # Maximum coord of the window in Y-dir
531+
532+Denchar.MinZ 23.0 bohr # Maximum coord of the window in X-dir
533+Denchar.MaxZ 71.0 bohr # Maximum coord of the window in X-dir
534+
535+Denchar.NumberPointsX 30 # Number of points in X-axis
536+Denchar.NumberPointsY 30 # Number of points in Y-axis
537+Denchar.NumberPointsZ 30 # Number of points in Y-axis
538+
539+
540+# *************************************************************************
541+# Input variables for STM
542+# (besides SystemLabel, NumberOfSpecies and ChemicalSpecies, defined above)
543+# *************************************************************************
544+STS.NumberOfPoints 30
545+STM.DensityUnits Ele/bohr**3 # Units of Charge Density
546+ # Ele/bohr**3
547+ # Ele/Ang**3
548+ # Ele/UnitCell
549+
550+STM.MinZ 37.0 Ang # Minimum coordinate of the window in Z-dir
551+STM.MaxZ 37.0 Ang # Maximum coordinate of the window in Z-dir
552+STM.RefZ 37.0 Ang # Reference plane to propagate wf into vacuum
553+STM.VacZ 40.0 Ang # Reference plane to compute vacuum potential
554+
555+STM.Emin -6.3 eV
556+STM.Emax -1.0 eV
557+
558+STM.NumberPointsX 48 # Number of points in X-axis
559+STM.NumberPointsY 48 # Number of points in Y-axis
560+STM.NumberPointsZ 1 # Number of points in Z-axis
561
562=== added file 'Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos'
563--- Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos 1970-01-01 00:00:00 +0000
564+++ Tests/bi2se3-sts-denchar/bi2se3-sts-denchar.pseudos 2019-09-26 07:10:24 +0000
565@@ -0,0 +1,1 @@
566+Bi Se
567
568=== modified file 'Util/COOP/dm_creator.F90'
569--- Util/COOP/dm_creator.F90 2019-02-26 09:08:49 +0000
570+++ Util/COOP/dm_creator.F90 2019-09-26 07:10:24 +0000
571@@ -78,13 +78,18 @@
572 allocate (wk(nkp), pk(3,nkp))
573
574 read(wfs_u) nsp
575- non_coll = (nsp == 4)
576 read(wfs_u) nao
577 read(wfs_u) !! Symbols, etc
578 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao
579
580- if (non_coll) then
581- nspin_blocks = 1
582+ if ( nsp == 8 ) then
583+ if (debug) print *, "WFSX from spin-orbit calculation"
584+ nspin_blocks = 1
585+ non_coll = .true.
586+ else if ( nsp == 4 ) then
587+ if (debug) print *, "WFSX from non-collinear calculation"
588+ nspin_blocks = 1
589+ non_coll = .true.
590 else
591 nspin_blocks = nsp
592 endif
593
594=== modified file 'Util/COOP/fat.f90'
595--- Util/COOP/fat.f90 2019-02-15 15:50:41 +0000
596+++ Util/COOP/fat.f90 2019-09-26 07:10:24 +0000
597@@ -120,7 +120,7 @@
598 allocate (wk(nkp), pk(3,nkp))
599
600 read(wfs_u) nsp
601- non_coll = (nsp == 4)
602+ non_coll = (nsp >= 4)
603 read(wfs_u) nao
604 read(wfs_u) !! Symbols, etc
605 if (debug) print *, "WFSX read: nkp, nsp, nnao: ", nkp, nsp, nao
606@@ -273,10 +273,12 @@
607 enddo
608 enddo
609
610- if (non_coll) then
611- write(stt_u,"(/'SPIN (non-coll): ',i2)") nspin_blocks
612+ if ( nsp == 8 ) then
613+ write(stt_u,"(/'SPIN (spin-orbit): ',i2)") nspin_blocks
614+ else if ( nsp == 4 ) then
615+ write(stt_u,"(/'SPIN (non-coll): ',i2)") nspin_blocks
616 else
617- write(stt_u,"(/'SPIN: ',i2)") nspin_blocks
618+ write(stt_u,"(/'SPIN: ',i2)") nspin_blocks
619 endif
620
621 write(stt_u,"(/'AO LIST:')")
622
623=== modified file 'Util/COOP/mprop.f90'
624--- Util/COOP/mprop.f90 2019-02-27 15:31:08 +0000
625+++ Util/COOP/mprop.f90 2019-09-26 07:10:24 +0000
626@@ -141,7 +141,7 @@
627 allocate (wk(nkp), pk(3,nkp))
628
629 read(wfs_u) wfs_spin_flag ! 1, 2, or 4
630- non_coll = (wfs_spin_flag == 4)
631+ non_coll = (wfs_spin_flag >= 4)
632 read(wfs_u) nao
633 read(wfs_u) !! Symbols, etc
634 if (debug) print *, "WFSX read: nkp, nspin_flag, nnao: ", nkp, wfs_spin_flag, nao
635
636=== modified file 'Util/COOP/spin_texture.f90'
637--- Util/COOP/spin_texture.f90 2019-06-07 16:27:46 +0000
638+++ Util/COOP/spin_texture.f90 2019-09-26 07:10:24 +0000
639@@ -102,7 +102,7 @@
640 allocate (wk(nkp), pk(3,nkp))
641
642 read(wfs_u) nsp
643- non_coll = (nsp == 4)
644+ non_coll = (nsp >= 4)
645 if (.not. (non_coll)) then
646 STOP "Spin texture not available for collinear-spin"
647 endif
648
649=== modified file 'Util/Denchar/Src/denchar.f'
650--- Util/Denchar/Src/denchar.f 2019-06-08 15:41:39 +0000
651+++ Util/Denchar/Src/denchar.f 2019-09-26 07:10:24 +0000
652@@ -264,7 +264,7 @@
653
654 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin
655 ! files, which contain two spin blocks per k section.
656- non_coll = (nspin_wfsx == 4)
657+ non_coll = (nspin_wfsx >= 4)
658 nspin_blocks = nspin_wfsx
659 if (non_coll) nspin_blocks = 1
660
661
662=== modified file 'Util/Denchar/Src/wavofr.f'
663--- Util/Denchar/Src/wavofr.f 2019-06-08 15:41:39 +0000
664+++ Util/Denchar/Src/wavofr.f 2019-09-26 07:10:24 +0000
665@@ -49,7 +49,7 @@
666 C INTEGER NO : Total number of orbitals in Supercell
667 C INTEGER NO_U : Total number of orbitals in Unit Cell
668 C INTEGER MAXNA : Maximum number of neighbours of any atom
669-C INTEGER NSPIN : Number of different spin polarizations: 1, 2, 4
670+C INTEGER NSPIN : Number of different spin polarizations: 1, 2, 4, 8
671 ! integer nspin_blocks : blocks in WFSX file
672 ! logical non_coll : NC/SOC wfs data?
673 C INTEGER ISA(NA) : Species index of each atom
674@@ -174,6 +174,17 @@
675
676 PI = 4.0D0 * ATAN(1.0D0)
677
678+ select case ( NSPIN )
679+ case ( 1, 2, 4, 8 )
680+! ok
681+ case default
682+ WRITE(6,*)'BAD NUMBER NSPIN IN WAVOFR.F'
683+ WRITE(6,*)'NSPIN = ',NSPIN
684+ WRITE(6,*)'IT MUST BE 1, 2, 4 or 8'
685+ STOP
686+ end select
687+
688+
689 NPLAMAX = NPX * NPY * NPZ
690
691 ALLOCATE(PLAPO(NPLAMAX,3))
692@@ -343,7 +354,7 @@
693 . FORM = 'FORMATTED')
694 REWIND(UNITPH1)
695
696- ELSEIF ((NSPIN .EQ. 2) .or. (NSPIN == 4)) THEN
697+ ELSE ! nspin >= 2
698 ! We will reuse 'up' and 'down' for the spinor components
699 IF (IDIMEN .EQ. 2) THEN
700 FN_URE = TRIM(SNAME)//'.CON.K' //
701@@ -405,11 +416,6 @@
702 OPEN(UNIT = UNITPH2, FILE = FN_DPH, STATUS = 'UNKNOWN',
703 . FORM = 'FORMATTED')
704 REWIND(UNITPH2)
705- ELSE
706- WRITE(6,*)'BAD NUMBER NSPIN IN WAVOFR.F'
707- WRITE(6,*)'NSPIN = ',NSPIN
708- WRITE(6,*)'IT MUST BE 1, 2, or 4'
709- STOP
710 ENDIF
711
712 IF (IDIMEN .EQ. 2) THEN
713@@ -465,16 +471,16 @@
714 call write_cube_header(unitmo2,fn_dmo)
715 call write_cube_header(unitph2,fn_dph)
716 endif
717- ELSE IF (NSPIN .EQ. 4) THEN
718- call write_cube_header(unitre1,fn_ure)
719- call write_cube_header(unitim1,fn_uim)
720- call write_cube_header(unitmo1,fn_umo)
721- call write_cube_header(unitph1,fn_uph)
722-
723- call write_cube_header(unitre2,fn_dre)
724- call write_cube_header(unitim2,fn_dim)
725- call write_cube_header(unitmo2,fn_dmo)
726- call write_cube_header(unitph2,fn_dph)
727+ ELSE ! 4 or 8
728+ call write_cube_header(unitre1,fn_ure)
729+ call write_cube_header(unitim1,fn_uim)
730+ call write_cube_header(unitmo1,fn_umo)
731+ call write_cube_header(unitph1,fn_uph)
732+
733+ call write_cube_header(unitre2,fn_dre)
734+ call write_cube_header(unitim2,fn_dim)
735+ call write_cube_header(unitmo2,fn_dmo)
736+ call write_cube_header(unitph2,fn_dph)
737
738 ENDIF
739 ENDIF
740@@ -576,7 +582,7 @@
741 call mod_and_phase(rwavedn,iwavedn,mwavedn,pwavedn)
742 endif
743
744- ELSEIF (NSPIN .EQ. 4) THEN
745+ ELSE ! 4 or 8
746
747 rwaveup = real(cwave(1), dp)
748 iwaveup = aimag(cwave(1))
749@@ -605,19 +611,19 @@
750 call write_plapo(unitmo2,mwavedn)
751 call write_plapo(unitph2,pwavedn)
752 endif
753- ELSEIF ( NSPIN .EQ. 4 ) THEN
754-
755- call write_plapo(unitre1,rwaveup)
756- call write_plapo(unitim1,iwaveup)
757- call write_plapo(unitmo1,mwaveup)
758- call write_plapo(unitph1,pwaveup)
759-
760- call write_plapo(unitre2,rwavedn)
761- call write_plapo(unitim2,iwavedn)
762- call write_plapo(unitmo2,mwavedn)
763- call write_plapo(unitph2,pwavedn)
764-
765- ENDIF
766+ ELSE ! 4 or 8
767+
768+ call write_plapo(unitre1,rwaveup)
769+ call write_plapo(unitim1,iwaveup)
770+ call write_plapo(unitmo1,mwaveup)
771+ call write_plapo(unitph1,pwaveup)
772+
773+ call write_plapo(unitre2,rwavedn)
774+ call write_plapo(unitim2,iwavedn)
775+ call write_plapo(unitmo2,mwavedn)
776+ call write_plapo(unitph2,pwavedn)
777+
778+ ENDIF
779
780 ELSE IF (IDIMEN .EQ. 3) THEN
781 IF (NSPIN .EQ. 1) THEN
782@@ -637,17 +643,17 @@
783 MWF(NPO,2) = MWAVEDN
784 PWF(NPO,2) = PWAVEDN
785 endif
786- ELSE IF (NSPIN .EQ. 4) THEN
787-
788- RWF(NPO,1) = RWAVEUP
789- IMWF(NPO,1) = IWAVEUP
790- MWF(NPO,1) = MWAVEUP
791- PWF(NPO,1) = PWAVEUP
792-
793- RWF(NPO,2) = RWAVEDN
794- IMWF(NPO,2) = IWAVEDN
795- MWF(NPO,2) = MWAVEDN
796- PWF(NPO,2) = PWAVEDN
797+ ELSE ! 4 or 8
798+
799+ RWF(NPO,1) = RWAVEUP
800+ IMWF(NPO,1) = IWAVEUP
801+ MWF(NPO,1) = MWAVEUP
802+ PWF(NPO,1) = PWAVEUP
803+
804+ RWF(NPO,2) = RWAVEDN
805+ IMWF(NPO,2) = IWAVEDN
806+ MWF(NPO,2) = MWAVEDN
807+ PWF(NPO,2) = PWAVEDN
808
809 ENDIF
810 ENDIF
811@@ -668,32 +674,30 @@
812 DO NX=1,NPX
813 DO NY=1,NPY
814
815- if ( (NSPIN .EQ. 1) .or.
816- $ ((NSPIN .EQ.2).and.(ispin.eq.1)) .or.
817- $ (NSPIN .EQ.4) ) then
818-
819- WRITE(UNITRE1,'(6e13.5)')
820- $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
821- WRITE(UNITIM1,'(6e13.5)')
822- $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
823- WRITE(UNITMO1,'(6e13.5)')
824- $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
825- WRITE(UNITPH1,'(6e13.5)')
826- $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
827- endif
828+ if ( NSPIN == 1 .or.
829+ & (NSPIN == 2 .and. ispin == 1 ) .or.
830+ & NSPIN >= 4 ) then
831+ WRITE(UNITRE1,'(6e13.5)')
832+ $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
833+ WRITE(UNITIM1,'(6e13.5)')
834+ $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
835+ WRITE(UNITMO1,'(6e13.5)')
836+ $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
837+ WRITE(UNITPH1,'(6e13.5)')
838+ $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,1),NZ=1,NPZ)
839+ end if
840
841- if ( ((NSPIN .EQ.2).and.(ispin.eq.2)) .or.
842- $ (NSPIN .EQ.4) ) then
843-
844- WRITE(UNITRE2,'(6e13.5)')
845- $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
846- WRITE(UNITIM2,'(6e13.5)')
847- $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
848- WRITE(UNITMO2,'(6e13.5)')
849- $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
850- WRITE(UNITPH2,'(6e13.5)')
851- $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
852- endif
853+ if ( (NSPIN == 2 .and. ispin == 2) .or.
854+ & NSPIN >= 4 ) then
855+ WRITE(UNITRE2,'(6e13.5)')
856+ $ (RWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
857+ WRITE(UNITIM2,'(6e13.5)')
858+ $ (IMWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
859+ WRITE(UNITMO2,'(6e13.5)')
860+ $ (MWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
861+ WRITE(UNITPH2,'(6e13.5)')
862+ $ (PWF(NX+(NY-1)*NPX+(NZ-1)*NPX*NPY,2),NZ=1,NPZ)
863+ end if
864 ENDDO
865 ENDDO
866
867@@ -705,7 +709,7 @@
868 WRITE(6,'(A,A)') ' ',FN_IM
869 WRITE(6,'(A,A)') ' ',FN_MO
870 WRITE(6,'(A,A)') ' ',FN_PH
871- ELSE IF ((NSPIN .EQ. 2) .or. (NSPIN .EQ. 4)) THEN
872+ ELSE ! 2, 4 or 8
873 WRITE(6,'(A,A)') ' ',FN_URE
874 WRITE(6,'(A,A)') ' ',FN_UIM
875 WRITE(6,'(A,A)') ' ',FN_DRE
876@@ -714,7 +718,7 @@
877 WRITE(6,'(A,A)') ' ',FN_UPH
878 WRITE(6,'(A,A)') ' ',FN_DMO
879 WRITE(6,'(A,A)') ' ',FN_DPH
880- if (nspin == 4) write(6,"(a)")
881+ if (nspin >= 4) write(6,"(a)")
882 $ "... up and down for spinor components"
883 ENDIF
884 ENDIF ! 3D
885
886=== modified file 'Util/Eig2DOS/Eig2DOS.f90'
887--- Util/Eig2DOS/Eig2DOS.f90 2019-03-02 23:57:58 +0000
888+++ Util/Eig2DOS/Eig2DOS.f90 2019-09-26 07:10:24 +0000
889@@ -56,12 +56,12 @@
890 real(dp) :: emin = -huge(1.0_dp)
891 real(dp) :: emax = huge(1.0_dp)
892 real(dp) :: smear = 0.2_dp
893+ real(dp) :: smear2
894 logical :: loren = .false.
895 logical :: emin_given = .false.
896 logical :: emax_given = .false.
897 logical :: using_weights = .false.
898 logical :: shift_efermi = .false.
899- logical :: non_coll
900 integer :: min_band = 0
901 integer :: max_band = 0
902
903@@ -155,13 +155,18 @@
904 action="read")
905 read(1,*) Ef
906 read(1,*) nband, nspin, nk
907- non_coll = (nspin == 4)
908
909- if (non_coll) then
910- nspin_blocks = 1
911- else
912- nspin_blocks = nspin
913- endif
914+ nspin_blocks = 1
915+ if ( nspin == 8 ) then
916+ write(*,"(a)") "# Eigenvalues calculated from a spin-orbit calculation"
917+ else if ( nspin == 4 ) then
918+ write(*,"(a)") "# Eigenvalues calculated from a non-collinear calculation"
919+ else if ( nspin == 2 ) then
920+ write(*,"(a)") "# Eigenvalues calculated from a spin-polarized calculation"
921+ nspin_blocks = nspin
922+ else if ( nspin == 1 ) then
923+ write(*,"(a)") "# Eigenvalues calculated from a non-polarized calculation"
924+ end if
925
926 write(*,"(a)") "# Eigenvalues read from " // trim(eig_file)
927 if ( debug ) print *, "Ef, nband, nspin, nk:", Ef, nband, nspin, nk
928@@ -197,6 +202,7 @@
929 endif
930
931
932+ smear2 = smear * smear
933 write(*,"(a,f8.4)") "# Using smearing parameter: ", smear
934 write(*,"(a,i0,a)") "# Using ", npts_energy, " points in the energy range"
935 write(*,"(2(a,i0))") "# Selected bands: ", min_band ," to: ", max_band
936@@ -253,9 +259,9 @@
937 do ie = 1, npts_energy
938 x = emin + (ie-1)*eincr - e
939 if (loren) then
940- DOS(ie,is) = DOS(ie,is) + weight * smear / (smear*smear + x*x)
941+ DOS(ie,is) = DOS(ie,is) + weight * smear / (smear2 + x*x)
942 else
943- DOS(ie,is) = DOS(ie,is) + weight * exp( - x*x/(smear*smear) )
944+ DOS(ie,is) = DOS(ie,is) + weight * exp( - x*x/smear2 )
945 end if
946 end do
947 end do
948
949=== modified file 'Util/STM/ol-stm/Src/mainstm.F'
950--- Util/STM/ol-stm/Src/mainstm.F 2019-06-06 09:34:48 +0000
951+++ Util/STM/ol-stm/Src/mainstm.F 2019-09-26 07:10:24 +0000
952@@ -158,7 +158,7 @@
953
954 ! Non-collinear or SOC files have a single "spin" block as opposed to collinear-spin
955 ! files, which contain two spin blocks per k section.
956- non_coll = (nspin == 4)
957+ non_coll = (nspin >= 4)
958 nspin_blocks = nspin
959 if (non_coll) nspin_blocks = 1
960
961
962=== modified file 'Util/STM/ol-stm/Src/stm.f'
963--- Util/STM/ol-stm/Src/stm.f 2019-06-05 08:47:53 +0000
964+++ Util/STM/ol-stm/Src/stm.f 2019-09-26 07:10:24 +0000
965@@ -104,6 +104,7 @@
966
967 LOGICAL FIRST
968 integer :: idummy, number_of_wfns, spinor_comps
969+ integer :: nspin_max
970
971 CHARACTER :: SNAME*40, FNAME*256, stm_label*60
972
973@@ -168,10 +169,12 @@
974 ALLOCATE(R2IJ(MAXNA))
975 ALLOCATE(XIJ(3,MAXNA))
976
977+ nspin_max = min(4,nspin)
978+
979 allocate(CWAVE(spinor_comps))
980 ALLOCATE(CW(0:NPX-1,0:NPY-1,spinor_comps))
981 ALLOCATE(CWE(0:NPX-1,0:NPY-1,0:NPZ-1,spinor_comps))
982- ALLOCATE(RHO(0:NPX-1,0:NPY-1,0:NPZ-1,nspin))
983+ ALLOCATE(RHO(0:NPX-1,0:NPY-1,0:NPZ-1,nspin_max))
984
985 FIRST = .TRUE.
986 DO I = 1,3
987@@ -423,9 +426,9 @@
988 $ [0.0_dp, 0.0_dp, ZMIN], ! Extra info for origin
989 $ [.true.,.true.,.false.] ! Periodic ?
990
991- WRITE(grid_u) NPX, NPY, NPZ, nspin
992+ WRITE(grid_u) NPX, NPY, NPZ, nspin_max
993
994- do ispin = 1, nspin
995+ do ispin = 1, nspin_max
996 DO IZ=0,NPZ-1
997 DO IY=0,NPY-1
998 WRITE(grid_u) (REAL(RHO(IX,IY,IZ,ispin),sp),IX=0,NPX-1)
999
1000=== modified file 'Util/WFS/readwfx.f90'
1001--- Util/WFS/readwfx.f90 2019-03-18 10:51:45 +0000
1002+++ Util/WFS/readwfx.f90 2019-09-26 07:10:24 +0000
1003@@ -121,7 +121,7 @@
1004 read(wfs_u) nk, gamma
1005
1006 read(wfs_u) wfs_spin_flag ! 1, 2, or 4
1007- non_coll = (wfs_spin_flag == 4)
1008+ non_coll = (wfs_spin_flag >= 4)
1009 read(wfs_u) nuotot
1010 read(wfs_u) !! Symbols, etc
1011
1012
1013=== modified file 'Util/WFS/wfs2wfsx.f'
1014--- Util/WFS/wfs2wfsx.f 2016-01-25 16:00:16 +0000
1015+++ Util/WFS/wfs2wfsx.f 2019-09-26 07:10:24 +0000
1016@@ -75,7 +75,7 @@
1017 orb_info_written = .false.
1018
1019 do iik = 1,nk
1020- do iispin = 1,nspin
1021+ do iispin = 1,min(4,nspin)
1022
1023 read(iu) ik,k(1),k(2),k(3)
1024 if (ik .ne. iik) stop 'error in index of k-point'
1025
1026=== modified file 'Util/WFS/wfsnc2wfsx.F90'
1027--- Util/WFS/wfsnc2wfsx.F90 2016-01-25 16:00:16 +0000
1028+++ Util/WFS/wfsnc2wfsx.F90 2019-09-26 07:10:24 +0000
1029@@ -103,7 +103,7 @@
1030 symfio(j), j=1,nuotot)
1031
1032 do iik = 1,nk
1033- do iispin = 1,nspin
1034+ do iispin = 1,min(4,nspin)
1035
1036 write(io) iik,kp(1:3,iik), wk(iik)
1037 write(io) iispin
1038
1039=== modified file 'Util/WFS/wfsx2wfs.f'
1040--- Util/WFS/wfsx2wfs.f 2016-09-12 13:30:18 +0000
1041+++ Util/WFS/wfsx2wfs.f 2019-09-26 07:10:24 +0000
1042@@ -61,7 +61,7 @@
1043 . symfio(j), j=1,nuotot)
1044
1045 do iik = 1,nk
1046- do iispin = 1,nspin
1047+ do iispin = 1,min(4,nspin)
1048
1049 read(iu) ik,k(1),k(2),k(3)
1050 write(io) ik,k(1),k(2),k(3)
1051
1052=== modified file 'version.info'
1053--- version.info 2019-09-25 09:49:02 +0000
1054+++ version.info 2019-09-26 07:10:24 +0000
1055@@ -1,1 +1,5 @@
1056+<<<<<<< TREE
1057 siesta-4.1-1126
1058+=======
1059+siesta-4.1-1119--streamline-file-dim-nc-soc-2
1060+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches