Merge lp:~jose-soler/siesta/unfolding into lp:siesta

Proposed by Jose M Soler
Status: Merged
Merged at revision: 782
Proposed branch: lp:~jose-soler/siesta/unfolding
Merge into: lp:siesta
Diff against target: 3206 lines (+3021/-5) (has conflicts)
26 files modified
Src/SiestaXC/makefile (+3/-1)
Src/meshsubs.F (+8/-4)
Util/Unfolding/Examples/C/Diamond/diamond.fdf (+62/-0)
Util/Unfolding/Examples/C/Graphene/Bilayer/bilayer.fdf (+339/-0)
Util/Unfolding/Examples/C/Graphene/Bilayer/meshgen.dat (+4/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.STRUCT_IN (+100/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.fdf (+173/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/meshgen.dat (+4/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.STRUCT_IN (+130/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.fdf (+197/-0)
Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/meshgen.dat (+4/-0)
Util/Unfolding/Examples/README (+58/-0)
Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.coord.fdf (+218/-0)
Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.fdf (+73/-0)
Util/Unfolding/Examples/Si/Bulk/Si8/si8.fdf (+72/-0)
Util/Unfolding/Examples/Si/Defects/Vacancy/si7.fdf (+64/-0)
Util/Unfolding/README (+140/-0)
Util/Unfolding/Src/Makefile (+48/-0)
Util/Unfolding/Src/local_sys.f (+45/-0)
Util/Unfolding/Src/meshgen.c (+58/-0)
Util/Unfolding/Src/plotUandR.m (+187/-0)
Util/Unfolding/Src/plotdiff.m (+160/-0)
Util/Unfolding/Src/plotdos.m (+119/-0)
Util/Unfolding/Src/plotmesh.m (+90/-0)
Util/Unfolding/Src/unfold.F90 (+661/-0)
version.info (+4/-0)
Text conflict in version.info
To merge this branch: bzr merge lp:~jose-soler/siesta/unfolding
Reviewer Review Type Date Requested Status
Alberto Garcia Approve
Nick Papior Needs Fixing
Review via email: mp+363983@code.launchpad.net

Commit message

Implementation of a band unfolding utility in Util/Unfolding, based on the method descibed in S.G.Mayo and J.M.Soler, https://arxiv.org/abs/1812.03925. See Util/Unfolding/README for details.

Description of the change

Changes almost completely confined to new directory Util/Unfolding. Updated to trunk-762

To post a comment you must log in.
lp:~jose-soler/siesta/unfolding updated
759. By Jose M Soler

Merged with trunk-764

modified:
  Docs/siesta.tex
  Src/compute_dm.F
  Src/flook_siesta.F90
  Src/matel_registry.F90
  Src/normalize_dm.F90
  Src/read_options.F90
  Src/siesta_forces.F90
  Src/siesta_init.F
  Src/siesta_options.F90
  Src/write_subs.F

760. By Jose M Soler

Merged with SGM branch

added:
  Util/Unfolding/Src/meshgen.c
  Util/Unfolding/Src/plotmesh.m
modified:
  Util/Unfolding/README
  Util/Unfolding/Src/unfold.F90

761. By sara <email address hidden>

Fixed normalization constant in 'unfold.F90'.
Updated old-fashioned examples.
Improved plotting tools.

added:
  Util/Unfolding/Src/plotUandR.m
modified:
  Util/Unfolding/Examples/Al/Al.fdf
  Util/Unfolding/Examples/Si/Amorphous/Si216/a-si216.fdf
  Util/Unfolding/Examples/Si/Atom/FCC/si_atom.fdf
  Util/Unfolding/Examples/Si/Atom/SC/si_atom.fdf
  Util/Unfolding/Examples/Si/Bulk/Si2/si2.fdf
  Util/Unfolding/Examples/Si/Bulk/Si8/si8.fdf
  Util/Unfolding/Examples/Si/Defects/Vacancy/si7.fdf
  Util/Unfolding/Examples/Si/Surfaces/100/si100.2x4.fdf
  Util/Unfolding/README
  Util/Unfolding/Src/plotdiff.m*
  Util/Unfolding/Src/plotdos.m*
  Util/Unfolding/Src/plotmesh.m
  Util/Unfolding/Src/unfold.F90

762. By Jose M Soler

Merged with trunk-766

modified:
  Docs/siesta.bib
  Docs/siesta.tex
  Docs/tbtrans.tex
  Src/Makefile
  Src/atom.F
  Src/dhscf.F
  Src/fdf/fdf.F90
  Src/flook_siesta.F90
  Src/kpoint_convert.f90
  Src/m_mixing.F90
  Src/m_ts_electrode.F90
  Src/m_ts_electype.F90
  Src/m_ts_hartree.F90
  Src/m_ts_options.F90
  Src/m_ts_sparse_helper.F90
  Tests/flos_h2o_neb/neb.lua
  Util/TS/TBtrans/m_tbt_proj.F90
  Util/TS/TBtrans/m_tbt_save.F90
  Util/TS/TBtrans/m_tbt_sigma_save.F90
  Util/TS/TBtrans/m_tbt_trik.F90
  Util/TS/TBtrans/m_tbtrans.F90
  Util/TS/TBtrans/tbt_reinit.F90

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

Thanks for the MR.

I have left a few comments in-line below.

Would it be beneficial to change the fdf-block names like this:
UnfoldedBandLines -> BandLines.Unfolded
RefoldingLatticeVectors -> LatticeVectors.Refolding

I am being pedantic but in my mind it clarifies the relationship with the *original* inputs.
I don't have any objective to the older names, so if you prefer those I am perfectly fine with that.

review: Needs Fixing
lp:~jose-soler/siesta/unfolding updated
763. By Jose M Soler

Two small changes requested by N.Papior

modified:
  Src/meshsubs.F
  Util/Unfolding/Src/unfold.F90

764. By sara <email address hidden>

Fermi level is now read from '.EIG' file.

modified:
  Util/Unfolding/Src/unfold.F90

Revision history for this message
Jose M Soler (jose-soler) wrote :
Download full text (30.1 KiB)

Nick,
thanks for taking care of this. We have uploaded a new version with the
changes you requested, plus a new way to read the Fermi energy in
unfold.f90.
Regarding the names of the fdf variables, we rather prefer not to change
them because there are already a number of users that have been using
this branch for some time, and changing the names would bring issues of
back compatibility.
Best wishes,
Jose and Sara

El mié., 7 ago. 2019 a las 9:18, Nick Papior (<email address hidden>)
escribió:

> Review: Needs Fixing
>
> Thanks for the MR.
>
> I have left a few comments in-line below.
>
> Would it be beneficial to change the fdf-block names like this:
> UnfoldedBandLines -> BandLines.Unfolded
> RefoldingLatticeVectors -> LatticeVectors.Refolding
>
> I am being pedantic but in my mind it clarifies the relationship with the
> *original* inputs.
> I don't have any objective to the older names, so if you prefer those I am
> perfectly fine with that.
>
> Diff comments:
>
> >
> > === modified file 'Src/meshsubs.F'
> > --- Src/meshsubs.F 2019-02-12 14:37:15 +0000
> > +++ Src/meshsubs.F 2019-07-15 09:30:39 +0000
> > @@ -365,10 +369,12 @@
> >
> > ! Issue a warning if the mesh sizes are smaller than
> > ! the requested mesh cutoff
> > - if ( RealCutoff < G2max ) then
> > - call message("WARNING","Read mesh sizes give a smaller"
> > - $ // " cutoff than requested")
> > - end if
> > + if (RealCutoff<G2max .and. fdf_defined('MeshCutoff')) then
> > + if (IOnode) print'(/,a,/)',"meshsubs WARNING: "
>
> The print statement is not required since message will also write out
> (i.e. doubly information).
>
> > + $ //"Input MeshSizes too small for requested MeshCutoff"
> > + call message("WARNING","Read mesh sizes give a smaller"
> > + $ // " cutoff than requested")
> > + endif
> >
> > ! Check whether the resulting mesh sizes are multiples
> > ! of nsm.
> >
> > === added file 'Util/Unfolding/Src/unfold.F90'
> > --- Util/Unfolding/Src/unfold.F90 1970-01-01 00:00:00 +0000
> > +++ Util/Unfolding/Src/unfold.F90 2019-07-15 09:30:39 +0000
> > @@ -0,0 +1,649 @@
> > +! ---
> > +! Copyright (C) 1996-2016 The SIESTA group
> > +! This file is distributed under the terms of the
> > +! GNU General Public License: see COPYING in the top directory
> > +! or http://www.gnu.org/copyleft/gpl.txt .
> > +! See Docs/Contributors.txt for a list of contributors.
> > +! ---
> > +
> > +program unfold
> > +
> > +! Reads the .fdf, .ion, .HSX, .out and .psf files of a SIESTA
> calculation and
> > +! generates unfolded and refolded bands. See Util/Unfolding/README for
> details.
> > +! Ref: "Band unfolding made simple", S.G.Mayo and J.M.Soler, Dic.2018
> > +! arXiv:1812.03925 ( https://arxiv.org/abs/1812.03925 )
> > +! S.G.Mayo and J.M.Soler, Oct.2018
> > +
> > + use alloc, only: alloc_report, de_alloc, re_alloc
> > + use atmfuncs, only: lofio, mofio, nofis, rcut, rphiatm, zetafio
> > + use basis_types, only: nsp
> > + use basis_types, only: basis_parameters, initialize
> > + use basis_io, only: read_basis_ascii
> > + use...

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

I have a few comments:

Options 'SaveHS T' and 'COOP.Write T' are implied in the README file as being somewhat equivalent for the purposes of the Unfolding tool, but COOP.Write involves an extra further diagonalization in the whole BZ, which could potentially be expensive, apart from the extra writing of a potentially large wavefunction file. This might be noted in the README, or the mention to COOP.Write removed.

A short "guide to the examples" might be welcome. Some of Si examples appear to be the ones used in the paper, but the purposes or features of others (the "Atom" ones) are a bit mysterious.

Is it possible to merge this also in 4.1, or are there any specific features from 'trunk' used? The unfolding feature will get more exposure, as 4.1 is about to come out of beta.

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

Just to clarify: I agree to the merge as it is, but if it is possible and straightforward to do it in 4.1 first this MR would be formally superseded (and the unfolding feature would be carried over from 4.1 to trunk).

lp:~jose-soler/siesta/unfolding updated
765. By sara <email address hidden>

A guide of examples is included. Some of the previous examples
are substituted for more physically relevant ones.
Input format of 'meshgen.c' modified.

removed:
  Util/Unfolding/Examples/Al/
  Util/Unfolding/Examples/Al/Al.fdf
  Util/Unfolding/Examples/Si/Amorphous/Si216/a-si216.fdf
  Util/Unfolding/Examples/Si/Atom/
  Util/Unfolding/Examples/Si/Atom/FCC/
  Util/Unfolding/Examples/Si/Atom/FCC/si_atom.fdf
  Util/Unfolding/Examples/Si/Atom/SC/
  Util/Unfolding/Examples/Si/Atom/SC/si_atom.fdf
  Util/Unfolding/Examples/Si/Bulk/Si2/
  Util/Unfolding/Examples/Si/Bulk/Si2/si2.fdf
  Util/Unfolding/Examples/Si/Surfaces/
  Util/Unfolding/Examples/Si/Surfaces/100/
  Util/Unfolding/Examples/Si/Surfaces/100/Si4x2.8l.apwdata
  Util/Unfolding/Examples/Si/Surfaces/100/si100.2x4.bulk.fdf
  Util/Unfolding/Examples/Si/Surfaces/100/si100.2x4.fdf
  Util/Unfolding/Examples/Si/Surfaces/100/si100.2x4coord.fdf
  Util/Unfolding/Examples/Si/Surfaces/111/
  Util/Unfolding/Examples/Si/Surfaces/111/Si111.coordinates.fdf
added:
  Util/Unfolding/Examples/C/
  Util/Unfolding/Examples/C/Diamond/
  Util/Unfolding/Examples/C/Diamond/diamond.fdf
  Util/Unfolding/Examples/C/Graphene/
  Util/Unfolding/Examples/C/Graphene/Bilayer/
  Util/Unfolding/Examples/C/Graphene/Bilayer/bilayer.fdf
  Util/Unfolding/Examples/C/Graphene/Bilayer/meshgen.dat
  Util/Unfolding/Examples/C/Graphene/Divacancy/
  Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/
  Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.STRUCT_IN
  Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.fdf
  Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/meshgen.dat
  Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/
  Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.STRUCT_IN
  Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.fdf
  Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/meshgen.dat
  Util/Unfolding/Examples/README
  Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.coord.fdf
  Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.fdf
modified:
  Util/Unfolding/README
  Util/Unfolding/Src/meshgen.c

Revision history for this message
Jose M Soler (jose-soler) wrote :

Alberto, Nick,

we have removed the COOP.Write option and changed and documented the
examples, as suggested by Alberto.

Best wishes,
Jose

El lun., 19 ago. 2019 a las 1:59, Alberto Garcia (<email address hidden>)
escribió:

> Just to clarify: I agree to the merge as it is, but if it is possible and
> straightforward to do it in 4.1 first this MR would be formally superseded
> (and the unfolding feature would be carried over from 4.1 to trunk).
> --
> https://code.launchpad.net/~jose-soler/siesta/unfolding/+merge/363983
> You are the owner of lp:~jose-soler/siesta/unfolding.
>

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

Great. As for Alberto's comments. I don't think we should bother with taking it to 4.1. We should (hopefully) do a quick release of 4.2 with this in it. So that should be fine.

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

Approved. Will merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Src/SiestaXC/makefile'
2--- Src/SiestaXC/makefile 2017-09-29 11:10:46 +0000
3+++ Src/SiestaXC/makefile 2019-09-12 09:33:19 +0000
4@@ -45,7 +45,9 @@
5 libSiestaXC.a: $(ALL_OBJS)
6 $(AR) $(ARFLAGS_EXTRA) cru libSiestaXC.a $(ALL_OBJS)
7 @if [ ! -z "$(MPI_INTERFACE)" ] ; then \
8- $(AR) $(ARFLAGS_EXTRA) cru libSiestaXC.a ../MPI/*.o ; fi
9+ mkdir Tmp ; cd Tmp ; ar -x ../../MPI/libmpi_f90.a ; cd .. ;\
10+ $(AR) $(ARFLAGS_EXTRA) cru libSiestaXC.a Tmp/*.o ;\
11+ rm -rf Tmp ; fi
12 -$(RANLIB) libSiestaXC.a
13 #
14 OTHER_FILES=lib-makefile lib-arch.make mpi-makefile lib-00-README test-makefile
15
16=== modified file 'Src/meshsubs.F'
17--- Src/meshsubs.F 2019-02-12 14:37:15 +0000
18+++ Src/meshsubs.F 2019-09-12 09:33:19 +0000
19@@ -42,6 +42,7 @@
20 use siesta_cml
21 use cellsubs, only : reclat ! Finds reciprocal unit cell
22 use cellsubs, only : volcel ! Finds unit cell volume
23+ use fdf, only : fdf_defined
24 #ifdef MPI
25 use mpi_siesta
26 #endif
27@@ -154,6 +155,8 @@
28 dvol = volume / ntp
29
30 C Output current mesh dimensions and cut-off
31+ if (fdf_defined('MeshSizes') .and. .not.fdf_defined('MeshCutoff'))
32+ & G2max = 0._dp
33 if (Node.eq.0) then
34 write(6,'(/,a,3(i6,a),i12)') 'InitMesh: MESH =',
35 & ntm(1),' x',ntm(2),' x',ntm(3),' =', ntp
36@@ -269,6 +272,7 @@
37 ! sampling size nsm.
38
39 use precision, only : dp
40+ use parallel, only : IOnode
41 use cellsubs, only : reclat ! Finds reciprocal unit cell
42 use m_chkgmx, only : chkgmx ! Checks planewave cutoff of a mesh
43 use fft1d, only : nfft ! Finds allowed value for 1-D FFT
44@@ -365,10 +369,10 @@
45
46 ! Issue a warning if the mesh sizes are smaller than
47 ! the requested mesh cutoff
48- if ( RealCutoff < G2max ) then
49- call message("WARNING","Read mesh sizes give a smaller"
50- $ // " cutoff than requested")
51- end if
52+ if (RealCutoff<G2max .and. fdf_defined('MeshCutoff')) then
53+ call message("WARNING","Read mesh sizes give a smaller"
54+ & // " cutoff than requested")
55+ endif
56
57 ! Check whether the resulting mesh sizes are multiples
58 ! of nsm.
59
60=== added directory 'Util/Unfolding'
61=== added directory 'Util/Unfolding/Examples'
62=== added directory 'Util/Unfolding/Examples/C'
63=== added directory 'Util/Unfolding/Examples/C/Diamond'
64=== added file 'Util/Unfolding/Examples/C/Diamond/diamond.fdf'
65--- Util/Unfolding/Examples/C/Diamond/diamond.fdf 1970-01-01 00:00:00 +0000
66+++ Util/Unfolding/Examples/C/Diamond/diamond.fdf 2019-09-12 09:33:19 +0000
67@@ -0,0 +1,62 @@
68+ SystemName diamond
69+ SystemLabel diamond
70+ NumberOfAtoms 2
71+ NumberOfSpecies 1
72+
73+ %block ChemicalSpeciesLabel
74+ 1 6 C
75+ %endblock ChemicalSpeciesLabel
76+
77+ LatticeConstant 3.57 Ang
78+
79+ %block LatticeVectors
80+ 0.000 0.500 0.500
81+ 0.500 0.000 0.500
82+ 0.500 0.500 0.000
83+ %endblock LatticeVectors
84+
85+ AtomicCoordinatesFormat ScaledCartesian
86+ %block AtomicCoordinatesAndAtomicSpecies
87+ -0.125 -0.125 -0.125 1 C
88+ 0.125 0.125 0.125 1 C
89+ %endblock AtomicCoordinatesAndAtomicSpecies
90+
91+ XC.functional GGA
92+ XC.authors PBE
93+
94+ PAO.BasisSize DZP
95+ DM.MixingWeight 0.15
96+ DM.UseSaveDM .true.
97+ DM.Tolerance 0.0001
98+
99+# MeshCutoff 300.0 Ry
100+ %block MeshSizes
101+ 32 32 32
102+ %endblock MeshSizes
103+
104+ %block kgrid.MonkhorstPack
105+ 8 0 0 0.5
106+ 0 8 0 0.5
107+ 0 0 8 0.5
108+ %endblock kgrid.MonkhorstPack
109+
110+ BandLinesScale pi/a
111+ SaveHS .true.
112+
113+ %block UnfoldedBandLines
114+ 500 -26.0 24.0 eV
115+ 1 -2.0 -2.0 -2.0 \Gamma
116+ 85 -1.0 -1.0 -1.0 L
117+ 85 0.0 0.0 0.0 \Gamma
118+ 100 2.0 0.0 0.0 X
119+ 35 2.0 0.5 0.5 U
120+ 105 2.0 2.0 2.0 \Gamma
121+ %endblock UnfoldedBandLines
122+
123+ RefoldingGcutoff 20.0 Ry
124+ %block RefoldingLatticeVectors
125+ 0.000 0.500 0.500
126+ 0.500 0.000 0.500
127+ 0.500 0.500 0.000
128+ %endblock RefoldingLatticeVectors
129+
130
131=== added directory 'Util/Unfolding/Examples/C/Graphene'
132=== added directory 'Util/Unfolding/Examples/C/Graphene/Bilayer'
133=== added file 'Util/Unfolding/Examples/C/Graphene/Bilayer/bilayer.fdf'
134--- Util/Unfolding/Examples/C/Graphene/Bilayer/bilayer.fdf 1970-01-01 00:00:00 +0000
135+++ Util/Unfolding/Examples/C/Graphene/Bilayer/bilayer.fdf 2019-09-12 09:33:19 +0000
136@@ -0,0 +1,339 @@
137+
138+SystemName 4_5 rotated graphene bilayer (angle=7.38 deg)
139+SystemLabel Bilayer-4_5 # Short name for naming files
140+
141+# Species and atoms
142+
143+NumberOfSpecies 2
144+NumberOfAtoms 244
145+%block ChemicalSpeciesLabel
146+ 1 6 C
147+ 2 1 H
148+%endblock ChemicalSpeciesLabel
149+
150+
151+PAO.EnergyShift 200 meV
152+PAO.BasisSize DZ
153+PAO.SplitNorm 0.25
154+
155+
156+LatticeConstant 1.000000 Ang
157+%block LatticeVectors
158+ 19.314099 1.239000 0.000000
159+ 8.584044 17.346000 0.000000
160+ 0.000000 0.000000 20.000000
161+%endblock LatticeVectors
162+
163+ # UNFOLDING options
164+# BandLinesScale pi/a
165+SaveHS .true.
166+
167+%include meshgen.fdf # Contains %block UnfoldedBandLines, see Src/meshgen.c
168+
169+RefoldingGcutoff 15.0 Ry
170+%block RefoldingLatticeVectors
171+ 0.000019314099 0.000001239 0.0
172+ 0.000008584044 0.000017346 0.0
173+ 0.0 0.0 20.0
174+%endblock RefoldingLatticeVectors
175+
176+
177+%block k_grid_Monkhorst_Pack
178+ 40 0 0 0.0
179+-40 40 0 0.0
180+ 0 0 1 0.0
181+%endblock k_grid_Monkhorst_Pack
182+
183+Diag.ParallelOverK .true.
184+
185+#%block BandLines
186+# 1 0.00000 0.000000 0.000000 \Gamma
187+# 60 0.053473 -0.026462 0.000000 M
188+# 60 0.038195 -0.057335 0.000000 K
189+# 60 0.00000 0.000000 0.000000 \Gamma
190+#%endblock BandLines
191+
192+
193+XC.functional VDW # Exchange-correlation functional
194+XC.authors BH
195+
196+SpinPolarized .false. # Logical parameters are: yes or no
197+
198+MeshCutoff 400. Ry # Mesh cutoff. real space mesh
199+
200+# SCF options
201+MixHamiltonian .true.
202+MaxSCFIterations 150 # Maximum number of SCF iter
203+DM.MixingWeight 0.05 # New DM amount for next SCF cycle
204+DM.Tolerance 2.5d-4 # Tolerance in maximum difference
205+ # between input and output DM
206+DM.UseSaveDM .true. # to use continuation files
207+DM.NumberPulay 3
208+
209+SCFMustConverge .false.
210+
211+SolutionMethod diagon # OrderN or Diagon
212+
213+OccupationFunction MP
214+OccupationMPOrder 2
215+
216+ElectronicTemperature 50. meV # Temp. for Fermi smearing
217+
218+# MD options
219+
220+MD.TypeOfRun cg # Type of dynamics:
221+MD.NumCGsteps 0 # Number of CG steps for
222+ # coordinate optimization
223+MD.MaxCGDispl 0.05 Ang # Maximum atomic displacement
224+ # in one CG step (Bohr)
225+MD.MaxForceTol 0.02 eV/Ang # Tolerance in the maximum
226+ # atomic force (Ry/Bohr)
227+
228+# Atomic coordinates
229+AtomicCoordinatesFormat ScaledCartesian
230+%block AtomicCoordinatesAndAtomicSpecies
231+ 10.014718 17.346000 0.000000 1
232+ 11.445392 17.346000 0.000000 1
233+ 12.160729 16.107000 0.000000 1
234+ 13.591403 16.107000 0.000000 1
235+ 14.306740 14.868000 0.000000 1
236+ 15.737414 14.868000 0.000000 1
237+ 16.452751 13.629000 0.000000 1
238+ 17.883425 13.629000 0.000000 1
239+ 18.598762 12.390000 0.000000 1
240+ 20.029436 12.390000 0.000000 1
241+ 20.744773 11.151000 0.000000 1
242+ 22.175446 11.151000 0.000000 1
243+ 22.890783 9.912000 0.000000 1
244+ 5.007359 8.673000 0.000000 1
245+ 5.722696 7.434000 0.000000 1
246+ 7.153370 7.434000 0.000000 1
247+ 7.868707 6.195000 0.000000 1
248+ 9.299381 6.195000 0.000000 1
249+ 10.014718 4.956000 0.000000 1
250+ 11.445392 4.956000 0.000000 1
251+ 12.160729 3.717000 0.000000 1
252+ 13.591403 3.717000 0.000000 1
253+ 14.306740 2.478000 0.000000 1
254+ 15.737414 2.478000 0.000000 1
255+ 16.452751 1.239000 0.000000 1
256+ 17.883425 1.239000 0.000000 1
257+ 27.182805 17.346000 0.000000 1
258+ 9.299381 16.107000 0.000000 1
259+ 10.014718 14.868000 0.000000 1
260+ 11.445392 14.868000 0.000000 1
261+ 12.160729 13.629000 0.000000 1
262+ 13.591403 13.629000 0.000000 1
263+ 14.306740 12.390000 0.000000 1
264+ 15.737414 12.390000 0.000000 1
265+ 16.452751 11.151000 0.000000 1
266+ 17.883425 11.151000 0.000000 1
267+ 18.598762 9.912000 0.000000 1
268+ 20.029436 9.912000 0.000000 1
269+ 20.744773 8.673000 0.000000 1
270+ 22.175446 8.673000 0.000000 1
271+ 3.576685 6.195000 0.000000 1
272+ 5.007359 6.195000 0.000000 1
273+ 5.722696 4.956000 0.000000 1
274+ 7.153370 4.956000 0.000000 1
275+ 7.868707 3.717000 0.000000 1
276+ 9.299381 3.717000 0.000000 1
277+ 10.014718 2.478000 0.000000 1
278+ 11.445392 2.478000 0.000000 1
279+ 12.160729 1.239000 0.000000 1
280+ 13.591403 1.239000 0.000000 1
281+ 22.890783 17.346000 0.000000 1
282+ 24.321457 17.346000 0.000000 1
283+ 25.036794 16.107000 0.000000 1
284+ 26.467468 16.107000 0.000000 1
285+ 7.868707 13.629000 0.000000 1
286+ 9.299381 13.629000 0.000000 1
287+ 10.014718 12.390000 0.000000 1
288+ 11.445392 12.390000 0.000000 1
289+ 12.160729 11.151000 0.000000 1
290+ 13.591403 11.151000 0.000000 1
291+ 14.306740 9.912000 0.000000 1
292+ 15.737414 9.912000 0.000000 1
293+ 16.452751 8.673000 0.000000 1
294+ 17.883425 8.673000 0.000000 1
295+ 18.598762 7.434000 0.000000 1
296+ 20.029436 7.434000 0.000000 1
297+ 20.744773 6.195000 0.000000 1
298+ 2.861348 4.956000 0.000000 1
299+ 3.576685 3.717000 0.000000 1
300+ 5.007359 3.717000 0.000000 1
301+ 5.722696 2.478000 0.000000 1
302+ 7.153370 2.478000 0.000000 1
303+ 7.868707 1.239000 0.000000 1
304+ 9.299381 1.239000 0.000000 1
305+ 18.598762 17.346000 0.000000 1
306+ 20.029436 17.346000 0.000000 1
307+ 20.744773 16.107000 0.000000 1
308+ 22.175446 16.107000 0.000000 1
309+ 22.890783 14.868000 0.000000 1
310+ 24.321457 14.868000 0.000000 1
311+ 25.036794 13.629000 0.000000 1
312+ 7.153370 12.390000 0.000000 1
313+ 7.868707 11.151000 0.000000 1
314+ 9.299381 11.151000 0.000000 1
315+ 10.014718 9.912000 0.000000 1
316+ 11.445392 9.912000 0.000000 1
317+ 12.160729 8.673000 0.000000 1
318+ 13.591403 8.673000 0.000000 1
319+ 14.306740 7.434000 0.000000 1
320+ 15.737414 7.434000 0.000000 1
321+ 16.452751 6.195000 0.000000 1
322+ 17.883425 6.195000 0.000000 1
323+ 18.598762 4.956000 0.000000 1
324+ 20.029436 4.956000 0.000000 1
325+ 1.430674 2.478000 0.000000 1
326+ 2.861348 2.478000 0.000000 1
327+ 3.576685 1.239000 0.000000 1
328+ 5.007359 1.239000 0.000000 1
329+ 14.306740 17.346000 0.000000 1
330+ 15.737414 17.346000 0.000000 1
331+ 16.452751 16.107000 0.000000 1
332+ 17.883425 16.107000 0.000000 1
333+ 18.598762 14.868000 0.000000 1
334+ 20.029436 14.868000 0.000000 1
335+ 20.744773 13.629000 0.000000 1
336+ 22.175446 13.629000 0.000000 1
337+ 22.890783 12.390000 0.000000 1
338+ 24.321457 12.390000 0.000000 1
339+ 5.722696 9.912000 0.000000 1
340+ 7.153370 9.912000 0.000000 1
341+ 7.868707 8.673000 0.000000 1
342+ 9.299381 8.673000 0.000000 1
343+ 10.014718 7.434000 0.000000 1
344+ 11.445392 7.434000 0.000000 1
345+ 12.160729 6.195000 0.000000 1
346+ 13.591403 6.195000 0.000000 1
347+ 14.306740 4.956000 0.000000 1
348+ 15.737414 4.956000 0.000000 1
349+ 16.452751 3.717000 0.000000 1
350+ 17.883425 3.717000 0.000000 1
351+ 18.598762 2.478000 0.000000 1
352+ 0.715337 1.239000 0.000000 1
353+ 1.418947 0.182803 3.248000 1
354+ 2.837894 0.365607 3.248000 1
355+ 12.289724 16.574164 3.248000 1
356+ 13.708671 16.756967 3.248000 1
357+ 14.576457 15.619525 3.248000 1
358+ 15.995404 15.802328 3.248000 1
359+ 16.863190 14.664885 3.248000 1
360+ 18.282137 14.847689 3.248000 1
361+ 19.149923 13.710246 3.248000 1
362+ 20.568870 13.893049 3.248000 1
363+ 21.436656 12.755607 3.248000 1
364+ 22.855603 12.938410 3.248000 1
365+ 23.723389 11.800967 3.248000 1
366+ 5.828237 10.744770 3.248000 1
367+ 6.696023 9.607328 3.248000 1
368+ 8.114970 9.790131 3.248000 1
369+ 8.982756 8.652689 3.248000 1
370+ 10.401703 8.835492 3.248000 1
371+ 11.269489 7.698049 3.248000 1
372+ 12.688436 7.880852 3.248000 1
373+ 13.556222 6.743410 3.248000 1
374+ 14.975169 6.926213 3.248000 1
375+ 15.842955 5.788770 3.248000 1
376+ 17.261902 5.971574 3.248000 1
377+ 18.129688 4.834131 3.248000 1
378+ 19.548635 5.016934 3.248000 1
379+ 20.416421 3.879492 3.248000 1
380+ 2.521270 2.823295 3.248000 1
381+ 3.389056 1.685852 3.248000 1
382+ 4.808003 1.868656 3.248000 1
383+ 5.675789 0.731213 3.248000 1
384+ 7.094736 0.914016 3.248000 1
385+ 16.546565 17.122574 3.248000 1
386+ 17.965512 17.305377 3.248000 1
387+ 18.833298 16.167934 3.248000 1
388+ 20.252245 16.350738 3.248000 1
389+ 21.120031 15.213295 3.248000 1
390+ 22.538978 15.396098 3.248000 1
391+ 23.406764 14.258656 3.248000 1
392+ 24.825711 14.441459 3.248000 1
393+ 6.379399 12.065016 3.248000 1
394+ 7.798346 12.247820 3.248000 1
395+ 8.666132 11.110377 3.248000 1
396+ 10.085079 11.293180 3.248000 1
397+ 10.952865 10.155738 3.248000 1
398+ 12.371812 10.338541 3.248000 1
399+ 13.239598 9.201098 3.248000 1
400+ 14.658545 9.383902 3.248000 1
401+ 15.526331 8.246459 3.248000 1
402+ 16.945278 8.429262 3.248000 1
403+ 17.813064 7.291820 3.248000 1
404+ 19.232011 7.474623 3.248000 1
405+ 20.099797 6.337180 3.248000 1
406+ 21.518744 6.519984 3.248000 1
407+ 3.072431 4.143541 3.248000 1
408+ 4.491378 4.326344 3.248000 1
409+ 5.359164 3.188902 3.248000 1
410+ 6.778111 3.371705 3.248000 1
411+ 7.645897 2.234262 3.248000 1
412+ 9.064844 2.417066 3.248000 1
413+ 9.932630 1.279623 3.248000 1
414+ 11.351577 1.462426 3.248000 1
415+ 20.803407 17.670984 3.248000 1
416+ 22.222354 17.853787 3.248000 1
417+ 23.090140 16.716344 3.248000 1
418+ 24.509087 16.899148 3.248000 1
419+ 25.376873 15.761705 3.248000 1
420+ 7.481721 14.705508 3.248000 1
421+ 8.349507 13.568066 3.248000 1
422+ 9.768454 13.750869 3.248000 1
423+ 10.636240 12.613426 3.248000 1
424+ 12.055187 12.796230 3.248000 1
425+ 12.922973 11.658787 3.248000 1
426+ 14.341920 11.841590 3.248000 1
427+ 15.209706 10.704148 3.248000 1
428+ 16.628653 10.886951 3.248000 1
429+ 17.496439 9.749508 3.248000 1
430+ 18.915386 9.932311 3.248000 1
431+ 19.783172 8.794869 3.248000 1
432+ 21.202119 8.977672 3.248000 1
433+ 22.069905 7.840230 3.248000 1
434+ 4.174754 6.784033 3.248000 1
435+ 5.042539 5.646590 3.248000 1
436+ 6.461487 5.829393 3.248000 1
437+ 7.329272 4.691951 3.248000 1
438+ 8.748220 4.874754 3.248000 1
439+ 9.616005 3.737311 3.248000 1
440+ 11.034952 3.920115 3.248000 1
441+ 11.902738 2.782672 3.248000 1
442+ 13.321685 2.965475 3.248000 1
443+ 14.189471 1.828033 3.248000 1
444+ 15.608418 2.010836 3.248000 1
445+ 25.060248 18.219393 3.248000 1
446+ 26.479195 18.402197 3.248000 1
447+ 8.032883 16.025754 3.248000 1
448+ 9.451830 16.208557 3.248000 1
449+ 10.319616 15.071115 3.248000 1
450+ 11.738563 15.253918 3.248000 1
451+ 12.606348 14.116475 3.248000 1
452+ 14.025296 14.299279 3.248000 1
453+ 14.893081 13.161836 3.248000 1
454+ 16.312029 13.344639 3.248000 1
455+ 17.179814 12.207197 3.248000 1
456+ 18.598762 12.390000 3.248000 1
457+ 19.466547 11.252557 3.248000 1
458+ 20.885495 11.435361 3.248000 1
459+ 21.753280 10.297918 3.248000 1
460+ 23.172228 10.480721 3.248000 1
461+ 4.725915 8.104279 3.248000 1
462+ 6.144862 8.287082 3.248000 1
463+ 7.012648 7.149639 3.248000 1
464+ 8.431595 7.332443 3.248000 1
465+ 9.299381 6.195000 3.248000 1
466+ 10.718328 6.377803 3.248000 1
467+ 11.586114 5.240361 3.248000 1
468+ 13.005061 5.423164 3.248000 1
469+ 13.872847 4.285721 3.248000 1
470+ 15.291794 4.468525 3.248000 1
471+ 16.159580 3.331082 3.248000 1
472+ 17.578527 3.513885 3.248000 1
473+ 18.446313 2.376443 3.248000 1
474+ 19.865260 2.559246 3.248000 1
475+%endblock AtomicCoordinatesAndAtomicSpecies
476
477=== added file 'Util/Unfolding/Examples/C/Graphene/Bilayer/meshgen.dat'
478--- Util/Unfolding/Examples/C/Graphene/Bilayer/meshgen.dat 1970-01-01 00:00:00 +0000
479+++ Util/Unfolding/Examples/C/Graphene/Bilayer/meshgen.dat 2019-09-12 09:33:19 +0000
480@@ -0,0 +1,4 @@
481+ 301 -6.187431 -2.187431
482+ 60 -0.04 0.10
483+ 44 -0.49 -0.59
484+
485
486=== added directory 'Util/Unfolding/Examples/C/Graphene/Divacancy'
487=== added directory 'Util/Unfolding/Examples/C/Graphene/Divacancy/7X7'
488=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.STRUCT_IN'
489--- Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.STRUCT_IN 1970-01-01 00:00:00 +0000
490+++ Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.STRUCT_IN 2019-09-12 09:33:19 +0000
491@@ -0,0 +1,100 @@
492+ 17.398450429 0.000000000 0.000000000
493+ 8.699225143 15.067500000 0.000000000
494+ 0.000000000 0.000000000 28.700000000
495+ 96
496+ 1 6 0.003531601 -0.003474544 0.500000068
497+ 1 6 0.051257991 0.044385577 0.500000054
498+ 1 6 0.003201398 0.139638278 0.500000015
499+ 1 6 0.048601348 0.189719699 0.499999952
500+ 1 6 0.000252817 0.285054829 0.499999906
501+ 1 6 0.045521941 0.335322021 0.499999880
502+ 1 6 -0.003802934 0.430711154 0.499999893
503+ 1 6 0.044315088 0.478151545 0.499999880
504+ 1 6 -0.005847446 0.573172185 0.499999910
505+ 1 6 0.045338773 0.619277112 0.499999892
506+ 1 6 -0.002009089 0.713903252 0.499999926
507+ 1 6 0.049482387 0.760053322 0.499999953
508+ 1 6 0.002160267 0.854677573 0.499999998
509+ 1 6 0.051632471 0.901516929 0.500000047
510+ 1 6 0.146725201 -0.002095354 0.500000049
511+ 1 6 0.191984666 0.048171774 0.500000001
512+ 1 6 0.143604832 0.143538832 0.499999943
513+ 1 6 0.189051025 0.193584594 0.499999879
514+ 1 6 0.141003640 0.288834355 0.499999844
515+ 1 6 0.188794922 0.336669442 0.499999836
516+ 1 6 0.140831903 0.431670940 0.499999838
517+ 1 6 0.190303073 0.478511789 0.499999826
518+ 1 6 0.142983922 0.573119390 0.499999846
519+ 1 6 0.194431358 0.619277594 0.499999891
520+ 1 6 0.147122707 0.713892178 0.499999950
521+ 1 6 0.198286780 0.759990250 0.500000011
522+ 1 6 0.148152088 0.855033210 0.500000049
523+ 1 6 0.196180772 0.902512270 0.500000066
524+ 1 6 0.286862517 0.002313558 0.500000008
525+ 1 6 0.331100047 0.052989849 0.499999964
526+ 1 6 0.283861647 0.147467007 0.499999902
527+ 1 6 0.331988710 0.194920665 0.499999877
528+ 1 6 0.284668475 0.289590582 0.499999838
529+ 1 6 0.333502542 0.336669935 0.499999847
530+ 1 6 0.286601138 0.431665127 0.499999848
531+ 1 6 0.336618313 0.478144050 0.499999865
532+ 1 6 0.291695091 0.573178232 0.499999893
533+ 1 6 0.344045535 0.619206361 0.499999945
534+ 1 6 0.296672019 0.713955525 0.500000008
535+ 1 6 0.348194202 0.760538064 0.500000049
536+ 1 6 0.293082832 0.855821890 0.500000067
537+ 1 6 0.336604953 0.906673734 0.500000055
538+ 1 6 0.425684716 0.007539893 0.499999991
539+ 1 6 0.474822476 0.052986234 0.499999960
540+ 1 6 0.427547102 0.147464834 0.499999915
541+ 1 6 0.476272147 0.193568957 0.499999933
542+ 1 6 0.429095813 0.288835564 0.499999906
543+ 1 6 0.478090494 0.335308863 0.499999922
544+ 1 6 0.432122967 0.430681499 0.499999896
545+ 1 6 0.482326942 0.477358836 0.499999919
546+ 1 6 0.442166767 0.572638574 0.499999925
547+ 1 6 0.498677964 0.617718919 0.499999973
548+ 1 6 0.449785766 0.715480414 0.500000037
549+ 1 6 0.494385334 0.769319880 0.500000058
550+ 1 6 0.431366548 0.862184225 0.500000063
551+ 1 6 0.471905005 0.915079842 0.500000041
552+ 1 6 0.569724146 0.002325491 0.499999985
553+ 1 6 0.618718836 0.048158207 0.499999994
554+ 1 6 0.571744689 0.143496415 0.499999982
555+ 1 6 0.620554830 0.189682491 0.500000008
556+ 1 6 0.573596488 0.285040705 0.499999970
557+ 1 6 0.622610280 0.330874632 0.499999954
558+ 1 6 0.576692016 0.426531120 0.499999931
559+ 1 6 0.626969661 0.471000058 0.499999891
560+ 1 6 0.597108451 0.563891672 0.499999929
561+ 1 6 0.595139263 0.769332786 0.500000039
562+ 1 6 0.565342318 0.862201778 0.500000035
563+ 1 6 0.615627186 0.906694788 0.500000004
564+ 1 6 0.714232512 -0.002128076 0.500000008
565+ 1 6 0.763222407 0.044338762 0.500000045
566+ 1 6 0.716032230 0.139584441 0.500000050
567+ 1 6 0.764758326 0.185679656 0.500000036
568+ 1 6 0.717523253 0.280160459 0.499999965
569+ 1 6 0.766650729 0.325621425 0.499999895
570+ 1 6 0.720399187 0.418097753 0.499999831
571+ 1 6 0.760957343 0.470987350 0.499999863
572+ 1 6 0.697858639 0.563874091 0.499999914
573+ 1 6 0.742445588 0.617713218 0.499999969
574+ 1 6 0.693559893 0.715488264 0.500000012
575+ 1 6 0.750089458 0.760566418 0.499999992
576+ 1 6 0.710006707 0.855847543 0.499999988
577+ 1 6 0.760242222 0.902491704 0.499999979
578+ 1 6 0.858830468 -0.003496108 0.500000042
579+ 1 6 0.907639752 0.043572359 0.500000073
580+ 1 6 0.860308868 0.138230988 0.500000055
581+ 1 6 0.908388783 0.185715184 0.500000012
582+ 1 6 0.861217935 0.280169778 0.499999925
583+ 1 6 0.905435052 0.330865176 0.499999895
584+ 1 6 0.855733945 0.426509237 0.499999873
585+ 1 6 0.899302027 0.477355080 0.499999913
586+ 1 6 0.844073207 0.572640025 0.499999954
587+ 1 6 0.895660074 0.619209241 0.499999953
588+ 1 6 0.848247610 0.713983517 0.499999963
589+ 1 6 0.900659482 0.760002767 0.499999946
590+ 1 6 0.855769487 0.855042236 0.499999965
591+ 1 6 0.905847350 0.901478603 0.499999993
592
593=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.fdf'
594--- Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.fdf 1970-01-01 00:00:00 +0000
595+++ Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/divacancy-7X7.fdf 2019-09-12 09:33:19 +0000
596@@ -0,0 +1,173 @@
597+
598+SystemName divacancy in graphene
599+SystemLabel divacancy-7X7 # Short name for naming files
600+
601+NumberOfSpecies 2
602+NumberOfAtoms 96
603+%block ChemicalSpeciesLabel
604+ 1 6 C
605+ 2 -6 GC
606+%endblock ChemicalSpeciesLabel
607+
608+LatticeConstant 1.435 Ang
609+%block LatticeVectors
610+ 12.1243557 0.00 0.00
611+ 6.0621778 10.50 0.00
612+ 0.0000000 0.00 20.00
613+%endblock LatticeVectors
614+
615+XC.functional GGA
616+XC.authors revPBE
617+PAO.BasisSize DZP
618+MeshCutoff 250. Ry
619+
620+%block k_grid_Monkhorst_Pack
621+ 30 0 0 0.0
622+ 30 -30 0 0.0
623+ 0 0 1 0.0
624+%endblock k_grid_Monkhorst_Pack
625+Diag.ParallelOverK .true.
626+
627+ # --- UNFOLD ---
628+SaveHS .true.
629+RefoldingGcutoff 15.0 Ry
630+
631+%include meshgen.fdf # Contains %block UnfoldedBandLines. See Src/meshgen.c
632+
633+%block RefoldingLatticeVectors
634+ 1.732050808 0.0 0.0
635+ 0.866025404 1.5 0.0
636+ 0.0 0.0 20.0
637+%endblock RefoldingLatticeVectors
638+
639+
640+PAO.Filter
641+VNA.Filter
642+FilterCutoff 250 Ry
643+
644+SpinPolarized .false.
645+
646+# --- SCF options
647+MaxSCFIterations 20 # Maximum number of SCF iter
648+DM.MixingWeight 0.05 # New DM amount for next SCF cycle
649+DM.Tolerance 2.5d-5 # Tolerance in maximum difference
650+ # between input and output DM
651+DM.UseSaveDM .true. # to use continuation files
652+DM.NumberPulay 3
653+
654+SCFMustConverge .false.
655+SolutionMethod diagon # OrderN or Diagon
656+
657+OccupationFunction MP
658+OccupationMPOrder 2
659+ElectronicTemperature 100. meV # Temp. for Fermi smearing
660+
661+# --- MD options
662+MD.TypeOfRun cg # Type of dynamics:
663+MD.NumCGsteps 20 # Number of CG steps for coordinate optimization
664+MD.MaxCGDispl 0.04 Ang # Maximum atomic displacement in one CG step (Bohr)
665+MD.MaxForceTol 0.02 eV/Ang # Tolerance in the maximum atomic force (Ry/Bohr)
666+MD.UseStructFile .true. # Uses .STRUCT_IN file
667+
668+# Atomic coordinates
669+AtomicCoordinatesFormat ScaledCartesian
670+%block AtomicCoordinatesAndAtomicSpecies
671+
672+ -0.00421303 0.02154761 10.00000050 1 1 C
673+ 0.86089996 0.52683713 10.00000102 1 2 C
674+ 0.85855228 1.52646837 10.00000021 1 3 C
675+ 1.72690388 2.02682620 9.99999887 1 4 C
676+ 1.72478833 3.02592623 9.99999688 1 5 C
677+ 2.59839346 3.52270413 9.99999636 1 6 C
678+ 2.59854717 4.52040774 9.99999654 1 7 C
679+ 3.47811353 5.01404493 9.99999651 1 8 C
680+ 3.48226579 6.01119589 9.99999845 1 9 C
681+ 4.36829423 6.50130688 9.99999795 1 10 C
682+ 4.36840175 7.49838233 9.99999960 1 11 C
683+ 5.25278665 7.98850731 9.99999991 1 12 C
684+ 5.23633269 8.98606019 10.00000150 1 13 C
685+ 6.10916140 9.48171630 10.00000271 1 14 C
686+ 1.72972973 0.03214410 10.00000054 1 21 C
687+ 2.59809361 0.53152007 10.00000037 1 22 C
688+ 2.59807191 1.52919151 9.99999929 1 23 C
689+ 3.46917696 2.02699528 9.99999808 1 24 C
690+ 3.47186259 3.02598014 9.99999653 1 25 C
691+ 4.34679401 3.52126305 9.99999611 1 26 C
692+ 4.35475382 4.52041666 9.99999539 1 27 C
693+ 5.23618233 5.01397803 9.99999544 1 28 C
694+ 5.25279877 6.01135642 9.99999591 1 29 C
695+ 6.14579206 6.50140797 9.99999651 1 30 C
696+ 6.14560118 7.49807425 9.99999884 1 31 C
697+ 7.03424383 7.98683868 10.00000050 1 32 C
698+ 6.99318597 8.98758934 10.00000238 1 33 C
699+ 7.85544351 9.48811886 10.00000109 1 34 C
700+ 3.46645886 0.03215510 9.99999984 1 41 C
701+ 4.33546033 0.52675144 9.99999894 1 42 C
702+ 4.33743972 1.52651439 9.99999830 1 43 C
703+ 5.20864848 2.02182789 9.99999753 1 44 C
704+ 5.21599971 3.02159669 9.99999667 1 45 C
705+ 6.09159337 3.51772909 9.99999692 1 46 C
706+ 6.10887184 4.51797330 9.99999603 1 47 C
707+ 6.99306435 5.01207214 9.99999684 1 48 C
708+ 7.03452648 6.01285344 9.99999660 1 49 C
709+ 7.94090561 6.50065622 9.99999872 1 50 C
710+ 7.94098138 7.49897614 10.00000042 1 51 C
711+ 8.84053570 7.98992417 10.00000203 1 52 C
712+ 8.74271947 8.99233839 10.00000140 1 53 C
713+ 9.57444730 9.52583366 9.99999983 1 54 C
714+ 5.20063688 0.02143841 9.99999863 1 61 C
715+ 6.06958412 0.51408829 9.99999872 1 62 C
716+ 6.07320033 1.51498541 9.99999815 1 63 C
717+ 6.94294453 2.00884604 9.99999851 1 64 C
718+ 6.95446790 3.01213202 9.99999829 1 65 C
719+ 7.82781223 3.50687253 9.99999912 1 66 C
720+ 7.85527278 4.51120912 9.99999841 1 67 C
721+ 8.74242790 5.00726839 9.99999873 1 68 C
722+ 8.84010557 6.00976520 9.99999910 1 69 C
723+ 9.79517375 6.48526099 10.00000102 1 70 C
724+ 9.79548794 7.51407034 10.00000235 1 71 C
725+ 10.65814214 8.08106319 10.00000203 1 72 C
726+ 10.44985510 9.05677427 10.00000118 1 73 C
727+ 11.25850880 9.61215100 10.00000202 1 74 C
728+ 6.92943517 0.00061564 9.99999958 1 81 C
729+ 7.79682738 0.49226732 10.00000001 1 82 C
730+ 7.80048738 1.49319148 9.99999981 1 83 C
731+ 8.66924325 1.98328354 10.00000114 1 84 C
732+ 8.67909554 2.98418973 10.00000019 1 85 C
733+ 9.54810619 3.46987454 9.99999842 1 86 C
734+ 9.57413246 4.47387901 9.99999742 1 87 C
735+ 10.44966766 4.94294675 9.99999615 1 88 C
736+ 10.65786814 5.91853160 9.99999883 1 89 C
737+ 11.85856828 8.08122880 10.00000120 1 90 C
738+ 12.06701354 9.05687070 10.00000185 1 91 C
739+ 12.94234409 9.52596821 10.00000200 1 92 C
740+ 8.65665935 -0.02216853 10.00000078 1 99 C
741+ 9.52428252 0.46751152 10.00000212 1 100 C
742+ 9.52418963 1.46471730 10.00000303 1 101 C
743+ 10.39042888 1.95056923 10.00000241 1 102 C
744+ 10.38986123 2.94093355 9.99999847 1 103 C
745+ 11.25817552 3.41756390 9.99999478 1 104 C
746+ 11.25832860 4.38765616 9.99999396 1 105 C
747+ 12.06685776 4.94299702 9.99999676 1 106 C
748+ 11.85862456 5.91861108 9.99999975 1 107 C
749+ 12.72133941 6.48545644 10.00000107 1 108 C
750+ 12.72121875 7.51425605 10.00000014 1 109 C
751+ 13.67624348 7.98993110 9.99999814 1 110 C
752+ 13.77389834 8.99237518 9.99999862 1 111 C
753+ 14.66122561 9.48807205 9.99999734 1 112 C
754+ 10.38955121 -0.03450602 10.00000119 1 119 C
755+ 11.25844474 0.46095074 10.00000318 1 120 C
756+ 11.25842609 1.45434598 10.00000348 1 121 C
757+ 12.12617077 1.95066029 10.00000194 1 122 C
758+ 12.12649167 2.94111316 9.99999756 1 123 C
759+ 12.96822074 3.47019776 9.99999752 1 124 C
760+ 12.94230149 4.47411786 9.99999806 1 125 C
761+ 13.77411768 5.00766760 10.00000162 1 126 C
762+ 13.67641169 6.01006185 10.00000258 1 127 C
763+ 14.57595779 6.50099406 10.00000251 1 128 C
764+ 14.57596490 7.49923453 9.99999877 1 129 C
765+ 15.48263499 7.98738708 9.99999699 1 130 C
766+ 15.52385437 8.98801051 9.99999528 1 131 C
767+ 16.40816221 9.48191110 9.99999520 1 132 C
768+#
769+ %endblock AtomicCoordinatesAndAtomicSpecies
770
771=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/meshgen.dat'
772--- Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/meshgen.dat 1970-01-01 00:00:00 +0000
773+++ Util/Unfolding/Examples/C/Graphene/Divacancy/7X7/meshgen.dat 2019-09-12 09:33:19 +0000
774@@ -0,0 +1,4 @@
775+ 100 -5.31 -2.3
776+ 40 0.66 0.88
777+ 40 -0.11 0.11
778+
779
780=== added directory 'Util/Unfolding/Examples/C/Graphene/Divacancy/8X8'
781=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.STRUCT_IN'
782--- Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.STRUCT_IN 1970-01-01 00:00:00 +0000
783+++ Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.STRUCT_IN 2019-09-12 09:33:19 +0000
784@@ -0,0 +1,130 @@
785+ 19.883943327 0.000000000 0.000000000
786+ 9.941971592 17.220000000 0.000000000
787+ 0.000000000 0.000000000 28.700000000
788+ 126
789+ 1 6 0.001777507 -0.001669156 0.500000084
790+ 1 6 0.041883886 0.041777885 0.500000023
791+ 1 6 -0.000046373 0.125201780 0.500000020
792+ 1 6 0.040121917 0.168606270 0.499999955
793+ 1 6 -0.002121747 0.252051211 0.499999936
794+ 1 6 0.039435165 0.294071227 0.499999890
795+ 1 6 -0.002962075 0.377281333 0.499999939
796+ 1 6 0.039953986 0.418334258 0.499999897
797+ 1 6 -0.002226676 0.501283724 0.499999949
798+ 1 6 0.041994141 0.541812593 0.499999911
799+ 1 6 0.000464710 0.624742187 0.499999942
800+ 1 6 0.044627386 0.665321924 0.499999974
801+ 1 6 0.002383742 0.748301217 0.500000006
802+ 1 6 0.045125468 0.789491060 0.500000053
803+ 1 6 0.002632147 0.872738339 0.500000065
804+ 1 6 0.044078357 0.914866982 0.500000056
805+ 1 6 0.124961320 0.001181494 0.499999957
806+ 1 6 0.164887555 0.044725054 0.499999927
807+ 1 6 0.123312328 0.127869159 0.499999919
808+ 1 6 0.164941468 0.169850742 0.499999877
809+ 1 6 0.123287665 0.252956564 0.499999841
810+ 1 6 0.165726611 0.294311342 0.499999799
811+ 1 6 0.124219181 0.377447986 0.499999808
812+ 1 6 0.167552600 0.418341451 0.499999792
813+ 1 6 0.126744397 0.501324828 0.499999845
814+ 1 6 0.171288578 0.541875079 0.499999880
815+ 1 6 0.129763939 0.624778519 0.499999970
816+ 1 6 0.173979478 0.665338558 0.500000035
817+ 1 6 0.129600658 0.748611607 0.500000058
818+ 1 6 0.171256764 0.790284597 0.500000029
819+ 1 6 0.127712775 0.873932801 0.500000003
820+ 1 6 0.167300130 0.917710051 0.499999954
821+ 1 6 0.247791668 0.004268076 0.499999955
822+ 1 6 0.289827915 0.045672826 0.499999955
823+ 1 6 0.248480277 0.128551333 0.499999898
824+ 1 6 0.290824114 0.169758382 0.499999882
825+ 1 6 0.249493962 0.252909911 0.499999822
826+ 1 6 0.292245792 0.294008950 0.499999836
827+ 1 6 0.251507613 0.377258383 0.499999803
828+ 1 6 0.295057550 0.418155346 0.499999835
829+ 1 6 0.256094775 0.501407765 0.499999876
830+ 1 6 0.301566286 0.541842136 0.499999961
831+ 1 6 0.259943233 0.624924796 0.500000035
832+ 1 6 0.304642657 0.665774881 0.500000049
833+ 1 6 0.255964080 0.749269690 0.500000026
834+ 1 6 0.293870074 0.793777049 0.500000006
835+ 1 6 0.250257397 0.877463449 0.499999967
836+ 1 6 0.288982802 0.921680607 0.499999990
837+ 1 6 0.373307982 0.004083591 0.500000022
838+ 1 6 0.415879573 0.044396435 0.500000003
839+ 1 6 0.374419881 0.127621855 0.499999950
840+ 1 6 0.416895411 0.168334055 0.499999947
841+ 1 6 0.375817127 0.251829314 0.499999906
842+ 1 6 0.418458018 0.292795889 0.499999935
843+ 1 6 0.378397911 0.376450863 0.499999902
844+ 1 6 0.422045021 0.417500649 0.499999919
845+ 1 6 0.387133273 0.501006051 0.499999951
846+ 1 6 0.436447646 0.540537190 0.499999985
847+ 1 6 0.393521964 0.626200637 0.500000041
848+ 1 6 0.432229394 0.673387947 0.500000054
849+ 1 6 0.376736304 0.754698110 0.500000050
850+ 1 6 0.412098815 0.800913670 0.500000095
851+ 1 6 0.371631958 0.881835856 0.500000071
852+ 1 6 0.414631894 0.921435006 0.500000089
853+ 1 6 0.499320627 0.000700346 0.500000020
854+ 1 6 0.541803083 0.041293011 0.500000017
855+ 1 6 0.500412955 0.124782467 0.500000008
856+ 1 6 0.542894933 0.165393828 0.500000040
857+ 1 6 0.501857612 0.248929928 0.499999987
858+ 1 6 0.544548890 0.289213304 0.499999933
859+ 1 6 0.504481824 0.372948410 0.499999896
860+ 1 6 0.548314984 0.411959006 0.499999861
861+ 1 6 0.522503956 0.493283337 0.499999925
862+ 1 6 0.519497029 0.673253063 0.500000066
863+ 1 6 0.493721987 0.754518686 0.500000107
864+ 1 6 0.537663328 0.793384633 0.500000079
865+ 1 6 0.497606232 0.877044920 0.500000094
866+ 1 6 0.540378666 0.917216825 0.500000036
867+ 1 6 0.625356240 -0.002160600 0.500000026
868+ 1 6 0.667777883 0.038639037 0.500000088
869+ 1 6 0.626354094 0.121838717 0.500000092
870+ 1 6 0.668768770 0.162346450 0.500000065
871+ 1 6 0.627508823 0.244946855 0.499999944
872+ 1 6 0.670358419 0.284733079 0.499999865
873+ 1 6 0.629949511 0.365627171 0.499999808
874+ 1 6 0.665248891 0.411917412 0.499999875
875+ 1 6 0.609715852 0.493194111 0.499999951
876+ 1 6 0.648439212 0.540435297 0.500000036
877+ 1 6 0.605525573 0.626052069 0.500000034
878+ 1 6 0.654976760 0.665453829 0.499999989
879+ 1 6 0.620113333 0.748855582 0.499999978
880+ 1 6 0.663885826 0.789831719 0.499999903
881+ 1 6 0.623769540 0.873423643 0.499999952
882+ 1 6 0.666477717 0.914362084 0.499999945
883+ 1 6 0.751306262 -0.003220765 0.500000096
884+ 1 6 0.793525403 0.038165703 0.500000155
885+ 1 6 0.752161250 0.121018676 0.500000123
886+ 1 6 0.794136916 0.162533663 0.500000069
887+ 1 6 0.752941157 0.245128169 0.499999937
888+ 1 6 0.791630593 0.289412237 0.499999934
889+ 1 6 0.748052377 0.373058079 0.499999925
890+ 1 6 0.785982193 0.417558210 0.500000030
891+ 1 6 0.737398918 0.500954975 0.500000074
892+ 1 6 0.782231197 0.541711516 0.500000079
893+ 1 6 0.740644814 0.624740720 0.499999993
894+ 1 6 0.786275902 0.665101312 0.499999920
895+ 1 6 0.747290653 0.748332152 0.499999848
896+ 1 6 0.790863900 0.789218037 0.499999847
897+ 1 6 0.750044613 0.872442270 0.499999903
898+ 1 6 0.792681011 0.913659467 0.499999992
899+ 1 6 0.877038830 -0.003001351 0.500000140
900+ 1 6 0.918610355 0.039039988 0.500000152
901+ 1 6 0.876982304 0.122219063 0.500000119
902+ 1 6 0.916890726 0.165795393 0.500000047
903+ 1 6 0.874572980 0.249250023 0.499999992
904+ 1 6 0.914230513 0.292996517 0.499999976
905+ 1 6 0.870731528 0.376569557 0.500000030
906+ 1 6 0.912550143 0.418135545 0.500000040
907+ 1 6 0.868239250 0.501340623 0.500000075
908+ 1 6 0.912620857 0.541814010 0.500000018
909+ 1 6 0.871124283 0.624687733 0.499999957
910+ 1 6 0.915716627 0.665241080 0.499999925
911+ 1 6 0.874864158 0.748207340 0.499999892
912+ 1 6 0.918100300 0.789211887 0.499999954
913+ 1 6 0.876481412 0.872353973 0.499999996
914+ 1 6 0.918760669 0.913857524 0.500000071
915
916=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.fdf'
917--- Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.fdf 1970-01-01 00:00:00 +0000
918+++ Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/divacancy-8X8.fdf 2019-09-12 09:33:19 +0000
919@@ -0,0 +1,197 @@
920+
921+SystemName divacancy in graphene
922+SystemLabel divacancy-8X8 # Short name for naming files
923+
924+NumberOfSpecies 2
925+NumberOfAtoms 126
926+%block ChemicalSpeciesLabel
927+ 1 6 C
928+ 2 -6 GC
929+%endblock ChemicalSpeciesLabel
930+
931+LatticeConstant 1.435 Ang
932+%block LatticeVectors
933+ 13.8564065 0.00 0.00
934+ 6.9282032 12.00 0.00
935+ 0.0000000 0.00 20.00
936+%endblock LatticeVectors
937+
938+%block k_grid_Monkhorst_Pack
939+ 30 0 0 0.0
940+ 30 -30 0 0.0
941+ 0 0 1 0.0
942+%endblock k_grid_Monkhorst_Pack
943+Diag.ParallelOverK .true.
944+
945+ # --- UNFOLD ---
946+SaveHS .true.
947+RefoldingGcutoff 15.0 Ry
948+
949+%include meshgen.fdf # Contains %block UnfoldedBandLines. See Src/meshgen.c
950+
951+%block RefoldingLatticeVectors
952+ 1.732050808 0.00 0.00
953+ 0.866025404 1.50 0.00
954+ 0.00 0.00 20.00
955+%endblock RefoldingLatticeVectors
956+
957+XC.functional GGA # Exchange-correlation functional
958+XC.authors revPBE
959+PAO.BasisSize DZP
960+
961+SpinPolarized .false. # Logical parameters are: yes or no
962+MeshCutoff 250. Ry # Mesh cutoff. real space mesh
963+
964+ # SCF options
965+MaxSCFIterations 25 #20 # Maximum number of SCF iter
966+DM.MixingWeight 0.05 # New DM amount for next SCF cycle
967+DM.Tolerance 0.005 #2.5d-5 # Tolerance in max diff between in and out DM
968+DM.UseSaveDM .true. # to use continuation files
969+DM.NumberPulay 3
970+
971+SCFMustConverge .false.
972+SolutionMethod diagon # OrderN or Diagon
973+
974+OccupationFunction MP
975+OccupationMPOrder 2
976+ElectronicTemperature 100. meV # Temp. for Fermi smearing
977+
978+ # MD options
979+MD.TypeOfRun cg # Type of dynamics:
980+MD.NumCGsteps 25 #100 # Number of CG steps for coord optimization
981+MD.MaxCGDispl 0.04 Ang # Max atomic displacement in one CG step (Bohr)
982+MD.MaxForceTol 0.05 eV/Ang # Tolerance in the maximum atomic force (Ry/Bohr)
983+MD.UseStructFile .true. # Uses .STRUCT_IN file
984+
985+# Atomic coordinates
986+AtomicCoordinatesFormat ScaledCartesian
987+%block AtomicCoordinatesAndAtomicSpecies
988+ 0.00000000 0.00000000 10.00000000 1 1 C
989+ 0.86600000 0.50000000 10.00000000 1 2 C
990+ 0.86600000 1.50000000 10.00000000 1 3 C
991+ 1.73210000 2.00000000 10.00000000 1 4 C
992+ 1.73210000 3.00000000 10.00000000 1 5 C
993+ 2.59810000 3.50000000 10.00000000 1 6 C
994+ 2.59810000 4.50000000 10.00000000 1 7 C
995+ 3.46410000 5.00000000 10.00000000 1 8 C
996+ 3.46410000 6.00000000 10.00000000 1 9 C
997+ 4.33010000 6.50000000 10.00000000 1 10 C
998+ 4.33010000 7.50000000 10.00000000 1 11 C
999+ 5.19620000 8.00000000 10.00000000 1 12 C
1000+ 5.19620000 9.00000000 10.00000000 1 13 C
1001+ 6.06220000 9.50000000 10.00000000 1 14 C
1002+ 6.06220000 10.50000000 10.00000000 1 15 C
1003+ 6.92820000 11.00000000 10.00000000 1 16 C
1004+ 1.73210000 0.00000000 10.00000000 1 21 C
1005+ 2.59810000 0.50000000 10.00000000 1 22 C
1006+ 2.59810000 1.50000000 10.00000000 1 23 C
1007+ 3.46410000 2.00000000 10.00000000 1 24 C
1008+ 3.46410000 3.00000000 10.00000000 1 25 C
1009+ 4.33010000 3.50000000 10.00000000 1 26 C
1010+ 4.33010000 4.50000000 10.00000000 1 27 C
1011+ 5.19620000 5.00000000 10.00000000 1 28 C
1012+ 5.19620000 6.00000000 10.00000000 1 29 C
1013+ 6.06220000 6.50000000 10.00000000 1 30 C
1014+ 6.06220000 7.50000000 10.00000000 1 31 C
1015+ 6.92820000 8.00000000 10.00000000 1 32 C
1016+ 6.92820000 9.00000000 10.00000000 1 33 C
1017+ 7.79420000 9.50000000 10.00000000 1 34 C
1018+ 7.79420000 10.50000000 10.00000000 1 35 C
1019+ 8.66030000 11.00000000 10.00000000 1 36 C
1020+ 3.46410000 0.00000000 10.00000000 1 41 C
1021+ 4.33010000 0.50000000 10.00000000 1 42 C
1022+ 4.33010000 1.50000000 10.00000000 1 43 C
1023+ 5.19620000 2.00000000 10.00000000 1 44 C
1024+ 5.19620000 3.00000000 10.00000000 1 45 C
1025+ 6.06220000 3.50000000 10.00000000 1 46 C
1026+ 6.06220000 4.50000000 10.00000000 1 47 C
1027+ 6.92820000 5.00000000 10.00000000 1 48 C
1028+ 6.92820000 6.00000000 10.00000000 1 49 C
1029+ 7.79420000 6.50000000 10.00000000 1 50 C
1030+ 7.79420000 7.50000000 10.00000000 1 51 C
1031+ 8.66030000 8.00000000 10.00000000 1 52 C
1032+ 8.66030000 9.00000000 10.00000000 1 53 C
1033+ 9.52630000 9.50000000 10.00000000 1 54 C
1034+ 9.52630000 10.50000000 10.00000000 1 55 C
1035+ 10.39230000 11.00000000 10.00000000 1 56 C
1036+ 5.19620000 0.00000000 10.00000000 1 61 C
1037+ 6.06220000 0.50000000 10.00000000 1 62 C
1038+ 6.06220000 1.50000000 10.00000000 1 63 C
1039+ 6.92820000 2.00000000 10.00000000 1 64 C
1040+ 6.92820000 3.00000000 10.00000000 1 65 C
1041+ 7.79420000 3.50000000 10.00000000 1 66 C
1042+ 7.79420000 4.50000000 10.00000000 1 67 C
1043+ 8.66030000 5.00000000 10.00000000 1 68 C
1044+ 8.66030000 6.00000000 10.00000000 1 69 C
1045+ 9.52630000 6.50000000 10.00000000 1 70 C
1046+ 9.52630000 7.50000000 10.00000000 1 71 C
1047+ 10.39230000 8.00000000 10.00000000 1 72 C
1048+ 10.39230000 9.00000000 10.00000000 1 73 C
1049+ 11.25830000 9.50000000 10.00000000 1 74 C
1050+ 11.25830000 10.50000000 10.00000000 1 75 C
1051+ 12.12440000 11.00000000 10.00000000 1 76 C
1052+ 6.92820000 0.00000000 10.00000000 1 81 C
1053+ 7.79420000 0.50000000 10.00000000 1 82 C
1054+ 7.79420000 1.50000000 10.00000000 1 83 C
1055+ 8.66030000 2.00000000 10.00000000 1 84 C
1056+ 8.66030000 3.00000000 10.00000000 1 85 C
1057+ 9.52630000 3.50000000 10.00000000 1 86 C
1058+ 9.52630000 4.50000000 10.00000000 1 87 C
1059+ 10.39230000 5.00000000 10.00000000 1 88 C
1060+ 10.39230000 6.00000000 10.00000000 1 89 C
1061+# 11.25830000 6.50000000 10.00000000 1 90 C
1062+# 11.25830000 7.50000000 10.00000000 1 91 C
1063+ 12.12440000 8.00000000 10.00000000 1 92 C
1064+ 12.12440000 9.00000000 10.00000000 1 93 C
1065+ 12.99040000 9.50000000 10.00000000 1 94 C
1066+ 12.99040000 10.50000000 10.00000000 1 95 C
1067+ 13.85640000 11.00000000 10.00000000 1 96 C
1068+ 8.66030000 0.00000000 10.00000000 1 101 C
1069+ 9.52630000 0.50000000 10.00000000 1 102 C
1070+ 9.52630000 1.50000000 10.00000000 1 103 C
1071+ 10.39230000 2.00000000 10.00000000 1 104 C
1072+ 10.39230000 3.00000000 10.00000000 1 105 C
1073+ 11.25830000 3.50000000 10.00000000 1 106 C
1074+ 11.25830000 4.50000000 10.00000000 1 107 C
1075+ 12.12440000 5.00000000 10.00000000 1 108 C
1076+ 12.12440000 6.00000000 10.00000000 1 109 C
1077+ 12.99040000 6.50000000 10.00000000 1 110 C
1078+ 12.99040000 7.50000000 10.00000000 1 111 C
1079+ 13.85640000 8.00000000 10.00000000 1 112 C
1080+ 13.85640000 9.00000000 10.00000000 1 113 C
1081+ 14.72240000 9.50000000 10.00000000 1 114 C
1082+ 14.72240000 10.50000000 10.00000000 1 115 C
1083+ 15.58850000 11.00000000 10.00000000 1 116 C
1084+ 10.39230000 0.00000000 10.00000000 1 121 C
1085+ 11.25830000 0.50000000 10.00000000 1 122 C
1086+ 11.25830000 1.50000000 10.00000000 1 123 C
1087+ 12.12440000 2.00000000 10.00000000 1 124 C
1088+ 12.12440000 3.00000000 10.00000000 1 125 C
1089+ 12.99040000 3.50000000 10.00000000 1 126 C
1090+ 12.99040000 4.50000000 10.00000000 1 127 C
1091+ 13.85640000 5.00000000 10.00000000 1 128 C
1092+ 13.85640000 6.00000000 10.00000000 1 129 C
1093+ 14.72240000 6.50000000 10.00000000 1 130 C
1094+ 14.72240000 7.50000000 10.00000000 1 131 C
1095+ 15.58850000 8.00000000 10.00000000 1 132 C
1096+ 15.58850000 9.00000000 10.00000000 1 133 C
1097+ 16.45450000 9.50000000 10.00000000 1 134 C
1098+ 16.45450000 10.50000000 10.00000000 1 135 C
1099+ 17.32050000 11.00000000 10.00000000 1 136 C
1100+ 12.12440000 0.00000000 10.00000000 1 141 C
1101+ 12.99040000 0.50000000 10.00000000 1 142 C
1102+ 12.99040000 1.50000000 10.00000000 1 143 C
1103+ 13.85640000 2.00000000 10.00000000 1 144 C
1104+ 13.85640000 3.00000000 10.00000000 1 145 C
1105+ 14.72240000 3.50000000 10.00000000 1 146 C
1106+ 14.72240000 4.50000000 10.00000000 1 147 C
1107+ 15.58850000 5.00000000 10.00000000 1 148 C
1108+ 15.58850000 6.00000000 10.00000000 1 149 C
1109+ 16.45450000 6.50000000 10.00000000 1 150 C
1110+ 16.45450000 7.50000000 10.00000000 1 151 C
1111+ 17.32050000 8.00000000 10.00000000 1 152 C
1112+ 17.32050000 9.00000000 10.00000000 1 153 C
1113+ 18.18650000 9.50000000 10.00000000 1 154 C
1114+ 18.18650000 10.50000000 10.00000000 1 155 C
1115+ 19.05260000 11.00000000 10.00000000 1 156 C
1116+ %endblock AtomicCoordinatesAndAtomicSpecies
1117
1118=== added file 'Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/meshgen.dat'
1119--- Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/meshgen.dat 1970-01-01 00:00:00 +0000
1120+++ Util/Unfolding/Examples/C/Graphene/Divacancy/8X8/meshgen.dat 2019-09-12 09:33:19 +0000
1121@@ -0,0 +1,4 @@
1122+ 100 -5.24 -2.22
1123+ 40 0.66 0.88
1124+ 40 -0.11 0.11
1125+
1126
1127=== added file 'Util/Unfolding/Examples/README'
1128--- Util/Unfolding/Examples/README 1970-01-01 00:00:00 +0000
1129+++ Util/Unfolding/Examples/README 2019-09-12 09:33:19 +0000
1130@@ -0,0 +1,58 @@
1131+ --- GUIDE OF EXAMPLES ---
1132+
1133+ This folder contains a number of example systems to test the unfolding tool.
1134+ Run SIESTA to generate the .EIG, .HSX and .ion files, then run unfold to obtain
1135+ the fully unfolded or refolded bands.
1136+
1137+ Some Matlab routines are available in Src/ to plot the outputs (notice that examples
1138+ of graphene generate a collection of files to be plotted with 'plotmesh.m').
1139+
1140+ A brief description of the examples can be found below. For further details
1141+ see: https://arxiv.org/abs/1812.03925
1142+
1143+ * Si:
1144+
1145+ FCC bulk: cubic supercell with 8 atoms. The example is trivial, refolding recovers
1146+ the FCC bands. As the result is a density of states, band degeneracies are
1147+ reflected in the plot.
1148+
1149+ vacancy: one atom is removed from the trivial supercell. A comparison with the
1150+ bulk bands reveals changes in the states.
1151+
1152+ amorphous: extreme case of disorder. Full unfolding yields the effect of atomic
1153+ potential in the free e- dispersion relation. Refolding into the FCC
1154+ vectors, a resemblance in the degeneracy distribution appears.
1155+ ( a-Si coordinates ref:
1156+ Igram et at., J. Non-Cryst. Solids 2018, 492, 27-32 )
1157+
1158+ * C:
1159+
1160+ diamond: analogous to Si FCC bulk.
1161+
1162+ graphene(**):
1163+
1164+ 585 divacancy: different supercell sizes yield very different conventional bands,
1165+ whereas refolding into graphene lattice vectors reveals qualitatively
1166+ equivalent band behaviour.
1167+
1168+ rotated graphene bilayer: the fully unfolded bands show the interaction between
1169+ the states of both sublattices, their positions being rotated one
1170+ with respect to the other. In particular, a saddle point emerges
1171+ from the interaction between the Dirac cones.
1172+ Refolding is meaningless, as there are two periodicities in the
1173+ system and neither is prevalent over the other. However, the
1174+ RefoldingLatticeVector is present in the .fdf file as:
1175+ A1*1e-5
1176+ A2*1e-5
1177+ A3
1178+ then A1, A2 << => B1, B2 >>, so, in practice, the refolding vectors
1179+ in the x and y directions will be excluded by the RefoldingGcutoff.
1180+ Vector A3 is unaltered, which means that we refold over the periodic
1181+ images of the bilayer that were artificially introduced to perform
1182+ the DFT calculation. The actual fully unfolded bands will be those
1183+ stored in the .RefoldedBands files.
1184+
1185+
1186+
1187+ (**) To test these examples, compile and run 'meshgen.c' before running unfold.
1188+
1189
1190=== added directory 'Util/Unfolding/Examples/Si'
1191=== added directory 'Util/Unfolding/Examples/Si/Amorphous'
1192=== added directory 'Util/Unfolding/Examples/Si/Amorphous/Si216'
1193=== added file 'Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.coord.fdf'
1194--- Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.coord.fdf 1970-01-01 00:00:00 +0000
1195+++ Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.coord.fdf 2019-09-12 09:33:19 +0000
1196@@ -0,0 +1,218 @@
1197+%block AtomicCoordinatesAndAtomicSpecies
1198+15.588956 6.754473 12.646411 1 Si
1199+3.574065 10.591036 11.247465 1 Si
1200+5.948511 6.177946 12.272045 1 Si
1201+9.197466 7.080198 10.111310 1 Si
1202+0.428452 2.162412 4.503134 1 Si
1203+0.125021 6.441942 0.101075 1 Si
1204+6.232593 6.723453 0.437514 1 Si
1205+0.239362 8.257014 1.455119 1 Si
1206+2.057517 13.286268 0.795680 1 Si
1207+13.223806 8.339178 6.628192 1 Si
1208+5.774796 10.399489 12.131933 1 Si
1209+11.268743 4.378954 10.129402 1 Si
1210+10.887114 12.687332 9.662014 1 Si
1211+4.850501 7.039846 7.171760 1 Si
1212+0.836141 7.277747 7.783790 1 Si
1213+0.492234 0.353605 8.716329 1 Si
1214+4.639431 1.517291 8.196668 1 Si
1215+5.718367 11.028184 3.558979 1 Si
1216+10.960264 10.286392 1.103246 1 Si
1217+12.024508 4.721230 1.623715 1 Si
1218+0.078339 15.408694 12.481285 1 Si
1219+8.223407 1.388930 14.835752 1 Si
1220+4.432014 10.489295 6.976107 1 Si
1221+7.249525 12.758640 4.246118 1 Si
1222+15.165838 7.602823 14.829987 1 Si
1223+2.300901 1.613387 11.547367 1 Si
1224+7.354468 12.958500 6.652052 1 Si
1225+9.151397 6.607083 2.713409 1 Si
1226+15.663368 6.750789 5.583343 1 Si
1227+5.330712 6.853852 2.627945 1 Si
1228+2.679006 6.488012 6.604848 1 Si
1229+7.522149 10.854777 9.289098 1 Si
1230+9.284980 5.050482 4.416305 1 Si
1231+14.405555 8.749013 2.215123 1 Si
1232+10.896860 5.736893 6.006857 1 Si
1233+12.956195 14.981008 14.831348 1 Si
1234+3.500445 3.564754 11.102434 1 Si
1235+1.154953 0.748474 0.959500 1 Si
1236+1.003224 1.120006 13.419032 1 Si
1237+2.081402 5.374562 11.098609 1 Si
1238+6.153343 0.668767 14.040793 1 Si
1239+8.941397 3.151217 0.973984 1 Si
1240+3.128419 14.124622 7.759558 1 Si
1241+14.495336 5.475302 9.008142 1 Si
1242+6.908721 5.988583 7.127572 1 Si
1243+7.824917 12.932060 14.247202 1 Si
1244+1.906536 3.901688 3.942003 1 Si
1245+14.115412 10.761481 10.386171 1 Si
1246+10.879523 0.526527 5.673049 1 Si
1247+0.145974 10.296900 10.574347 1 Si
1248+13.294566 1.649325 8.463991 1 Si
1249+1.325146 13.271758 9.171471 1 Si
1250+4.315386 1.180880 15.481661 1 Si
1251+15.219873 9.112258 5.752547 1 Si
1252+11.431241 6.832704 2.440164 1 Si
1253+10.789382 14.554866 2.501252 1 Si
1254+2.381641 6.415709 15.813044 1 Si
1255+5.228366 8.312517 15.294547 1 Si
1256+1.275038 9.293237 8.778104 1 Si
1257+12.964615 14.079804 3.182163 1 Si
1258+5.147357 3.462346 1.864600 1 Si
1259+6.110368 14.420548 0.040131 1 Si
1260+10.709975 8.623701 11.240443 1 Si
1261+2.175966 10.238155 3.527734 1 Si
1262+2.018696 0.511609 5.000983 1 Si
1263+11.420456 2.600056 2.627034 1 Si
1264+5.438847 4.749964 3.816955 1 Si
1265+1.295361 3.136864 0.535697 1 Si
1266+10.430712 3.828788 12.306155 1 Si
1267+4.910686 7.858418 9.353243 1 Si
1268+5.652629 10.474028 15.912961 1 Si
1269+9.128244 15.733536 11.292202 1 Si
1270+5.844050 11.901138 8.070432 1 Si
1271+11.147043 11.934960 11.941042 1 Si
1272+10.384088 13.199617 6.273663 1 Si
1273+11.640084 2.282076 7.003046 1 Si
1274+3.167284 6.611286 1.733126 1 Si
1275+14.334541 3.866960 14.991470 1 Si
1276+2.779968 8.665334 12.403954 1 Si
1277+9.702374 4.981790 14.229473 1 Si
1278+9.794975 7.243883 14.801569 1 Si
1279+14.575364 4.952351 6.724092 1 Si
1280+9.986159 15.291332 7.291296 1 Si
1281+3.894621 6.918424 11.261081 1 Si
1282+2.211106 13.994233 14.804054 1 Si
1283+12.457310 9.237755 9.692870 1 Si
1284+1.784556 7.914429 3.124134 1 Si
1285+13.210214 0.945653 11.858755 1 Si
1286+7.887876 3.744514 15.203746 1 Si
1287+8.363999 3.119510 11.554388 1 Si
1288+8.761153 1.403933 10.004214 1 Si
1289+10.640399 14.958636 14.645428 1 Si
1290+3.117914 4.323725 7.316241 1 Si
1291+14.913162 11.894002 14.086736 1 Si
1292+7.294663 8.510226 9.527879 1 Si
1293+16.013526 9.809854 14.473319 1 Si
1294+4.764574 11.430269 1.481430 1 Si
1295+0.342303 11.647026 3.772568 1 Si
1296+0.479198 10.388531 6.903591 1 Si
1297+4.222516 3.447802 14.765991 1 Si
1298+7.622148 15.196280 7.280799 1 Si
1299+10.197667 12.831110 13.843528 1 Si
1300+2.771893 0.066885 8.344453 1 Si
1301+2.984224 8.338196 14.726432 1 Si
1302+11.904159 7.514925 4.772869 1 Si
1303+15.817556 3.050406 13.324700 1 Si
1304+5.884220 8.852199 6.202583 1 Si
1305+6.305743 14.694431 13.637899 1 Si
1306+6.813153 16.035677 1.631296 1 Si
1307+10.920713 11.171641 3.291509 1 Si
1308+9.273735 11.769024 7.867364 1 Si
1309+8.574000 9.202510 14.067257 1 Si
1310+14.055600 15.307144 12.816401 1 Si
1311+13.451976 3.607126 9.839430 1 Si
1312+7.852312 8.191610 7.292330 1 Si
1313+13.370100 6.529682 11.816823 1 Si
1314+14.646288 1.245323 3.577626 1 Si
1315+0.825932 4.971585 13.039240 1 Si
1316+0.380265 13.678750 2.509921 1 Si
1317+7.504193 2.580513 6.115795 1 Si
1318+16.267519 14.924502 10.164685 1 Si
1319+3.583733 13.793105 11.305893 1 Si
1320+1.737601 12.162480 11.268461 1 Si
1321+7.915444 10.603397 15.993795 1 Si
1322+6.351217 2.023217 12.117249 1 Si
1323+0.516261 5.597191 9.308455 1 Si
1324+5.653219 11.769447 14.003987 1 Si
1325+6.147093 8.738147 3.898774 1 Si
1326+14.072198 13.466152 7.336551 1 Si
1327+5.129560 3.957750 12.709572 1 Si
1328+9.278496 3.055121 3.288671 1 Si
1329+3.902534 14.650813 3.472322 1 Si
1330+10.301331 9.368484 4.628985 1 Si
1331+3.894269 3.510270 5.209238 1 Si
1332+2.103662 4.319813 14.930831 1 Si
1333+12.458228 12.085810 6.395548 1 Si
1334+4.246007 13.590861 13.565446 1 Si
1335+7.378176 14.158689 11.471968 1 Si
1336+3.796456 11.316593 4.894486 1 Si
1337+8.861915 9.242545 1.256117 1 Si
1338+9.446722 10.335190 12.188991 1 Si
1339+14.201999 4.852564 2.441695 1 Si
1340+5.296599 1.684878 5.957633 1 Si
1341+11.606187 1.989869 13.131468 1 Si
1342+4.843920 1.153744 1.562019 1 Si
1343+12.472999 2.469811 15.239670 1 Si
1344+6.833388 0.016831 5.305392 1 Si
1345+3.538593 9.733564 9.025752 1 Si
1346+7.225306 4.709679 5.265536 1 Si
1347+10.830225 6.161193 8.520521 1 Si
1348+7.963306 2.765592 8.335466 1 Si
1349+12.570944 4.109118 5.864549 1 Si
1350+1.446038 9.527378 16.103771 1 Si
1351+8.831588 0.814968 0.780691 1 Si
1352+11.921340 10.032896 7.534624 1 Si
1353+14.158498 6.885041 3.636541 1 Si
1354+14.666340 10.407838 3.842892 1 Si
1355+6.718743 4.580340 8.953082 1 Si
1356+4.809314 13.567716 9.264781 1 Si
1357+13.257260 10.927942 12.557549 1 Si
1358+9.839907 0.463402 13.361084 1 Si
1359+3.403733 16.061076 10.651448 1 Si
1360+13.230918 12.707696 9.412024 1 Si
1361+2.173725 0.110949 15.197140 1 Si
1362+0.602141 13.185862 13.187210 1 Si
1363+1.084175 3.598585 8.264959 1 Si
1364+3.106038 13.479330 5.400234 1 Si
1365+13.645996 12.990536 15.844236 1 Si
1366+14.604775 14.152245 1.507523 1 Si
1367+12.130917 7.664731 15.037995 1 Si
1368+12.964544 7.193911 8.674995 1 Si
1369+2.844307 0.381883 2.748328 1 Si
1370+10.077617 13.880082 0.398765 1 Si
1371+10.862629 3.950116 16.071553 1 Si
1372+11.083077 0.474014 1.587226 1 Si
1373+12.410896 8.452775 0.999140 1 Si
1374+15.026478 0.259479 1.411165 1 Si
1375+15.932798 3.055454 6.492909 1 Si
1376+8.422124 8.659501 3.457144 1 Si
1377+16.147873 12.487490 7.538698 1 Si
1378+9.620212 13.041132 3.973792 1 Si
1379+8.566846 7.040928 0.489751 1 Si
1380+11.382391 12.084770 15.881583 1 Si
1381+0.563570 2.161756 10.081314 1 Si
1382+6.257331 14.837193 3.625571 1 Si
1383+9.711832 9.654580 6.855569 1 Si
1384+8.807664 1.220834 4.676988 1 Si
1385+14.593478 15.431096 5.976807 1 Si
1386+12.608183 16.228362 9.858567 1 Si
1387+0.278489 15.178491 4.519750 1 Si
1388+7.947682 12.889427 0.331137 1 Si
1389+2.474339 11.006727 1.296937 1 Si
1390+0.424843 8.853483 12.376129 1 Si
1391+7.705609 5.347842 10.903666 1 Si
1392+2.888477 4.244022 1.876444 1 Si
1393+5.826895 4.461613 16.124396 1 Si
1394+5.563236 0.686114 10.234928 1 Si
1395+6.593177 15.054077 9.436078 1 Si
1396+4.528871 3.710397 9.008907 1 Si
1397+7.666372 11.727597 11.412897 1 Si
1398+13.998143 14.502457 10.591096 1 Si
1399+4.274447 13.679478 1.380517 1 Si
1400+0.811292 13.097898 5.518548 1 Si
1401+12.927414 11.908472 4.136074 1 Si
1402+15.136543 1.001528 7.266685 1 Si
1403+15.587500 4.338240 0.654426 1 Si
1404+12.553647 8.600014 12.845995 1 Si
1405+13.480424 5.951451 14.167403 1 Si
1406+13.016468 0.484879 0.097882 1 Si
1407+12.931744 16.036412 4.523297 1 Si
1408+10.613799 15.047169 9.582958 1 Si
1409+14.835568 2.518375 11.312123 1 Si
1410+10.239568 2.762102 8.804011 1 Si
1411+6.455371 8.346903 13.292245 1 Si
1412+13.323099 3.177276 3.819723 1 Si
1413+1.457653 6.151753 4.635015 1 Si
1414+%endblock AtomicCoordinatesAndAtomicSpecies
1415
1416=== added file 'Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.fdf'
1417--- Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.fdf 1970-01-01 00:00:00 +0000
1418+++ Util/Unfolding/Examples/Si/Amorphous/Si216/a-Si-216.fdf 2019-09-12 09:33:19 +0000
1419@@ -0,0 +1,73 @@
1420+ SystemName a-Si with 216 atoms
1421+ SystemLabel a-Si-216
1422+ NumberOfAtoms 216
1423+ NumberOfSpecies 1
1424+
1425+ %block ChemicalSpeciesLabel
1426+ 1 14 Si
1427+ %endblock ChemicalSpeciesLabel
1428+
1429+ LatticeConstant 16.2813 Ang
1430+ %block LatticeVectors
1431+ 1.000 0.000 0.000
1432+ 0.000 1.000 0.000
1433+ 0.000 0.000 1.000
1434+ %endblock LatticeVectors
1435+
1436+ AtomicCoordinatesFormat Ang
1437+ %include a-Si-216.coord.fdf
1438+
1439+ XC.functional GGA
1440+ XC.authors PBE
1441+ PAO.BasisSize DZ
1442+
1443+ MaxSCFIterations 200
1444+ DM.MixingWeight 0.02
1445+ DM.NumberPulay 3
1446+ DM.Tolerance 0.0001
1447+ DM.UseSaveDM .true.
1448+ ElectronicTemperature 0.15 eV
1449+
1450+# MeshCutoff 300.0 Ry
1451+ %block MeshSizes
1452+ 180 180 180
1453+ %endblock MeshSizes
1454+
1455+ %block kgrid.MonkhorstPack
1456+ 2 0 0 0.5
1457+ 0 2 0 0.5
1458+ 0 0 2 0.5
1459+ %endblock kgrid.MonkhorstPack
1460+
1461+ BandLinesScale pi/a
1462+ SaveHS .true.
1463+
1464+ %block UnfoldedBandLines
1465+ 700 -20.0 15.0 eV
1466+ 1 -6.0 -6.0 -6.0 \Gamma # Labels refer to positions
1467+ 86 -3.0 -3.0 -3.0 L # in the FCC lattice
1468+ 86 0.0 0.0 0.0 \Gamma
1469+ 100 6.0 0.0 0.0 X
1470+ 35 6.0 1.5 1.5 U
1471+ 106 6.0 6.0 6.0 \Gamma
1472+ %endblock UnfoldedBandLines
1473+
1474+# %block UnfoldedBandLines
1475+# 700 -20.0 15.0 eV
1476+# 1 -12.0 -12.0 -12.0 L
1477+# 86 -8.0 -8.0 -8.0 \Gamma
1478+# 86 -4.0 -4.0 -4.0 L
1479+# 86 0.0 0.0 0.0 \Gamma
1480+# 100 8.0 0.0 0.0 X
1481+# 100 16.0 0.0 0.0 \Gamma
1482+# 100 24.0 0.0 0.0 X
1483+# %endblock UnfoldedBandLines
1484+
1485+ RefoldingGcutoff 18.0 Ry
1486+ %block RefoldingLatticeVectors
1487+ 0.000 0.166666667 0.166666667 # FCC vectors scaled to
1488+ 0.166666667 0.000 0.166666667 # the a-Si LatticeConstant
1489+ 0.166666667 0.166666667 0.000
1490+ %endblock RefoldingLatticeVectors
1491+
1492+
1493
1494=== added directory 'Util/Unfolding/Examples/Si/Bulk'
1495=== added directory 'Util/Unfolding/Examples/Si/Bulk/Si8'
1496=== added file 'Util/Unfolding/Examples/Si/Bulk/Si8/si8.fdf'
1497--- Util/Unfolding/Examples/Si/Bulk/Si8/si8.fdf 1970-01-01 00:00:00 +0000
1498+++ Util/Unfolding/Examples/Si/Bulk/Si8/si8.fdf 2019-09-12 09:33:19 +0000
1499@@ -0,0 +1,72 @@
1500+SystemName Si 8 atoms-cubic supercell
1501+SystemLabel si8
1502+NumberOfAtoms 8
1503+NumberOfSpecies 1
1504+
1505+%block ChemicalSpeciesLabel
1506+ 1 14 Si
1507+%endblock ChemicalSpeciesLabel
1508+
1509+LatticeConstant 5.430 Ang
1510+
1511+%block LatticeVectors
1512+ 1.000 0.000 0.000
1513+ 0.000 1.000 0.000
1514+ 0.000 0.000 1.000
1515+%endblock LatticeVectors
1516+
1517+AtomicCoordinatesFormat ScaledCartesian
1518+
1519+%block AtomicCoordinatesAndAtomicSpecies
1520+ 0.000 0.000 0.000 1 Si
1521+ 0.500 0.500 0.000 1 Si
1522+ 0.500 0.000 0.500 1 Si
1523+ 0.000 0.500 0.500 1 Si
1524+ 0.250 0.250 0.250 1 Si
1525+ 0.750 0.750 0.250 1 Si
1526+ 0.750 0.250 0.750 1 Si
1527+ 0.250 0.750 0.750 1 Si
1528+%endblock AtomicCoordinatesAndAtomicSpecies
1529+
1530+PAO.BasisSize DZP
1531+
1532+%block MeshSizes
1533+ 40 40 40
1534+%endblock MeshSizes
1535+
1536+%block kgrid.MonkhorstPack
1537+ 0 4 4 0.5
1538+ 4 0 4 0.5
1539+ 4 4 0 0.5
1540+%endblock kgrid.MonkhorstPack
1541+
1542+%block BandLines
1543+ 1 1.0 1.0 1.0 L
1544+ 20 0.0 0.0 0.0 \Gamma
1545+ 25 2.0 0.0 0.0 X
1546+ 30 2.0 2.0 2.0 \Gamma
1547+%endblock BandLines
1548+
1549+ ### Unfold options:
1550+
1551+BandLinesScale pi/a
1552+SaveHS .true.
1553+RefoldingGcutoff 15.0 Ry
1554+
1555+%block UnfoldedBandLines
1556+ 250 -20.0 40.0 eV
1557+ 1 1.0 1.0 1.0 L
1558+ 20 0.0 0.0 0.0 \Gamma
1559+ 25 2.0 0.0 0.0 X
1560+ 30 2.0 2.0 2.0 \Gamma
1561+%endblock UnfoldedBandLines
1562+
1563+%block RefoldingLatticeVectors
1564+ 0.000 0.500 0.500
1565+ 0.500 0.000 0.500
1566+ 0.500 0.500 0.000
1567+%endblock RefoldingLatticeVectors
1568+
1569+AllocReportLevel 2
1570+AllocReportThreshold 0
1571+
1572
1573=== added directory 'Util/Unfolding/Examples/Si/Defects'
1574=== added directory 'Util/Unfolding/Examples/Si/Defects/Vacancy'
1575=== added file 'Util/Unfolding/Examples/Si/Defects/Vacancy/si7.fdf'
1576--- Util/Unfolding/Examples/Si/Defects/Vacancy/si7.fdf 1970-01-01 00:00:00 +0000
1577+++ Util/Unfolding/Examples/Si/Defects/Vacancy/si7.fdf 2019-09-12 09:33:19 +0000
1578@@ -0,0 +1,64 @@
1579+SystemName Vacancy in Si cubic supercell
1580+SystemLabel si7
1581+NumberOfAtoms 7
1582+NumberOfSpecies 1
1583+
1584+%block ChemicalSpeciesLabel
1585+ 1 14 Si
1586+%endblock ChemicalSpeciesLabel
1587+
1588+LatticeConstant 5.430 Ang
1589+
1590+%block LatticeVectors
1591+ 1.000 0.000 0.000
1592+ 0.000 1.000 0.000
1593+ 0.000 0.000 1.000
1594+%endblock LatticeVectors
1595+
1596+AtomicCoordinatesFormat ScaledCartesian
1597+
1598+%block AtomicCoordinatesAndAtomicSpecies
1599+ 0.500 0.500 0.000 1 Si
1600+ 0.500 0.000 0.500 1 Si
1601+ 0.000 0.500 0.500 1 Si
1602+ 0.250 0.250 0.250 1 Si
1603+ 0.750 0.750 0.250 1 Si
1604+ 0.750 0.250 0.750 1 Si
1605+ 0.250 0.750 0.750 1 Si
1606+%endblock AtomicCoordinatesAndAtomicSpecies
1607+
1608+PAO.BasisSize DZP
1609+
1610+%block kgrid.MonkhorstPack
1611+ 0 8 8 0.5
1612+ 8 0 8 0.5
1613+ 8 8 0 0.5
1614+%endblock kgrid.MonkhorstPack
1615+
1616+%block BandLines
1617+ 1 1.0 1.0 1.0 L
1618+ 20 0.0 0.0 0.0 \Gamma
1619+ 25 2.0 0.0 0.0 X
1620+ 30 2.0 2.0 2.0 \Gamma
1621+%endblock BandLines
1622+
1623+ ### Unfold options:
1624+
1625+BandLinesScale pi/a
1626+SaveHS .true.
1627+RefoldingGcutoff 15.0 Ry
1628+
1629+%block UnfoldedBandLines
1630+ 250 -20.0 40.0 eV
1631+ 1 1.0 1.0 1.0 L
1632+ 20 0.0 0.0 0.0 \Gamma
1633+ 25 2.0 0.0 0.0 X
1634+ 30 2.0 2.0 2.0 \Gamma
1635+%endblock UnfoldedBandLines
1636+
1637+%block RefoldingLatticeVectors
1638+ 0.000 0.500 0.500
1639+ 0.500 0.000 0.500
1640+ 0.500 0.500 0.000
1641+%endblock RefoldingLatticeVectors
1642+
1643
1644=== added file 'Util/Unfolding/README'
1645--- Util/Unfolding/README 1970-01-01 00:00:00 +0000
1646+++ Util/Unfolding/README 2019-09-12 09:33:19 +0000
1647@@ -0,0 +1,140 @@
1648+Directory Util/Unfolding contains a band-unfolding utility,
1649+written by Sara G. Mayo and Jose M. Soler, Oct.2018
1650+
1651+Ref: "Band unfolding made simple",
1652+ S.G.Mayo, F.Yndurain and J.M.Soler, Dic.2018 (v2: Jun.2019)
1653+ arXiv:1812.03925 ( https://arxiv.org/abs/1812.03925 )
1654+
1655+Compile with
1656+$ cd Obj
1657+$ make (see siesta manual for siesta compilation)
1658+$ cd ../Util/Unfolding/Src
1659+$ make
1660+
1661+Sample serial run (for serial compilation according to Obj/arch.make):
1662+$ cd ../Examples/Si/Bulk/Si8
1663+$ ../../../../../../Obj/siesta < si8.fdf > si8.out
1664+$ ../../../../Src/unfold < si8.fdf > si8.unfold.out
1665+
1666+Sample parallel run:
1667+$ cd ../Examples/Si/Bulk/Si8
1668+$ mpirun -np 16 ../../../../../../Obj/siesta < si8.fdf > si8.out
1669+$ mpirun -np 4 ../../../../Src/unfold < si8.fdf > si8.unfold.out
1670+
1671+The unfolding/refolding specifications are given by two extra fdf blocks
1672+in the same datafile used by siesta. For example:
1673+------------
1674+LatticeConstant 5.430 Ang # used by siesta and unfold
1675+BandLinesScale pi/a # used in BandLines and UnfoldedBandLines blocks
1676+
1677+%block LatticeVectors # simulation cell used by siesta and unfold
1678+ 1.000 0.000 0.000 # this is an 8-atom Si supercell
1679+ 0.000 1.000 0.000
1680+ 0.000 0.000 1.000
1681+%endblock LatticeVectors
1682+
1683+SaveHS true # makes siesta write the .HSX file used by unfold
1684+
1685+%block UnfoldedBandLines
1686+ 320 -20.0 60 eV # numEnergies, Emin, Emax, Eunit
1687+ 1 3.0 3.0 3.0 # mustBeOne, first_qVector (in units of BandLinesScale)
1688+ 100 0.0 0.0 0.0 # numQ_in_line, endLine_qVector
1689+ 120 6.0 0.0 0.0 # add as many lines as required
1690+%endblock UnfoldedBandLines
1691+
1692+RefoldingGcutoff 25 Ry # Cutoff for (the square of) refolding G vectors
1693+
1694+%block RefoldingLatticeVectors
1695+ 0.000 0.500 0.500 # primitive Si unit cell, in units of LatticeConstant
1696+ 0.500 0.000 0.500
1697+ 0.500 0.500 0.000
1698+%endblock RefoldingLatticeVectors
1699+-----------
1700+
1701+The UnfoldedBandLines block has the same format as BandLines, except for the first
1702+line, which specifies the energy mesh for the density of states in q space (qDOS).
1703+Also, it allows several q paths to be specified consecutively, each beginning with a
1704+single point. This allows a q-line to not begin at the end of previous one, e.g.
1705+
1706+%block UnfoldedBandLines
1707+ 320 -20.0 60 eV # numEnergyIntervals, Emin, Emax, Eunit
1708+ 1 1.0 1.0 1.0 # mustBeOne, first_qVector (in units of BandLinesScale)
1709+ 100 0.0 0.0 0.0 \Gamma # line_numq, endLine_qVector, q_label
1710+ 120 2.0 0.0 0.0 # add as many path lines as required
1711+ 1 0.0 0.0 0.0 # new path (begins with a single point)
1712+ 100 4.0 4.0 0.0
1713+%endblock UnfoldedBandLines
1714+
1715+As in BandLines, a label can be added at the end of a q-line with the name
1716+of the specified q-point.
1717+
1718+The unfolded and refolded bands calculated by unfold are written in files
1719+SYSLABEL.unfoldedBands and SYSLABEL.refoldedBands (where SYSLABEL=si8 in
1720+previous example). The first one contains the fully-unfolded bands and
1721+the second one contains the refolded bands. Both have the same format:
1722+----------
1723+nq, ne, Emin, Emax, Fermi (in energy units given in UnfoldedBandLines)
1724+ qVector(ixyz=1:3,iq=1), iLine, label (q in Bohr^-1, line to which it belongs)
1725+qDOS(ie=1,iq=1)
1726+qDOS(2,1)
1727+...
1728+qDOS(ne,1)
1729+ qVector(1:3,2), iLine, label
1730+qDOS(1,2)
1731+...
1732+qDOS(ne,2)
1733+ ...
1734+ qVector(1:3,nq), iLine, label
1735+qDOS(1,2)
1736+...
1737+qDOS(ne,nq)
1738+----------
1739+where nq=1+100+120=221 is the total number of q vectors in q-path and
1740+ne=numEnergyIntervals+1=321 is the number of energies, in previous example.
1741+
1742+If several q paths are given in UnfoldedBandLines, the bands of each one
1743+are written in different output files, with suffixes .path1, .path2, etc.
1744+Also, for spin polarized systems, the two spin bands are written in two
1745+separate files with suffixes .spinUp and .spinDn
1746+
1747+If RefoldingLatticeVectors is not present in the fdf datafile, only the
1748+fully-unfolded bands are calculated and written. If UnfoldedBandLines
1749+is not present, RefoldingLatticeVectors has no effect: nothing is calculated
1750+nor written by unfold.
1751+
1752+The UnfoldedBandLines and RefoldingLatticeVectors blocks are compatible with, and
1753+independent of, the BandLines block. The latter is read and processed by siesta,
1754+while the first two are read and processed by unfold.
1755+
1756+The simulation cell will usually be a supercell of the unit cell, but this is not
1757+required by unfold. I.e. bands can be unfolded and then refolded to any Brillouin
1758+zone, not necessarily commensurate with the simulation cell used by siesta.
1759+Notice, however, that this requires a new diagonalization for each q+G vector,
1760+what may be very expensive in terms of CPU time.
1761+
1762+The refolded G vectors are those with G^2<RefoldingGcutoff. Therefore,
1763+RefoldingGcutoff largely determines the accuracy (and CPU time) for refolding.
1764+Its default value is 50 ry.
1765+
1766+The CPU time used by unfold is proportional to the number of q vectors, but it
1767+does not increase with the energy resolution of the qDOS mesh (the size of the
1768+output files is proportional to the number of energies, though). Since the
1769+parallelization over q vectors is almost perfect, execution wall-clock time
1770+is inversely proportional to the number of MPI nodes, provided they are less
1771+than the number of q points in UnfoldedBandLines.
1772+
1773+Final note: in a supercell calculation, to not break artificially the translational
1774+crystal symmetry, one should use an integration mesh commensurate with the unit cell.
1775+This can be ensured by setting explicitly the MeshSizes block. For example, for an
1776+FCC unit cell with lattice vectors a=a0/2*{(0,1,1),(1,0,1),(1,1,0)}, and a
1777+4-unit-cell supercell calculation, with A=a0/2*{(2,0,0),(0,2,0),(0,0,2)},
1778+it suffices that all MeshSizes are even. For a n-layer (111) slab with
1779+A=a0/2*{(0,1,1),(1,0,1),(n,n,0)}, the mesh size of third vector should be a
1780+multiple of n. In general, a necessary and sufficient condition is that matrix
1781+inv(Amesh)*a is integer. Here, a is the matrix of unit cell vectors, Amesh is the
1782+matrix of supercell mesh vectors (both in columns), and inv(Amesh) is its inverse.
1783+The ith mesh vector is Amesh(:,i)=A(:,i)/MeshSize(i). Notice that all MeshSizes
1784+must also be multiples of the MeshSubDivisions parameter (equal to 2 by default).
1785+In a slab calculation, construct the simulation cell by removing atoms from
1786+a bulk supercell, so that the simulation-cell lattice vectors make an exact
1787+supercell of the crystal unit cell.
1788
1789=== added directory 'Util/Unfolding/Src'
1790=== added file 'Util/Unfolding/Src/Makefile'
1791--- Util/Unfolding/Src/Makefile 1970-01-01 00:00:00 +0000
1792+++ Util/Unfolding/Src/Makefile 2019-09-12 09:33:19 +0000
1793@@ -0,0 +1,48 @@
1794+# ---
1795+# Copyright (C) 1996-2016 The SIESTA group
1796+# This file is distributed under the terms of the
1797+# GNU General Public License: see COPYING in the top directory
1798+# or http://www.gnu.org/copyleft/gpl.txt .
1799+# See Docs/Contributors.txt for a list of contributors.
1800+# ---
1801+#
1802+# Makefile for stand-alone unfold
1803+#
1804+
1805+.SUFFIXES:
1806+.SUFFIXES: .f .F .o .a .f90 .F90
1807+
1808+default: unfold
1809+
1810+WDIR=$(shell pwd)
1811+VPATH=../../../Src
1812+OBJDIR=../../../Obj
1813+HSXDIR=../../HSX
1814+ARCH_MAKE=$(OBJDIR)/arch.make
1815+include $(ARCH_MAKE)
1816+
1817+SIESTA_LIB=libSiestaForces.a
1818+FDF=libfdf.a
1819+XMLPARSER=libxmlparser.a
1820+WXML=libwxml.a
1821+XC=libSiestaXC.a
1822+ALL_LIBS= $(SIESTA_LIB) $(FDF) $(WXML) $(XMLPARSER) $(XC) \
1823+ $(MPI_INTERFACE) $(COMP_LIBS) $(LIBS)
1824+
1825+libs_collected:
1826+ (cd $(OBJDIR) ; \
1827+ make libSiestaForces.a ; \
1828+ cp -f *.a *.mod $(WDIR) )
1829+ cp -f $(HSXDIR)/hsx_m.f90 $(WDIR)
1830+ touch libs_collected
1831+
1832+unfold.o: unfold.F90 hsx_m.f90 libs_collected
1833+ $(FC) -c $(FFLAGS_DEBUG) $(INCFLAGS) $(FPPFLAGS) $(FPPFLAGS_free_F) hsx_m.f90 unfold.F90
1834+
1835+unfold: libs_collected unfold.o
1836+ $(FC) $(LDFLAGS) -o unfold hsx_m.o unfold.o $(ALL_LIBS)
1837+
1838+clean:
1839+ @echo "==> Cleaning object, library, and executable files"
1840+ rm -f unfold *.o *.a *.mod libs_collected
1841+
1842
1843=== added file 'Util/Unfolding/Src/local_sys.f'
1844--- Util/Unfolding/Src/local_sys.f 1970-01-01 00:00:00 +0000
1845+++ Util/Unfolding/Src/local_sys.f 2019-09-12 09:33:19 +0000
1846@@ -0,0 +1,45 @@
1847+! ---
1848+! Copyright (C) 1996-2016 The SIESTA group
1849+! This file is distributed under the terms of the
1850+! GNU General Public License: see COPYING in the top directory
1851+! or http://www.gnu.org/copyleft/gpl.txt .
1852+! See Docs/Contributors.txt for a list of contributors.
1853+! ---
1854+
1855+ module sys
1856+!
1857+! Termination and messaging routines, MPI aware
1858+!
1859+ implicit none
1860+
1861+ public :: die ! Prints an error message and calls MPI_Abort
1862+ private
1863+
1864+ CONTAINS
1865+
1866+!--------------------------------------------------
1867+ subroutine die(str)
1868+
1869+ character(len=*), intent(in), optional :: str
1870+
1871+ if (present(str)) then
1872+ write(6,'(a)') trim(str)
1873+ write(0,'(a)') trim(str)
1874+ endif
1875+
1876+ stop
1877+ end subroutine die
1878+
1879+ end module sys
1880+
1881+! Stand-alone copy
1882+ subroutine die(str)
1883+
1884+ character(len=*), intent(in) :: str
1885+
1886+ write(6,'(a)') trim(str)
1887+ write(0,'(a)') trim(str)
1888+
1889+ stop
1890+ end subroutine die
1891+
1892
1893=== added file 'Util/Unfolding/Src/meshgen.c'
1894--- Util/Unfolding/Src/meshgen.c 1970-01-01 00:00:00 +0000
1895+++ Util/Unfolding/Src/meshgen.c 2019-09-12 09:33:19 +0000
1896@@ -0,0 +1,58 @@
1897+// Generates the UnfoldedBandLines block for a squared 2D
1898+// q-point mesh. Reads the input from the 'meshgen.dat'
1899+// file, with format:
1900+// ne emin emax
1901+// nx x0 xend
1902+// ny y0 yend
1903+// and writes the formated output 'meshgen.fdf'.
1904+// After running unfold, plot the output files with
1905+// 'plotmesh.m'.
1906+//
1907+// April 2019
1908+
1909+#include <stdlib.h>
1910+#include <stdio.h>
1911+#include <math.h>
1912+#define PI 3.14159265
1913+
1914+int main() {
1915+
1916+FILE *dat;
1917+dat = fopen("meshgen.dat","r");
1918+
1919+FILE *fdf;
1920+fdf = fopen("meshgen.fdf","w");
1921+
1922+int ne, nx, ny;
1923+double emin, emax;
1924+double x0, xend, y0, yend;
1925+
1926+int i;
1927+double xi, dx;
1928+
1929+fscanf(dat, "%d %lf %lf", &ne, &emin, &emax);
1930+fscanf(dat, "%d %lf %lf", &nx, &x0, &xend);
1931+fscanf(dat, "%d %lf %lf", &ny, &y0, &yend);
1932+
1933+xi = x0;
1934+dx = (xend - x0)/(nx - 1.0);
1935+ny = ny - 1;
1936+
1937+fprintf(fdf, "%%block UnfoldedBandLines\n");
1938+fprintf(fdf, " %d\t%lf\t%lf\t eV\n", ne, emin, emax);
1939+
1940+i = 0;
1941+for ( i=0; i<nx; i++ ) {
1942+ xi = xi + dx;
1943+ fprintf(fdf, " 1\t%lf\t%lf\t0.0\n", xi, y0);
1944+ fprintf(fdf, " %d\t%lf\t%lf\t0.0\n", ny, xi, yend);
1945+}
1946+fprintf(fdf, "%%endblock UnfoldedBandLines\n");
1947+printf("'meshgen.fdf' written\n");
1948+
1949+fclose(dat);
1950+fclose(fdf);
1951+
1952+return 0;
1953+}
1954+
1955
1956=== added file 'Util/Unfolding/Src/plotUandR.m'
1957--- Util/Unfolding/Src/plotUandR.m 1970-01-01 00:00:00 +0000
1958+++ Util/Unfolding/Src/plotUandR.m 2019-09-12 09:33:19 +0000
1959@@ -0,0 +1,187 @@
1960+% plotUandR.m
1961+% Plots fully-unfolded and refolded qLDOS written by unfold.F90
1962+% SGM & JMS, Oct.2018 (mod. May 2019)
1963+
1964+clear all
1965+wdir = './path_to_file/';
1966+syslabel = 'systemLabel';
1967+fnameA = [wdir,syslabel,'.unfoldedBands']; % .path, .spin
1968+fnameB = [wdir,syslabel,'.refoldedBands'];
1969+
1970+fileA = fopen(fnameA); % Read DOS
1971+datA = fscanf(fileA,'%d %d %f %f %f',5);
1972+ nq = datA(1);
1973+ ne = datA(2);
1974+ emin = datA(3);
1975+ emax = datA(4);
1976+ efermi = datA(5);
1977+fileB = fopen(fnameB);
1978+datB = fscanf(fileB,'%d %d %f %f %f',5);
1979+
1980+q = zeros(3,nq);
1981+dosA = zeros(nq,ne);
1982+dosB = zeros(nq,ne);
1983+label = string(zeros(nq,1));
1984+for iq = 1:nq
1985+ q(:,iq) = fscanf(fileA,'%f %f %f',3);
1986+ iline(iq) = fscanf(fileA,'%i',1);
1987+ label(iq) = fscanf(fileA,'%10c',1);
1988+ dosA(iq,:) = fscanf(fileA,'%f',ne);
1989+ fscanf(fileB,'%f %f %f',3);
1990+ fscanf(fileB,'%i',1);
1991+ fscanf(fileB,'%10c',1);
1992+ dosB(iq,:) = fscanf(fileB,'%f',ne);
1993+end
1994+fclose(fileA);
1995+fclose(fileB);
1996+
1997+% set zero at Fermi level
1998+emin = emin - efermi;
1999+emax = emax - efermi;
2000+
2001+% adjust labels to MATLAB style
2002+for iq=1:nq
2003+ if (label(iq)==' Gamma ')
2004+ label(iq)='\Gamma';
2005+ elseif (label(iq)==' '' '' ')
2006+ label(iq)=' ';
2007+ else
2008+ label(iq)=strtrim(label(iq));
2009+ end
2010+end
2011+
2012+if nq==1
2013+ qpath = 0;
2014+else
2015+ for ix=1:3
2016+ dq(ix,:) = diff(q(ix,:));
2017+ end
2018+ dq = sqrt(sum(dq.^2));
2019+ qpath = [0,cumsum(dq)];
2020+end
2021+de = (emax-emin)/(ne-1);
2022+e = emin:de:emax;
2023+[qpath,e] = ndgrid(qpath,e);
2024+
2025+% --------- Plot of the density --------- figure size:
2026+% [x0, y0, w, h]
2027+ set(gcf,'Units','Normalized','OuterPosition',[0.55, 0.05, 0.45, 0.9]);
2028+
2029+if nq==1 % gamma point only
2030+ subplot(2,1,1)
2031+ plot(e,dosA)
2032+ xlabel('Energy'); ylabel('DOS');
2033+
2034+ subplot(2,1,2)
2035+ plot(e,dosB)
2036+ xlabel('Energy'); ylabel('DOS');
2037+ grid on
2038+
2039+else
2040+
2041+% NORMAL scale: PlotLog == 0
2042+% LOG scale: PlotLog == 1
2043+
2044+ PlotLogA = 1;
2045+ PlotLogB = 0;
2046+
2047+ % --- Full unfolding ---
2048+ subplot(2,1,1)
2049+
2050+ zlim = max(dosA(:));
2051+ zsat = zlim*1.0e-3; % saturation for log scale
2052+
2053+ %emax = 10.0;
2054+ %emin = -15.0;
2055+
2056+ if PlotLogA == 0 % normal
2057+ sA = surf(qpath',e',dosA');
2058+ axis([qpath(1),qpath(end),emin,emax,0,zlim])
2059+ caxis([0,zlim]);
2060+ else % log
2061+ sA = surf(qpath',e',max(dosA,zsat)');
2062+ set(gca,'colorscale','log');
2063+ axis([qpath(1),qpath(end),emin,emax,zsat,zlim])
2064+ caxis([zsat,zlim]); %caxis('auto');
2065+ end
2066+
2067+ sA.EdgeColor = 'none';
2068+ set(gca,'FontSize',13);
2069+ ylabel('Energy (eV)');
2070+ zlabel('LDOS');
2071+
2072+ view(2);
2073+ colormap(flipud(bone));
2074+ h = colorbar;
2075+ h.TickLength = 0.05;
2076+ set(get(h,'label'),'string',' LDOS (eV^{-1})');
2077+
2078+ % line edges and fermi level
2079+ hold on
2080+ cpl = [0.8,0.7,0.75]; cfl = [0.92,0.59,0.59];
2081+
2082+ lineEnd = find(iline(1:nq-1)<iline(2:nq));
2083+ for jl = 1:numel(lineEnd)
2084+ il = lineEnd(jl);
2085+ plot3(qpath(il)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2086+ end
2087+ plot3(qpath(end)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2088+
2089+ plot3([qpath(1),qpath(end)],0*[1,1],[zlim,zlim],'Color',cfl,'LineStyle',':','LineWidth',0.5)
2090+
2091+ xticks( [qpath((lineEnd(1:1:numel(lineEnd)))),qpath(end)] );
2092+ xticklabels( [ label(lineEnd(1:1:numel(lineEnd))); label(nq) ] );
2093+ hold off
2094+
2095+
2096+ % --- Refolding ---
2097+ subplot(2,1,2)
2098+
2099+ zlim = max(dosB(:));
2100+ zsat = zlim*1.0e-2; % saturation for log scale
2101+
2102+ %emax = 10.0;
2103+ %emin = -15.0;
2104+
2105+ if PlotLogB == 0 % normal
2106+ sB = surf(qpath',e',dosB');
2107+ axis([qpath(1),qpath(end),emin,emax,0,zlim])
2108+ caxis([0,zlim]);
2109+ else % log
2110+ sB = surf(qpath',e',max(dosB,zsat)');
2111+ set(gca,'colorscale','log');
2112+ axis([qpath(1),qpath(end),emin,emax,zsat,zlim])
2113+ caxis([zsat,zlim]); %caxis('auto');
2114+ end
2115+
2116+ sB.EdgeColor = 'none';
2117+ set(gca,'FontSize',13);
2118+ ylabel('Energy (eV)');
2119+ zlabel('LDOS');
2120+
2121+ view(2);
2122+ colormap(flipud(bone));
2123+ h = colorbar;
2124+ h.TickLength = 0.05;
2125+ set(get(h,'label'),'string',' LDOS (eV^{-1})');
2126+
2127+% line edges and fermi level
2128+ hold on
2129+ cpl = [0.8,0.7,0.75]; cfl = [0.92,0.59,0.59];
2130+
2131+ lineEnd = find(iline(1:nq-1)<iline(2:nq));
2132+ for jl = 1:numel(lineEnd)
2133+ il = lineEnd(jl);
2134+ plot3(qpath(il)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2135+ end
2136+ plot3(qpath(end)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2137+
2138+ plot3([qpath(1),qpath(end)],0*[1,1],[zlim,zlim],'Color',cfl,'LineStyle',':','LineWidth',0.5)
2139+
2140+ xticks( [qpath((lineEnd(1:1:numel(lineEnd)))),qpath(end)] );
2141+ xticklabels( [ label(lineEnd(1:1:numel(lineEnd))); label(nq) ] );
2142+ hold off
2143+
2144+end
2145+
2146+% --------------------------------------------
2147
2148=== added file 'Util/Unfolding/Src/plotdiff.m'
2149--- Util/Unfolding/Src/plotdiff.m 1970-01-01 00:00:00 +0000
2150+++ Util/Unfolding/Src/plotdiff.m 2019-09-12 09:33:19 +0000
2151@@ -0,0 +1,160 @@
2152+% plotdiff.m
2153+% Plots the difference between qDOS of two systems written by unfold
2154+% in order to highlight the differences between them.
2155+% Useful for visualizing changes in the bands of a defective system
2156+% with respect to the crystaline reference system.
2157+% In the plot, new states arising from the defects are depicted in
2158+% red, while states that vanish appear in blue.
2159+%
2160+% (!) Both systems must have identical 'UnfoldedBandLines' blocks in
2161+% their fdf files (that is, same energies and q sampling points).
2162+%
2163+% SGM & JMS, Oct.2018 (mod. May 2019)
2164+
2165+clear all
2166+wdir = './path_to_file/';
2167+syslabelA = 'systemA'; % System A : non-defective
2168+syslabelB = 'systemB'; % System B : defective
2169+fnameA = [wdir,syslabelA,'.refoldedBands']; % '.refoldedBands' or
2170+fnameB = [wdir,syslabelB,'.refoldedBands']; %.path1 % '.unfoldedBands'.
2171+
2172+% read DOS
2173+fileA = fopen(fnameA);
2174+datA = fscanf(fileA,'%d %d %f %f %f',5);
2175+ nq = datA(1);
2176+ ne = datA(2);
2177+ emin = datA(3);
2178+ emax = datA(4);
2179+ efermiA = datA(5);
2180+fileB = fopen(fnameB);
2181+datB = fscanf(fileB,'%d %d %f %f %f',5); % nq,ne,emin,emax read from fileA
2182+ efermiB = datB(5);
2183+
2184+q = zeros(3,nq);
2185+dosA = zeros(nq,ne);
2186+dosB = zeros(nq,ne);
2187+label = string(zeros(nq,1));
2188+for iq = 1:nq
2189+ q(:,iq) = fscanf(fileA,'%f %f %f',3);
2190+ iline(iq) = fscanf(fileA,'%i',1);
2191+ label(iq) = fscanf(fileA,'%10c',1);
2192+ dosA(iq,:) = fscanf(fileA,'%f',ne);
2193+ fscanf(fileB,'%f %f %f',3);
2194+ fscanf(fileB,'%i',1);
2195+ fscanf(fileB,'%10c',1);
2196+ dosB(iq,:) = fscanf(fileB,'%f',ne);
2197+end
2198+fclose(fileA);
2199+fclose(fileB);
2200+
2201+% set zero at efermiA (non-defective)
2202+emin = emin - efermiA;
2203+emax = emax - efermiA;
2204+
2205+% labels in MATLAB style
2206+for iq=1:nq
2207+ if (label(iq)==' Gamma ')
2208+ label(iq)='\Gamma';
2209+ elseif (label(iq)==' '' '' ')
2210+ label(iq)=' ';
2211+ else
2212+ label(iq)=strtrim(label(iq));
2213+ end
2214+end
2215+
2216+if nq==1
2217+ qpath = 0;
2218+else
2219+ for ix=1:3
2220+ dq(ix,:) = diff(q(ix,:));
2221+ end
2222+ dq = sqrt(sum(dq.^2));
2223+ qpath = [0,cumsum(dq)];
2224+end
2225+de = (emax-emin)/(ne-1);
2226+e = emin:de:emax;
2227+[qpath,e] = ndgrid(qpath,e);
2228+
2229+% align spectra if necessary (displaces an integer number of pixels)
2230+plim = 15; dmin = 333333;
2231+
2232+for ip = -plim:plim
2233+ ipmin = 1+plim; ipmax = ne-plim;
2234+ pdiff = sum(sum( abs((dosA(:,ipmin:ipmax)-dosB(:,ipmin+ip:ipmax+ip))) ));
2235+ if pdiff < dmin
2236+ dmin = pdiff;
2237+ ipopt = ip;
2238+ end
2239+end
2240+if (ipopt>0)
2241+ dosB(:,1+ipopt:ne-ipopt)=dosB(:,1+ipopt+ipopt:ne);
2242+else
2243+ dosB(:,1:ne+ipopt)=dosB(:,1-ipopt:ne);
2244+end
2245+
2246+% convolution with a gaussian (smooth minor changes, highlight relevants)
2247+a = 0;
2248+b = 0.10;
2249+x = -5:0.1:5;
2250+f = exp(-((x-a).^2)/(2*(b^2))) / (sqrt(2*pi*(b^2)));
2251+f = f/trapz(f);
2252+
2253+dos_dif = dosB - dosA;
2254+
2255+maxdif = max(abs(dos_dif(:))); % keep max unaltered after conv
2256+if nq==1
2257+ dos_dif = conv(f,dos_dif,'same');
2258+else
2259+ dos_dif = conv2(f,f,dos_dif,'same');
2260+end
2261+dos_dif = dos_dif*maxdif/max(abs(dos_dif(:)));
2262+
2263+% --------- Plot of the density --------- figure size:
2264+% [x0, y0, w, h]
2265+set(gcf,'Units','Normalized','OuterPosition',[0.4, 0.3, 0.55, 0.65]);
2266+
2267+ % emax = 2.0;
2268+ % emin = -2.0;
2269+ zlimit = max(abs(dos_dif(:)));
2270+
2271+if nq==1 % if Gamma point only
2272+ plot(e,dos_dif)
2273+ xlabel('Energy')
2274+ ylabel('DOS')
2275+ grid on
2276+
2277+else
2278+ s = surf(qpath',e',dos_dif');
2279+ s.EdgeColor = 'none';
2280+ axis([qpath(1),qpath(end),emin,emax,-zlimit,zlimit])
2281+ caxis([-zlimit,zlimit])
2282+
2283+ view(2);
2284+ colormap jet;
2285+ set(gca,'FontSize',14);
2286+ ylabel('Energy (eV)');
2287+ zlabel('LDOS');
2288+ h = colorbar;
2289+ set(get(h,'label'),'string','LDOS_{bulk} - LDOS_{defect} (eV^{-1})');
2290+
2291+ % Plot line edges and Fermi levels
2292+ hold on
2293+ clr = [0.85,0.325,0.098];
2294+
2295+ lineEnd = find(iline(1:nq-1)<iline(2:nq));
2296+ for jl = 1:numel(lineEnd)
2297+ il = lineEnd(jl);
2298+ plot3(qpath(il)*[1,1],[emin,emax],[zlimit,zlimit],'Color',clr,'LineStyle',':')
2299+ end
2300+ plot3(qpath(end)*[1,1],[emin,emax],[zlimit,zlimit],'Color',clr,'LineStyle',':')
2301+
2302+ plot3([qpath(1),qpath(end)],0*[1,1],[zlimit,zlimit],'Color','k') % Fermi A (non-def)
2303+ plot3([qpath(1),qpath(end)],(efermiB-efermiA)*[1,1],[zlimit,zlimit],'Color','r') % Fermi B (defective)
2304+
2305+ xticks( [qpath((lineEnd(1:1:numel(lineEnd)))),qpath(end)] );
2306+ xticklabels( [ label(lineEnd(1:1:numel(lineEnd))); label(nq) ] );
2307+
2308+ hold off
2309+end
2310+
2311+% -------------------------------------------------------------------------
2312
2313=== added file 'Util/Unfolding/Src/plotdos.m'
2314--- Util/Unfolding/Src/plotdos.m 1970-01-01 00:00:00 +0000
2315+++ Util/Unfolding/Src/plotdos.m 2019-09-12 09:33:19 +0000
2316@@ -0,0 +1,119 @@
2317+% plotdos.m
2318+% Plots a DOS file written by unfold.F90
2319+% SGM & JMS, Oct.2018 (mod. May 2019)
2320+
2321+clear all
2322+wdir = '../path_to_file/';
2323+syslabel = 'SystemLabel';
2324+fname = [wdir,syslabel,'.refoldedBands']; % .path, .spin
2325+
2326+file = fopen(fname); % Read DOS files
2327+dat = fscanf(file,'%d %d %f %f %f',5);
2328+ nq = dat(1);
2329+ ne = dat(2);
2330+ emin = dat(3);
2331+ emax = dat(4);
2332+ Fermi = dat(5);
2333+
2334+q = zeros(3,nq);
2335+dos = zeros(nq,ne);
2336+label = string(zeros(nq,1));
2337+for iq = 1:nq
2338+ q(:,iq) = fscanf(file,'%f %f %f',3);
2339+ iline(iq) = fscanf(file,'%i',1);
2340+ label(iq) = fscanf(file,'%10c',1);
2341+ dos(iq,:) = fscanf(file,'%f',ne);
2342+end
2343+fclose(file);
2344+
2345+% adjust labels to MATLAB style
2346+for iq=1:nq
2347+ if (label(iq)==' Gamma ')
2348+ label(iq)='\Gamma';
2349+ elseif (label(iq)==' '' '' ')
2350+ label(iq)=' ';
2351+ else
2352+ label(iq)=strtrim(label(iq));
2353+ end
2354+end
2355+
2356+
2357+for ix=1:3
2358+ dq(ix,:) = diff(q(ix,:));
2359+end
2360+dq = sqrt(sum(dq.^2));
2361+qpath = [0,cumsum(dq)];
2362+
2363+emin = emin - Fermi;
2364+emax = emax - Fermi;
2365+de = (emax-emin)/(ne-1);
2366+e = emin:de:emax;
2367+[qpath,e] = ndgrid(qpath,e);
2368+
2369+
2370+% convolution with a gaussian (smooth)
2371+a = 0;
2372+b = 0.03;
2373+x = -5:0.1:5;
2374+f = exp(-((x-a).^2)/(2*(b^2))) / (sqrt(2*pi*(b^2)));
2375+f = f/trapz(f);
2376+dos = conv2(f,f,dos,'same');
2377+
2378+% --------- Plot of the density --------- figure size:
2379+figure(1) % [x0, y0, w, h]
2380+set(gcf,'Units','Normalized','OuterPosition',[0.40, 0.05, 0.6, 0.7]);
2381+
2382+PlotLog = 0;
2383+zlim = max(dos(:));
2384+zsat = zlim*1.0e-3; % saturation for log scale
2385+
2386+% emax = 1.5;
2387+% emin = -1.5;
2388+
2389+
2390+if PlotLog == 0 % normal
2391+ s = surf(qpath',e',dos');
2392+ s.EdgeColor = 'none';
2393+ axis([qpath(1),qpath(end),emin,emax,0,zlim])
2394+ caxis([0,zlim]);
2395+else % log
2396+ s = surf(qpath',e',max(dos,zsat)');
2397+ set(gca,'colorscale','log');
2398+ axis([qpath(1),qpath(end),emin,emax,zsat,zlim])
2399+ caxis([zsat,zlim]);
2400+end
2401+
2402+s.EdgeColor = 'none';
2403+set(gca,'FontSize',14);
2404+ylabel('Energy (eV)');
2405+zlabel('LDOS');
2406+
2407+view(2);
2408+colormap(flipud(bone));
2409+h = colorbar;
2410+h.TickLength = 0.03;
2411+set(get(h,'label'),'string',' LDOS (eV^{-1})');
2412+
2413+% line edges and fermi level
2414+hold on
2415+cpl = [0.8,0.7,0.75];
2416+cfl = [0.92,0.59,0.59];
2417+
2418+lineEnd = find(iline(1:nq-1)<iline(2:nq));
2419+for jl = 1:numel(lineEnd)
2420+ il = lineEnd(jl);
2421+ plot3(qpath(il)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2422+end
2423+plot3(qpath(end)*[1,1],[emin,emax],[zlim,zlim],'Color',cpl,'LineStyle',':')
2424+
2425+plot3([qpath(1),qpath(end)],0*[1,1],[zlim,zlim],'Color',cfl,'LineStyle',':','LineWidth',0.5)
2426+
2427+xticks( [qpath((lineEnd(1:1:numel(lineEnd)))),qpath(end)] );
2428+xticklabels( [ label(lineEnd(1:1:numel(lineEnd))); label(nq) ] );
2429+hold off
2430+
2431+% To specify labels:
2432+% xticklabels({'\Gamma\color{gray}(000)','X','L'});
2433+
2434+% ----------------------------------------------------------
2435+
2436
2437=== added file 'Util/Unfolding/Src/plotmesh.m'
2438--- Util/Unfolding/Src/plotmesh.m 1970-01-01 00:00:00 +0000
2439+++ Util/Unfolding/Src/plotmesh.m 2019-09-12 09:33:19 +0000
2440@@ -0,0 +1,90 @@
2441+% plotmesh.m
2442+% Plot a surface of qDOS writen by unfold in a 2D mesh of
2443+% q points. Reads a colection of .pathN files written by
2444+% unfold. The UnfoldedBandLines block can be generated with
2445+% the program meshgen.
2446+% SGM & JMS, April 2019
2447+
2448+clear all
2449+ry = 13.60580; % one ry in eV
2450+wmin = 1.e-4;
2451+
2452+% Change this:
2453+ npaths = 25; % number of files to read
2454+ wdir = '../path_to_files/'; % path to files
2455+ syslabel = 'SystemLabel'; % Siesta label
2456+ flabel = '.refoldedBands.path'; % unfolded or refolded
2457+
2458+for ipath=1:npaths
2459+ spath = num2str(ipath); % turns number into string
2460+ fname = [wdir,syslabel,flabel,spath];
2461+
2462+ file = fopen(fname);
2463+ dat = fscanf(file,'%d %d %f %f %f',5);
2464+ nq = dat(1); ne = dat(2);
2465+ emin = dat(3); emax = dat(4);
2466+ Fermi = dat(5);
2467+
2468+ if ipath==1
2469+ q = zeros(3,nq,npaths);
2470+ dos = zeros(nq,npaths,ne); % label = string(zeros(nq,1,npaths));
2471+ end
2472+
2473+ for iq = 1:nq
2474+ q(:,iq,ipath) = fscanf(file,'%f %f %f',3);
2475+ fscanf(file,'%i',1); % iline(iq,ipath) =
2476+ fscanf(file,'%10c',1); % label(iq) =
2477+ dos(iq,ipath,:) = fscanf(file,'%f',ne);
2478+ end
2479+ fclose(file);
2480+end
2481+
2482+emin = emin - Fermi;
2483+emax = emax - Fermi;
2484+de = (emax-emin)/(ne-1);
2485+emesh = emin:de:emax;
2486+
2487+qx(:) = q(1,1,:);
2488+qy(:) = q(2,:,1);
2489+[qx,qy,emesh] = ndgrid(qx,qy,emesh);
2490+
2491+dos = permute(dos,[2,1,3]);
2492+
2493+dos = dos+1e-30;
2494+ie = 2:ne-1;
2495+dos2(:,:, 1,2) = dos(:,:,1); % unfold splits dos in two ie
2496+dos2(:,:,ne,1) = dos(:,:,ne);
2497+dos2(:,:,ie,1) = dos(:,:,ie).*dos(:,:,ie-1)./(dos(:,:,ie-1)+dos(:,:,ie+1));
2498+dos2(:,:,ie,2) = dos(:,:,ie).*dos(:,:,ie+1)./(dos(:,:,ie-1)+dos(:,:,ie+1));
2499+ie = 1:ne-1;
2500+w(:,:,ie) = (dos2(:,:,ie,2)+dos2(:,:,ie+1,1));
2501+e(:,:,ie) = (emesh(:,:,ie).*dos2(:,:,ie,2)+...
2502+ emesh(:,:,ie+1).*dos2(:,:,ie+1,1))./w(:,:,ie);
2503+ne = ne-1;
2504+e(:,:,ie+1)=e(:,:,ie);
2505+w(:,:,ie+1)=w(:,:,ie);
2506+
2507+% Select points with some significant weight
2508+iqe = find(w(:)>wmin);
2509+qx = qx(iqe);
2510+qy = qy(iqe);
2511+e = e(iqe);
2512+w = w(iqe);
2513+w = w/max(w);
2514+
2515+[~,iw] = sort(w);
2516+w = w(iw);
2517+qx = qx(iw);
2518+qy = qy(iw);
2519+e = e(iw);
2520+nqe = numel(e);
2521+
2522+ptsize = 75; % size of dots
2523+scatter3(qx,qy,e,ptsize*w.^1.1,w,'filled');
2524+
2525+colormap(flipud(bone));
2526+xlabel('k_y')
2527+xlabel('k_x')
2528+zlabel('Energy')
2529+
2530+
2531
2532=== added file 'Util/Unfolding/Src/unfold.F90'
2533--- Util/Unfolding/Src/unfold.F90 1970-01-01 00:00:00 +0000
2534+++ Util/Unfolding/Src/unfold.F90 2019-09-12 09:33:19 +0000
2535@@ -0,0 +1,661 @@
2536+! ---
2537+! Copyright (C) 1996-2016 The SIESTA group
2538+! This file is distributed under the terms of the
2539+! GNU General Public License: see COPYING in the top directory
2540+! or http://www.gnu.org/copyleft/gpl.txt .
2541+! See Docs/Contributors.txt for a list of contributors.
2542+! ---
2543+
2544+program unfold
2545+
2546+! Reads the .fdf, .ion, .HSX, .EIG and .psf files of a SIESTA calculation and
2547+! generates unfolded and refolded bands. See Util/Unfolding/README for details.
2548+! Ref: "Band unfolding made simple", S.G.Mayo and J.M.Soler, Dic.2018
2549+! arXiv:1812.03925 ( https://arxiv.org/abs/1812.03925 )
2550+! S.G.Mayo and J.M.Soler, Oct.2018
2551+
2552+ use alloc, only: alloc_report, de_alloc, re_alloc
2553+ use atmfuncs, only: lofio, mofio, nofis, rcut, rphiatm, zetafio
2554+ use basis_types, only: nsp
2555+ use basis_types, only: basis_parameters, initialize
2556+ use basis_io, only: read_basis_ascii
2557+ use cellsubs, only: reclat, volcel
2558+ use fdf, only: block_fdf, fdf_bintegers, fdf_bline, fdf_block, &
2559+ fdf_bmatch, fdf_bnames, fdf_bnnames, fdf_bnvalues, &
2560+ fdf_bvalues, fdf_convfac, fdf_get, fdf_init, &
2561+ fdf_parallel, parsed_line
2562+ use hsx_m, only: hsx_t, read_hsx_file
2563+ use m_array, only: array_copy
2564+ use m_get_kpoints_scale, &
2565+ only: get_kpoints_scale
2566+ use m_io, only: io_assign, io_close
2567+ use m_mpi_utils, only: broadcast
2568+#ifdef MPI
2569+ use m_diag_option,only: ParallelOverK, diag_serial=>Serial
2570+ use mpi_siesta, only: MPI_Comm_Rank, MPI_Comm_Size, MPI_Comm_World, &
2571+ MPI_double_precision, MPI_Init, MPI_Finalize, &
2572+ MPI_Reduce, MPI_Sum
2573+#endif
2574+ use m_radfft, only: radfft
2575+ use m_timer, only: timer_init, timer_report, timer_start, timer_stop
2576+ use parallel, only: Nodes, Node
2577+ use precision, only: dp, sp
2578+ use spher_harm, only: lofilm, rlylm
2579+ use siesta_geom, only: ucell, xa, isa ! unit cell, atomic coords and species
2580+ use sys, only: die
2581+
2582+
2583+ implicit none
2584+
2585+ ! Internal parameters
2586+ character(len=*),parameter:: myName = 'unfold '
2587+ integer, parameter :: nr = 4096 ! number of radial points for basis orbitals
2588+ integer, parameter :: maxl = 5 ! max angular momentum
2589+ integer, parameter :: maxpaths = 150 ! max number of unfolded band paths
2590+ integer, parameter :: maxnq = 22000 ! max number of q sampling points
2591+ real(dp),parameter :: g2c = 50_dp ! default refolding G cutoff (ry)
2592+ real(dp),parameter :: qc = 50_dp ! cutoff for FT of atomic orbitals (bohr^-1)
2593+ logical, parameter :: writeOrbitals = .false. ! write atomic orbital files?
2594+ real(dp),parameter :: tolSuperCell = 5.e-5 ! tolerance for comparing cell and supercell
2595+ integer, parameter :: allocReportLevelDefault = 2 ! default allocation report level
2596+
2597+ ! Internal variables
2598+ integer :: i, i1, i2, i3, ia, iao, ib, ic, ie, ierr, ig, ij, &
2599+ io, ios, iostat, iou, ipath, iq, iq1, iq2, iqNode, iqx(3), &
2600+ ir, irq, iscf, isp, ispin, itag, iu, j, je, jk, jlm, jo, jos, jou, &
2601+ kdsc(3,3), kscell(3,3), l, lastq(0:maxpaths), level, ll, lmax, &
2602+ m, maxig(3), maxorb, myNode, na, nbands, ne, ng, nh, nlm, nn, &
2603+ nNodes, nos, nou, npaths, nq, nqline, nrq, nspin, ntmp, nw, t, z
2604+ real(dp) :: alat, c0, cdos, cellRatio(3,3), ddos, de, dek, dq, dqpath(3), &
2605+ dqx(3), dr, drq, dscell(3,3), emax, emin, efermi, &
2606+ gcut, gnew(3), gnorm, gq(3), grad, gylm(3,maxl*maxl), &
2607+ kq(3), kxij, pi, &
2608+ qmod, qcell(3,3), qg(3), qline(3), qmax, qx(3), &
2609+ r, rc, rcell(3,3), refoldCell(3,3), refoldBcell(3,3), rmax, rq, &
2610+ scell(3,3), threshold, vol, we, wq, xmax, ylm(maxl*maxl)
2611+ complex(dp) :: ck, ii, phase, phi, psik, ukg
2612+ logical :: found, gamma, notSuperCell, refolding
2613+ character(len=50):: eunit, fname, formatstr, iostr, isstr, numstr, slabel
2614+ character(len=20):: labelfis, symfio
2615+ character(len=200):: line
2616+ character(len=10):: label(maxnq), string
2617+ character(len=80):: dumm
2618+ type(block_fdf) :: bfdf
2619+ type(hsx_t) :: hsx
2620+
2621+ integer :: nx
2622+ real(dp):: dg, drmin, dx, g0(3), gmod, gvec(3), normphiq, normphir, x(3), wr, xmod
2623+
2624+ ! Allocatable arrays and pointers
2625+ integer, pointer:: iline(:)=>null()
2626+ real(dp), pointer:: eb(:,:)=>null(), &
2627+ phir(:,:,:)=>null(), phiq(:,:,:)=>null(), &
2628+ rdos(:,:,:)=>null(), udos(:,:,:)=>null(), &
2629+ tmp1(:)=>null(), tmp2(:)=>null()
2630+ real(dp), pointer:: g(:,:)=>null(), q(:,:)=>null()
2631+ complex(dp), pointer:: h(:,:)=>null(), psi(:,:,:)=>null(), s(:,:)=>null()
2632+ logical, pointer:: cc(:,:,:)=>null()
2633+ type(parsed_line),pointer:: pline=>null()
2634+
2635+!--------------------
2636+
2637+! Initialize MPI
2638+#ifdef MPI
2639+ call MPI_Init( ierr )
2640+ call MPI_Comm_Rank( MPI_Comm_World, Node, ierr )
2641+ call MPI_Comm_Size( MPI_Comm_World, Nodes, ierr )
2642+ myNode = Node
2643+ nNodes = Nodes
2644+#else
2645+ myNode = 0
2646+ nNodes = 1
2647+#endif
2648+
2649+ ! Initialize input
2650+#ifdef MPI
2651+ if (.not.fdf_parallel()) &
2652+ call die('unfold ERROR: FDF has no parallel support')
2653+#endif
2654+ call fdf_init( fileOutput='unfold.fdflog', unitInput=5 )
2655+
2656+ ! Initialize timer
2657+ threshold = fdf_get('TimerReportThreshold', 0._dp)
2658+ call timer_report( file='unfold.times', threshold=threshold )
2659+ call timer_init()
2660+ call timer_start(myName//'init')
2661+
2662+ ! Set allocation report parameters
2663+ level = fdf_get( 'AllocReportLevel', AllocReportLevelDefault )
2664+ threshold = fdf_get( 'AllocReportThreshold', 0._dp )
2665+ call alloc_report( level, file='unfold.alloc', printNow=.false., threshold=threshold )
2666+
2667+ ! Read Fermi level from SystemLabel.out file
2668+! if (myNode==0) then
2669+! call system('grep ''Fermi = '' *out -h > fermi')
2670+! open(8181,file='fermi',action='read')
2671+! read(8181,'(a)') dumm
2672+! ic = index(dumm,'=')
2673+! read(dumm(ic+1:),*) efermi
2674+! print*,'unfold: Fermi = ',efermi
2675+! call system('rm fermi')
2676+! close(8181)
2677+! endif
2678+
2679+ ! Read Fermi level from SystemLabel.EIG file
2680+ slabel = fdf_get('SystemLabel','unknown')
2681+ if (myNode==0) then
2682+ fname = trim(slabel)//'.EIG'
2683+ open(8181,file=fname,action='read')
2684+ read(8181,*) efermi
2685+ print*,'unfold: Fermi = ',efermi
2686+ endif
2687+
2688+ ! Read atomic basis
2689+ if (myNode==0) then
2690+ print*,'unfold: reading atomic orbitals'
2691+ allocate(basis_parameters(nsp))
2692+ do isp=1,nsp
2693+ call initialize(basis_parameters(isp))
2694+ enddo
2695+ call read_basis_ascii(nsp)
2696+ endif
2697+ call broadcast(nsp)
2698+ call broadcast_basis()
2699+
2700+ ! Allocate arrays for atomic orbitals
2701+ maxorb = 0 ! max. number of orbitals in any atom
2702+ do isp=1,nsp
2703+ maxorb = max(maxorb,nofis(isp))
2704+ enddo
2705+ call re_alloc( phir, 0,nr, 1,nsp, 1,maxorb, myName//'phir' )
2706+ call re_alloc( phiq, 0,nr, 1,nsp, 1,maxorb, myName//'phiq' )
2707+
2708+ ! Find cutoffs of atomic orbitals
2709+ lmax = 0
2710+ rmax = 0
2711+ do isp = 1,nsp ! species index
2712+ do io = 1,nofis(isp) ! orbital index within species
2713+ rmax = max(rmax,rcut(isp,io))
2714+ lmax = max(lmax,lofio(isp,io))
2715+ enddo ! io
2716+ enddo ! isp
2717+ if (myNode==0) print*, 'lmax,rmax=',lmax,rmax
2718+
2719+ ! Find atomic orbitals in real space
2720+ pi = acos(-1._dp)
2721+ nq = nr
2722+ dq = qc/nr ! radial interval in reciprocal space
2723+ dr = pi/qc ! radial interval in real space
2724+ rc = nr*dr ! radial cutoff in real space
2725+ do isp = 1,nsp ! species index
2726+ do io = 1,nofis(isp) ! orbital index within species
2727+! write(6,*) "# Orbital (#, l, z, m, rc):", &
2728+! lofio(isp,io), zetafio(isp,io), mofio(isp,io), rcut(isp,io)
2729+ do ir=0,nr
2730+ r = dr*ir
2731+ call rphiatm(isp,io,r,phir(ir,isp,io),grad)
2732+ enddo
2733+ enddo ! io
2734+ enddo ! isp
2735+ if (myNode==0) then
2736+ print*,'unfold: nr,dr,rc=',nr,dr,rc
2737+ print*,'unfold: nq,dq,qc=',nq,dq,qc
2738+ if (nq .gt. maxnq) &
2739+ call die('unfold ERROR: parameter maxnq is too small')
2740+ print'(a,/,(2i4,f12.6))','unfold: isp,io,rc=', &
2741+ ((isp,io,rcut(isp,io),io=1,nofis(isp)),isp=1,nsp)
2742+ endif
2743+
2744+ ! Fourier transform atomic orbitals
2745+ if (myNode==0) print*,'unfold: Fourier-transforming atomic orbitals'
2746+ do isp = 1,nsp
2747+ do io = 1,nofis(isp)
2748+ call radfft(lofio(isp,io),nr,rc,phir(:,isp,io),phiq(:,isp,io))
2749+ enddo
2750+ enddo
2751+
2752+ ! Write radial dependence of atomic orbitals in real and reciprocal space
2753+ if (myNode==0 .and. writeOrbitals) then
2754+ do isp = 1,nsp
2755+ do io = 1,nofis(isp)
2756+ write(isstr,*) isp
2757+ write(iostr,*) io
2758+ fname = 'species'//trim(adjustl(isstr))//'orbital'//trim(adjustl(iostr))//'.r'
2759+ call io_assign(iu)
2760+ open(iu,file=fname,status='unknown',form='formatted',action='write')
2761+ write(iu,'(2f12.6)') (ir*dr,phir(ir,isp,io),ir=0,nr)
2762+ call io_close(iu)
2763+ fname = 'species'//trim(adjustl(isstr))//'orbital'//trim(adjustl(iostr))//'.q'
2764+ open(iu,file=fname,status='unknown',form='formatted',action='write')
2765+ write(iu,'(2f12.6)') (iq*dq,phiq(iq,isp,io),iq=0,nq)
2766+ call io_close(iu)
2767+ enddo
2768+ enddo
2769+ endif
2770+
2771+ ! Find norm of atomic orbitals in real space, as a check
2772+! gcut = sqrt( fdf_get('RefoldingGcutoff',g2c,'ry') )
2773+! xmax = rmax+1
2774+! dx = pi/gcut
2775+! nx = ceiling(xmax/dx)
2776+! if (myNode==0) print*,'unfold: dx,nx=',dx,nx
2777+! do isp = 1,nsp ! species index
2778+! do io = 1,nofis(isp) ! orbital index within species
2779+! l = lofio(isp,io)
2780+! m = mofio(isp,io)
2781+! jlm = l*(l+1) + m+1 !! ilm(l,m)
2782+! normphir = 0
2783+! do i3 = -nx,nx
2784+! do i2 = -nx,nx
2785+! do i1 = -nx,nx
2786+! x = (/i1,i2,i3/)*dx
2787+! xmod = sqrt(sum(x**2))+1.e-15_dp
2788+! ir = ceiling(xmod/dr)
2789+! wr = (ir*dr-xmod)/dr
2790+! if (ir<=nr) then
2791+! phi = phir(ir-1,isp,io)*(1-wr) + phir(ir,isp,io)*wr
2792+! call rlylm(l,x/xmod,ylm,gylm)
2793+! phi = phi*ylm(jlm)
2794+! normphir = normphir + abs(phi)**2*dx**3
2795+! endif
2796+! enddo
2797+! enddo
2798+! enddo
2799+! if (myNode==0) print*,'ulfold: isp,io,norm(phi(r))=',isp,io,normphir
2800+! enddo
2801+! enddo
2802+
2803+ ! Find norm of atomic orbitals in reciprocal space, as a check
2804+! dg = 2*pi/(2*xmax)
2805+! ng = ceiling(gcut/dg)
2806+! if (myNode==0) print*,'unfold: dg,ng=',dg,ng
2807+! do isp = 1,nsp ! species index
2808+! do io = 1,nofis(isp) ! orbital index within species
2809+! l = lofio(isp,io)
2810+! m = mofio(isp,io)
2811+! jlm = l*(l+1) + m+1 !! ilm(l,m)
2812+! normphiq = 0
2813+! do i3 = -ng,ng
2814+! do i2 = -ng,ng
2815+! do i1 = -ng,ng
2816+! gvec = (/i1,i2,i3/)*dg
2817+! gmod = sqrt(sum(gvec**2))+1.e-15_dp
2818+! iq = ceiling(gmod/dq)
2819+! wq = (iq*dq-gmod)/dq
2820+! if (iq<=nq) then
2821+! phi = phiq(iq-1,isp,io)*(1-wq) + phiq(iq,isp,io)*wq
2822+! call rlylm(l,gvec/gmod,ylm,gylm)
2823+! phi = phi*ylm(jlm)
2824+! normphiq = normphiq + abs(phi)**2*dg**3
2825+! endif
2826+! enddo
2827+! enddo
2828+! enddo
2829+! if (myNode==0) print*,'ulfold: isp,io,norm(phi(q))=',isp,io,normphiq
2830+! enddo
2831+! enddo
2832+
2833+ ! Find unit cell and initialize atomic coords
2834+ if (myNode==0) print'(a,/,(3f12.6))','unfold: reading system geometry'
2835+ alat = fdf_get('LatticeConstant',1._dp,'bohr')
2836+ call coor(na,ucell) ! atomic coordinates xa stored in module siesta_geom
2837+ vol = volcel(ucell) ! unit cell volume
2838+ call reclat(ucell,rcell,1) ! rcell = reciprocal cell vectors
2839+ if (myNode==0) then
2840+ print'(a,/,(2i6,3f12.6))','unfold: ia,ispecies,xa (bohr) =', &
2841+ (ia,isa(ia),xa(:,ia),ia=1,na)
2842+ print'(a,f20.6,/,(3f21.15))','unfold: vol, unit_cell (bohr) =',vol,ucell
2843+ print'(a,/,(3f21.15))','unfold: reciprocal_cell (1/bohr) =',rcell
2844+ endif
2845+
2846+ ! Read HSX file with H, S, and xij matrices
2847+! slabel = fdf_get('SystemLabel','unknown')
2848+ fname = trim(slabel)//'.HSX'
2849+ if (myNode==0) then
2850+ call read_hsx_file(hsx,fname)
2851+ if (hsx%nspecies/=nsp) call die('unfold ERROR: hsx%nspecies/=nsp')
2852+ if (hsx%na_u/=na) call die('unfold ERROR: hsx%na_u/=na')
2853+ endif
2854+ call broadcast(hsx%nspecies)
2855+ call broadcast(hsx%na_u)
2856+ call broadcast(hsx%no_u)
2857+ call broadcast(hsx%no_s)
2858+ call broadcast(hsx%nspin)
2859+ call broadcast(hsx%nh)
2860+ nou = hsx%no_u
2861+ nos = hsx%no_s
2862+ nh = hsx%nh
2863+ nspin = hsx%nspin
2864+ if (myNode/=0) then
2865+ call re_alloc(hsx%iaorb, 1,nou, myName//'hsx%iaorb')
2866+ call re_alloc(hsx%iphorb, 1,nou, myName//'hsx%iphorb')
2867+ call re_alloc(hsx%numh, 1,nou, myName//'hsx%numh')
2868+ call re_alloc(hsx%listhptr, 1,nou, myName//'hsx%listhptr')
2869+ call re_alloc(hsx%listh, 1,nh, myName//'hsx%listh')
2870+ call re_alloc(hsx%indxuo, 1,nos, myName//'hsx%indxuo')
2871+ call re_alloc(hsx%hamilt, 1,nh, 1,nspin, myName//'hsx%hamilt')
2872+ call re_alloc(hsx%Sover, 1,nh, myName//'hsx%Sover')
2873+ call re_alloc(hsx%xij, 1,3, 1,nh, myName//'hsx%xij')
2874+ endif
2875+ call broadcast(hsx%iaorb)
2876+ call broadcast(hsx%iphorb)
2877+ call broadcast(hsx%numh)
2878+ call broadcast(hsx%listhptr)
2879+ call broadcast(hsx%listh)
2880+ call broadcast(hsx%indxuo)
2881+ call broadcast(hsx%hamilt)
2882+ call broadcast(hsx%Sover)
2883+ call broadcast(hsx%xij)
2884+
2885+ ! Read fdf block UnfoldedBandLines
2886+ if (myNode==0) print*,'unfold: reading UnfoldedBandLines block'
2887+ call get_kpoints_scale('BandLinesScale',qcell,ierr)
2888+ if (ierr/=0) &
2889+ call die('unfold: ERROR calling get_kpoints_scale')
2890+ found = fdf_block('UnfoldedBandLines',bfdf)
2891+ if (.not.found) &
2892+ call die('unfold ERROR: fdf block UnfoldedBandLines not found')
2893+ if (.not.(fdf_bline(bfdf,pline).and.fdf_bmatch(pline,'ivvs'))) &
2894+ call die('unfold ERROR: wrong format in fdf block UnfoldedBandLines')
2895+ ne = fdf_bintegers(pline,1)
2896+ eunit = fdf_bnames(pline,1) ! energy unit
2897+ emin = fdf_bvalues(pline,1,after=1)
2898+ emax = fdf_bvalues(pline,2,after=1)
2899+ npaths = 0
2900+ nq = 0
2901+ lastq(0) = 0
2902+ label = ' '
2903+
2904+ do while( fdf_bline(bfdf,pline) ) ! bline and pline refer to text lines, not q lines
2905+
2906+ nn = fdf_bnnames(pline)
2907+
2908+ if (fdf_bmatch(pline,'ivvv').or.fdf_bmatch(pline,'ivvvs')) then
2909+ nqline = fdf_bintegers(pline,1) ! number of q points in line
2910+ qline = qcell(:,1)*fdf_bvalues(pline,1,after=1) &
2911+ + qcell(:,2)*fdf_bvalues(pline,2,after=1) &
2912+ + qcell(:,3)*fdf_bvalues(pline,3,after=1)
2913+
2914+ if (nqline==1) then
2915+ npaths = npaths+1
2916+ if (npaths>maxpaths) &
2917+ call die('unfold ERROR: parameter maxpaths is too small')
2918+ nq = nq+1
2919+ call re_alloc( q, 1,3, 1,nq, myName//'q' )
2920+ call re_alloc( iline, 1,nq, myName//'iline' )
2921+ q(:,nq) = qline
2922+ iline(nq) = 1
2923+ if(nn .gt. 0) label(nq) = fdf_bnames(pline,1) ! q label for plot
2924+ else
2925+ call re_alloc( q, 1,3, 1,nq+nqline, myName//'q' )
2926+ call re_alloc( iline, 1,nq+nqline, myName//'iline' )
2927+ do iq = 1,nqline
2928+ q(:,nq+iq) = q(:,nq) + (qline-q(:,nq))*iq/nqline
2929+ iline(nq+iq) = iline(nq)+1
2930+ enddo
2931+ nq = nq+nqline
2932+ if(nn .gt. 0) label(nq) = fdf_bnames(pline,1)
2933+ endif
2934+
2935+ lastq(npaths) = nq
2936+ else
2937+ call die('unfold ERROR: wrong format in fdf block UnfoldedBandLines')
2938+ endif
2939+ enddo
2940+
2941+ ! Read fdf block RefoldingLatticeVectors
2942+ if (myNode==0) print*,'unfold: reading RefoldingLatticeVectors block'
2943+ gcut = sqrt( fdf_get('RefoldingGcutoff',g2c,'ry') )
2944+ refolding = fdf_block('RefoldingLatticeVectors',bfdf)
2945+ if (refolding) then
2946+ if (myNode==0) print*,'unfold: block RefoldingLatticeVectors found'
2947+ do j = 1,3
2948+ if (.not.(fdf_bline(bfdf,pline).and.fdf_bmatch(pline,'vvv'))) &
2949+ call die('unfold ERROR: wrong format in fdf block RefoldingLatticeVectors')
2950+ do i = 1,3
2951+ refoldCell(i,j) = fdf_bvalues(pline,i)*alat
2952+ enddo
2953+ enddo
2954+ call reclat(refoldCell,refoldBcell,1)
2955+ maxig = ceiling(gcut*sqrt(sum(refoldCell**2,dim=1))/(2*pi))
2956+ ng = 0
2957+ do i3 = -maxig(3),maxig(3)
2958+ do i2 = -maxig(2),maxig(2)
2959+ do i1 = -maxig(1),maxig(1)
2960+ gnew = refoldBcell(:,1)*i1 + refoldBcell(:,2)*i2 + refoldBcell(:,3)*i3
2961+ gnorm = sqrt(sum(gnew**2))
2962+ if (gnorm<gcut) then
2963+ ng = ng+1
2964+ call re_alloc( g, 1,3, 1,ng, myName//'g', copy=.true. )
2965+ g(:,ng) = gnew
2966+ endif
2967+ enddo
2968+ enddo
2969+ enddo
2970+ else
2971+ refoldCell = 0
2972+ refoldBcell = 0
2973+ ng = 1
2974+ call re_alloc( g, 1,3, 1,ng, myName//'g' )
2975+ g(:,1) = 0
2976+ endif
2977+ if (myNode==0) print'(a,/,(3f12.6))','unfold: refoldCell=',refoldCell
2978+ if (myNode==0) print'(a,/,(3f12.6))','unfold: refoldBcell=',refoldBcell
2979+ if (myNode==0) print*,'unfold: alat,gcut,ng=',alat,gcut,ng
2980+
2981+ ! Find if simulation cell is a supercell of refold cell
2982+ cellRatio = matmul(transpose(refoldBcell),ucell)/(2*pi)
2983+ notSuperCell = .not.all(abs(cellRatio-nint(cellRatio))<tolSuperCell)
2984+ if (myNode==0) print'(a,l,a,/,(3f12.6))', &
2985+ 'unfold: notSuperCell= ',notSuperCell,' cellRatio=',cellRatio
2986+
2987+ ! Set some constants
2988+ ii = cmplx(0,1,dp)
2989+ nlm = (lmax+1)**2
2990+ c0 = (2*pi)**1.5_dp / vol
2991+ de = (emax-emin)/ne
2992+ cdos = 1.0 ! 1/(2*pi)**3
2993+ ParallelOverK = .true.
2994+ diag_serial = .true.
2995+ nbands = nou
2996+ iscf = 1
2997+ call re_alloc( h, 1,nou, 1,nou, myName//'h' )
2998+ call re_alloc( s, 1,nou, 1,nou, myName//'s' )
2999+ call re_alloc( psi, 1,nou, 1,nou, 1,nspin, myName//'psi' )
3000+ call re_alloc( eb, 1,nou, 1,nspin, myName//'eb' )
3001+
3002+ ! Main loops on unfolded band paths and q vectors along them
3003+ call timer_stop(myName//'init')
3004+ call timer_start(myName//'main loop')
3005+ if (myNode==0) print*,'unfold: main loop'
3006+ do ipath = 1,npaths
3007+ if (myNode==0) print*,'unfold: ipath',ipath,'of',npaths
3008+ iq1 = lastq(ipath-1)+1
3009+ iq2 = lastq(ipath)
3010+ call re_alloc( udos, iq1,iq2, 0,ne, 1,nspin, myName//'udos', &
3011+ copy=.false., shrink=.true. )
3012+ if (refolding) &
3013+ call re_alloc( rdos, iq1,iq2, 0,ne, 1,nspin, myName//'rdos', &
3014+ copy=.false., shrink=.true. )
3015+ udos = 0
3016+ do iq = iq1,iq2
3017+ iqNode = mod((iq-1),nNodes)
3018+ if (myNode==iqNode) then
3019+ do ig = 1,ng
3020+ gnorm = sqrt(sum(g(:,ig)**2))
3021+ qg = q(:,iq)+g(:,ig) ! note: this is a refolding g, not a superlattice G
3022+ if (ig==1 .or. notSuperCell) then
3023+ qx = matmul(qg,ucell)/(2*pi) ! qg in mesh coords: qg=matmul(rcell,qx)
3024+ kq = matmul(rcell,qx-nint(qx)) ! q+g translated to FBZ of SC, i.e. kq=k+g-G
3025+ endif
3026+ gq = qg-kq ! supercell G vector
3027+ do ispin = 1,nspin
3028+
3029+ if (ig==1 .or. notSuperCell) then
3030+ call timer_start(myName//'diag')
3031+ h = 0
3032+ s = 0
3033+ do iou = 1,nou
3034+ do j = 1,hsx%numh(iou)
3035+ ij = hsx%listhptr(iou) + j
3036+ jos = hsx%listh(ij)
3037+ jou = hsx%indxuo(jos)
3038+ kxij = sum(kq*hsx%xij(:,ij))
3039+ phase = exp(ii*kxij)
3040+ s(iou,jou) = s(iou,jou) + hsx%Sover(ij)*phase
3041+ h(iou,jou) = h(iou,jou) + hsx%hamilt(ij,ispin)*phase
3042+ enddo
3043+ enddo
3044+ call cdiag(h,s,nou,nou,nou,eb(:,ispin),psi(:,:,ispin), &
3045+ nbands,iscf,ierr,-1)
3046+ if (ierr/=0) print*,'unfold: ERROR in cdiag'
3047+ eb(:,ispin) = eb(:,ispin)*fdf_convfac('ry',eunit) ! from Ry to eunit
3048+ call timer_stop(myName//'diag')
3049+ endif
3050+
3051+ call timer_start(myName//'g sum')
3052+ qmod = sqrt(sum(qg**2))+1.e-15_dp
3053+ call rlylm( lmax, qg/qmod, ylm, gylm )
3054+ do ib = 1,nbands
3055+ je = floor((eb(ib,ispin)-emin)/de)
3056+ dek = emin + (je+1)*de - eb(ib,ispin)
3057+ we = dek/de
3058+ ukg = 0
3059+ if (je>=-1 .and. je<=ne) then ! select energies
3060+ do io = 1,nou
3061+ ia = hsx%iaorb(io)
3062+ isp = isa(ia)
3063+ iao = hsx%iphorb(io)
3064+ l = lofio(isp,iao)
3065+ m = mofio(isp,iao)
3066+ jlm = l*(l+1) + m+1 ! ilm(l,m)
3067+ irq = floor(qmod/dq)
3068+ drq = (irq+1)*dq-qmod
3069+ wq = drq/dq
3070+ phi = phiq(irq,isp,iao)*wq + phiq(irq+1,isp,iao)*(1-wq)
3071+ phi = (-ii)**l * ylm(jlm) * phi
3072+ psik = c0*psi(io,ib,ispin)*phi*exp(-ii*sum(gq*xa(:,ia)))
3073+ ukg = ukg + psik
3074+ enddo ! io
3075+ ddos = cdos*vol*abs(ukg)**2
3076+ if (gnorm<1.e-12_dp) then
3077+ if (je>=0 .and. je<=ne) &
3078+ udos(iq,je,ispin) = udos(iq,je,ispin) + ddos*we
3079+ if (je>=-1 .and. je<ne) &
3080+ udos(iq,je+1,ispin) = udos(iq,je+1,ispin) + ddos*(1-we)
3081+ endif
3082+ if (refolding) then
3083+ if (je>=0 .and. je<=ne) &
3084+ rdos(iq,je,ispin) = rdos(iq,je,ispin) + ddos*we
3085+ if (je>=-1 .and. je<ne) &
3086+ rdos(iq,je+1,ispin) = rdos(iq,je+1,ispin) + ddos*(1-we)
3087+ endif
3088+ endif
3089+ enddo ! ib
3090+ call timer_stop(myName//'g sum')
3091+ enddo ! ispin
3092+ enddo ! ig
3093+ endif ! (myNode==iqNode)
3094+ enddo ! iq
3095+
3096+if (myNode==0) print*,'unfold: end of main loop'
3097+
3098+#ifdef MPI
3099+ ntmp = (iq2-iq1+1)*(ne+1)*nspin
3100+ call re_alloc( tmp1, 1,ntmp, myName//'tmp1', copy=.false., shrink=.true. )
3101+ call re_alloc( tmp2, 1,ntmp, myName//'tmp2', copy=.false., shrink=.true. )
3102+! tmp1 = reshape(udos,(/ntmp/))
3103+ call array_copy([1,1,1],[iq2-iq1+1,ne+1,nspin],udos, 1,ntmp,tmp1)
3104+ tmp2 = 0
3105+ call MPI_reduce(tmp1,tmp2,ntmp,MPI_double_precision,MPI_sum,0, &
3106+ MPI_COMM_WORLD,ierr)
3107+! udos(iq1:iq2,0:ne,:) = reshape(tmp2,(/iq2-iq1+1,ne+1,nspin/))
3108+ call array_copy(1,ntmp,tmp2, [1,1,1],[iq2-iq1+1,ne+1,nspin],udos)
3109+ if (refolding) then
3110+! tmp1 = reshape(rdos,(/ntmp/))
3111+ call array_copy([1,1,1],[iq2-iq1+1,ne+1,nspin],rdos, 1,ntmp,tmp1)
3112+ tmp2 = 0
3113+ call MPI_reduce(tmp1,tmp2,ntmp,MPI_double_precision,MPI_sum,0, &
3114+ MPI_COMM_WORLD,ierr)
3115+! rdos(iq1:iq2,0:ne,:) = reshape(tmp2,(/iq2-iq1+1,ne+1,nspin/))
3116+ call array_copy(1,ntmp,tmp2, [1,1,1],[iq2-iq1+1,ne+1,nspin],rdos)
3117+ endif
3118+#endif
3119+
3120+if (myNode==0) print*,'unfold: writing output files'
3121+
3122+ if (myNode==0) then
3123+ do ispin = 1,nspin
3124+ call io_assign(iu)
3125+ fname = trim(slabel)//'.unfoldedBands'
3126+ if (nspin==2 .and. ispin==1) then
3127+ fname = trim(fname)//'.spinUp'
3128+ elseif (nspin==2 .and. ispin==2) then
3129+ fname = trim(fname)//'.spinDn'
3130+ endif
3131+ if (npaths>1) then
3132+ write(numstr,*) ipath
3133+ fname = trim(fname)//'.path'//adjustl(numstr)
3134+ endif
3135+ open(iu,file=fname,status='unknown',form='formatted',action='write')
3136+ write(iu,'(2(i6),2(f10.3),f13.6)') &
3137+ lastq(ipath)-lastq(ipath-1),ne+1,emin,emax,efermi
3138+ do iq = iq1,iq2
3139+ if (label(iq) .eq. ' ') then
3140+ string = " "
3141+ else
3142+ string = ""//trim(label(iq))//""
3143+ endif
3144+ write(iu,'(3(f13.8),i5,a12)') q(:,iq), iline(iq), string
3145+ do j = 0,ne
3146+ write(iu,'(e15.6)') udos(iq,j,ispin)
3147+ enddo
3148+ enddo ! iq
3149+ call io_close(iu)
3150+
3151+ if (refolding) then
3152+ fname = trim(slabel)//'.refoldedBands'
3153+ if (nspin==2 .and. ispin==1) then
3154+ fname = trim(fname)//'.spinUp'
3155+ elseif (nspin==2 .and. ispin==2) then
3156+ fname = trim(fname)//'.spinDn'
3157+ endif
3158+ if (npaths>1) then
3159+ write(numstr,*) ipath
3160+ fname = trim(fname)//'.path'//adjustl(numstr)
3161+ endif
3162+ open(iu,file=fname,status='unknown',form='formatted',action='write')
3163+ write(iu,'(2(i6),2(f10.3),f13.6)') &
3164+ lastq(ipath)-lastq(ipath-1),ne+1,emin,emax,efermi
3165+ do iq = iq1,iq2
3166+ if (label(iq) .eq. ' ') then
3167+ string = "' '"
3168+ else
3169+ string = ""//trim(label(iq))//""
3170+ endif
3171+ write(iu,'(3(f13.8),i5,a12)') q(:,iq), iline(iq), string
3172+ do j = 0,ne
3173+ write(iu,'(e15.6)') rdos(iq,j,ispin)
3174+ enddo
3175+ enddo ! iq
3176+ call io_close(iu)
3177+ endif ! (refolding)
3178+ enddo ! ispin
3179+ endif ! (myNode==0)
3180+ enddo ! ipath
3181+ call timer_stop(myName//'main loop')
3182+
3183+ ! Write allocation report
3184+ call alloc_report( printNow=.true. )
3185+
3186+ ! Write timer report
3187+ call timer_report( printNow=.true. )
3188+
3189+if(myNode==0) print*,'Job completed.'
3190+
3191+#ifdef MPI
3192+ call MPI_finalize(ierr)
3193+#endif
3194+
3195+end program unfold
3196+
3197
3198=== modified file 'version.info'
3199--- version.info 2019-09-04 13:09:45 +0000
3200+++ version.info 2019-09-12 09:33:19 +0000
3201@@ -1,1 +1,5 @@
3202+<<<<<<< TREE
3203 trunk-781
3204+=======
3205+trunk-766-unfolding-47
3206+>>>>>>> MERGE-SOURCE

Subscribers

People subscribed via source and target branches