Skip to content

Commit b788165

Browse files
Merge pull request #18 from AsymmetryChou/io_siesta
Update SIESTA parser in DFTIO
2 parents 7e69933 + 8c81a6e commit b788165

17 files changed

Lines changed: 29567 additions & 114 deletions

File tree

dftio/io/siesta/check_siesta.ipynb

Lines changed: 366 additions & 40 deletions
Large diffs are not rendered by default.

dftio/io/siesta/siesta_parser.py

Lines changed: 307 additions & 69 deletions
Large diffs are not rendered by default.

dftio/io/siesta/try_siesta.ipynb

Lines changed: 11734 additions & 2 deletions
Large diffs are not rendered by default.

dftio/plot/plot_eigs.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,17 @@ def plot(self, bmin:int=0, bmax:int=None):
7777
bmax = min(bmax, nbands)
7878
assert bmax>bmin, "max should be larger than min!"
7979

80-
ax.plot(self.eigs[:,bmin:bmax], 'b-', lw=1)
80+
if self.kpoints.shape[0] > 1:
81+
ax.plot(self.eigs[:,bmin:bmax], 'b-', lw=1)
82+
ax.set_xlabel("k-point")
83+
ax.set_title("Band Structure")
84+
else:
85+
for e in self.eigs[0, bmin:bmax]:
86+
ax.hlines(e, xmin=-0.5, xmax=0.5, color='b', linewidth=1)
87+
ax.set_xticks([])
88+
ax.set_title("Energy levels")
8189
ax.text(0.5, 0.5, f"band windown: {bmin} - {bmax}", ha='center', va='center', transform=ax.transAxes)
82-
ax.set_xlabel("k-point")
8390
ax.set_ylabel("Energy (eV)")
84-
ax.set_title("Band Structure")
8591
plt.savefig(os.path.join(self.path, "band_structure.png"), dpi=300)
8692
plt.tight_layout()
8793
# if has gui? then plot show
1.72 MB
Binary file not shown.

test/data/siesta/siesta_out_simple/Au_cell.ORB_INDX

Lines changed: 7522 additions & 0 deletions
Large diffs are not rendered by default.
2.87 MB
Binary file not shown.
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
#SpinOrbit .true.
2+
#NonCollinearSpin .true.
3+
#SpinPolarized .true.
4+
5+
6+
SystemName 1Au # Descriptive name of the system
7+
SystemLabel Au_cell # Short name for naming files
8+
9+
# Output options
10+
11+
12+
# Species and atoms
13+
14+
15+
%block ChemicalSpeciesLabel
16+
1 79 Au
17+
%endblock ChemicalSpeciesLabel
18+
19+
%block Ps.lmax
20+
Au 3
21+
%endblock Ps.lmax
22+
# Basis
23+
24+
25+
%block PAO.Basis
26+
Au 3 0.025 # Species label, number of l-shells
27+
n=6 0 2 E 99.0 3.76
28+
6.520 4.180
29+
1.000 1.000
30+
n=6 1 1 E 54.3 3.96
31+
6.90
32+
1.000
33+
n=5 2 2 E 54.3 4.11 # n, l, Nzeta
34+
6.180 2.350
35+
1.000 1.000
36+
%endblock PAO.Basis
37+
38+
39+
### Basis
40+
#PAO.EnergyShift 100 meV
41+
#PAO.BasisSize DZP
42+
43+
44+
#%block GeometryConstraints
45+
#position from 1 to 72
46+
#position from -1 to -72
47+
#%endblock GeometryConstraints
48+
49+
%block kgrid_Monkhorst_Pack
50+
10 0 0 0.0
51+
0 10 0 0.0
52+
0 0 10 0.0
53+
%endblock kgrid_Monkhorst_Pack
54+
55+
#BandLinesScale ReciprocalLatticeVectors
56+
#%block BandLines
57+
# 1 0.00000 0.00000 0.00000 \Gamma
58+
# 20 0.50000 0.00000 0.50000 X
59+
# 20 0.50000 0.25000 0.75000 W
60+
# 20 0.50000 0.50000 0.50000 L
61+
# 20 0.00000 0.00000 0.00000 \Gamma
62+
#%endblock BandLines
63+
64+
65+
66+
xc.functional GGA # Exchange-correlation functional
67+
xc.authors PBE # Exchange-correlation version
68+
69+
70+
MeshCutoff 250. Ry # Mesh cutoff. real space mesh
71+
72+
# SCF options
73+
MaxSCFIterations 5000 # Maximum number of SCF iter
74+
DM.MixingWeight 0.02 # New DM amount for next SCF cycle
75+
DM.Tolerance 1.0E-5 # Tolerance in maximum difference
76+
# between input and output DM
77+
DM.UseSaveDM T # to use continuation files
78+
DM.NumberPulay 6
79+
80+
#SolutionMethod Diagon # OrderN or Diagon
81+
ElectronicTemperature 25 meV # Temp. for Fermi smearing
82+
83+
# MD options
84+
85+
#SolutionMethod Transiesta
86+
MD.TypeOfRun CG # Type of dynamics:
87+
MD.NumCGsteps 0 # Number of CG steps for
88+
# coordinate optimization
89+
MD.MaxCGDispl 0.08 bohr # Maximum atomic displacement
90+
# in one CG step (Bohr)
91+
MD.MaxForceTol 0.03 eV/Ang # Tolerance in the maximum
92+
# atomic force (Ry/Bohr)
93+
MD.MaxStressTol 0.1 Gpa
94+
95+
96+
WriteForces T
97+
WriteCoorStep T
98+
WriteMDhistory T
99+
SaveHS True
100+
TS.HS.Save True
101+
SaveRHO T
102+
WriteMullikenPop 1
103+
104+
#MullikenInSCF T
105+
SaveTotalPotential T
106+
SaveElectrostaticPotential T
107+
SaveDeltaRho T
108+
109+
110+
#SlabDipoleCorrection T # compensate the dipole of the system at every iteration of the self-consistent cycle
111+
112+
%include STRUCT.fdf
113+
114+
115+
116+
117+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
LatticeConstant 1.0 Ang
2+
%block LatticeVectors
3+
4.0782999992 0.0000000000 0.0000000000
4+
0.0000000000 4.0782999992 0.0000000000
5+
0.0000000000 0.0000000000 4.0782999992
6+
%endblock LatticeVectors
7+
8+
NumberOfAtoms 4
9+
AtomicCoordinatesFormat Ang
10+
%block AtomicCoordinatesAndAtomicSpecies
11+
0.000000000 0.000000000 0.000000000 1 # 1: Au
12+
0.000000000 2.039150000 2.039150000 1 # 2: Au
13+
2.039150000 0.000000000 2.039150000 1 # 3: Au
14+
2.039150000 2.039150000 0.000000000 1 # 4: Au
15+
%endblock AtomicCoordinatesAndAtomicSpecies
16+
17+
NumberOfSpecies 1
18+
%block ChemicalSpeciesLabel
19+
1 79 Au
20+
%endblock ChemicalSpeciesLabel
1.72 MB
Binary file not shown.

0 commit comments

Comments
 (0)