Skip to content

Commit b9ed39d

Browse files
committed
[style] remove trailing whitespace
1 parent 56501b0 commit b9ed39d

File tree

2 files changed

+34
-33
lines changed

2 files changed

+34
-33
lines changed

python/triqs_dft_tools/sumk_dft.py

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import numpy as np
2929
import triqs.utility.dichotomy as dichotomy
3030
from triqs.gf import *
31+
from triqs.gf import Gf
3132
from triqs.gf.meshes import MeshImFreq, MeshReFreq, MeshDLRImFreq
3233
import triqs.utility.mpi as mpi
3334
from triqs.utility.comparison_tests import assert_arrays_are_close

python/triqs_dft_tools/sumk_dft_tools.py

+33-33
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def density_of_states(self, mu=None, broadening=None, mesh=None, with_Sigma=True
5858
Calculates the density of states and the projected density of states.
5959
The basis of the projected density of states is specified by proj_type.
6060
61-
The output files (if `save_to_file = True`) have two (three in the orbital-resolved case) columns representing the frequency and real part of the DOS (and imaginary part of the DOS) in that order.
61+
The output files (if `save_to_file = True`) have two (three in the orbital-resolved case) columns representing the frequency and real part of the DOS (and imaginary part of the DOS) in that order.
6262
6363
The output files are as follows:
6464
@@ -75,12 +75,12 @@ def density_of_states(self, mu=None, broadening=None, mesh=None, with_Sigma=True
7575
Lorentzian broadening of the spectra to avoid any numerical artifacts.
7676
If not given, standard value of lattice_gf (0.001 eV) is used.
7777
mesh : real frequency MeshType, optional
78-
Omega mesh for the real-frequency Green's function.
78+
Omega mesh for the real-frequency Green's function.
7979
Given as parameter to lattice_gf.
8080
with_Sigma : boolean, optional
81-
If True, the self energy is used for the calculation.
81+
If True, the self energy is used for the calculation.
8282
If false, the DOS is calculated without self energy.
83-
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(w) calculated.
83+
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(w) calculated.
8484
Both with_Sigma and with_dc equal to false is needed for DFT A(w) calculated.
8585
with_dc : boolean, optional
8686
If True the double counting correction is used.
@@ -90,7 +90,7 @@ def density_of_states(self, mu=None, broadening=None, mesh=None, with_Sigma=True
9090
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
9191
The following options are:
9292
93-
'None' - Only total DOS calculated
93+
'None' - Only total DOS calculated
9494
'wann' - Wannier DOS calculated from the Wannier projectors
9595
'vasp' - Vasp orbital-projected DOS only from Vasp inputs
9696
'wien2k' - Wien2k orbital-projected DOS from the wien2k theta projectors
@@ -108,11 +108,11 @@ def density_of_states(self, mu=None, broadening=None, mesh=None, with_Sigma=True
108108
DOSproj : Dict of numpy arrays
109109
DOS projected to atom (shell) with the form of DOSproj[n_shells][spn][n_om] where "n_shells" is the total number of correlated or uncorrelated shells (depending on the input "proj_type"). This array gives the trace of the orbital-projected density of states. Empty if proj_type = None
110110
DOSproj_orb : Dict of numpy arrays
111-
Orbital-projected DOS projected to atom (shell) and resolved into orbital contributions with the form of DOSproj_orb[n_shells][spn][n_om,dim,dim] where "dim" specifies the orbital dimension of the correlated/uncorrelated shell (depending on the input "proj_type").
111+
Orbital-projected DOS projected to atom (shell) and resolved into orbital contributions with the form of DOSproj_orb[n_shells][spn][n_om,dim,dim] where "dim" specifies the orbital dimension of the correlated/uncorrelated shell (depending on the input "proj_type").
112112
Empty if proj_type = None
113113
"""
114114

115-
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
115+
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
116116
# Brief description to why can be found in the comment above the currently commented out dft_band_characters() routine
117117
# in converters/elk.py.
118118
# code left here just in case it will be reused.
@@ -284,7 +284,7 @@ def density_of_states(self, mu=None, broadening=None, mesh=None, with_Sigma=True
284284

285285
def proj_type_G_loc(self, G_latt, G_inp, ik, ish, proj_type=None):
286286
"""
287-
Internal routine which calculates the project Green's function subject to the
287+
Internal routine which calculates the project Green's function subject to the
288288
proj_type input.
289289
290290
Parameters
@@ -302,15 +302,15 @@ def proj_type_G_loc(self, G_latt, G_inp, ik, ish, proj_type=None):
302302
'wann' - Wannier DOS calculated from the Wannier projectors
303303
'vasp' - Vasp orbital-projected DOS only from Vasp inputs
304304
'wien2k' - Wien2k orbital-projected DOS from the wien2k theta projectors
305-
305+
306306
Returns
307307
-------
308308
G_proj : Gf
309309
projected/downfolded lattice Green's function
310310
Contains the band-resolved density matrices per k-point.
311311
"""
312312

313-
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
313+
# Note the proj_type = 'elk' (- Elk orbital-projected DOS only from Elk inputs) is not included for now.
314314
# Brief description to why can be found in the comment above the currently commented out dft_band_characters() routine
315315
# in converters/elk.py.
316316
# code left here just in case it will be reused.
@@ -338,7 +338,7 @@ def proj_type_G_loc(self, G_latt, G_inp, ik, ish, proj_type=None):
338338
# isp=ntoi[bname]
339339
# nst=self.n_orbitals[ik,isp]
340340
# #matrix multiply band resolved muffin density with
341-
# #diagonal of band resolved spectral function and fill diagonal of
341+
# #diagonal of band resolved spectral function and fill diagonal of
342342
# #DOSproj_orb orbital dimensions with the result for each frequency
343343
# bdm=self.band_dens_muffin[ik,isp,ish,0:dim,0:nst]
344344
# tmp=[numpy.matmul(bdm, gf.data[iom,:,:].diagonal())
@@ -356,14 +356,14 @@ def proj_type_G_loc(self, G_latt, G_inp, ik, ish, proj_type=None):
356356

357357
def load_parproj(self, data_type=None):
358358
"""
359-
Internal routine which loads the n_parproj, proj_mat_all, rot_mat_all and
359+
Internal routine which loads the n_parproj, proj_mat_all, rot_mat_all and
360360
rot_mat_all_time_inv from parproj data from .h5 file.
361361
362362
Parameters
363363
----------
364364
data_type : string, optional
365-
which data type desired to be read in.
366-
'band' - reads data converted by bands_convert()
365+
which data type desired to be read in.
366+
'band' - reads data converted by bands_convert()
367367
None - reads data converted by parproj_convert()
368368
"""
369369

@@ -390,15 +390,15 @@ def load_parproj(self, data_type=None):
390390

391391
def occupations(self, mu=None, with_Sigma=True, with_dc=True, save_occ=True):
392392
"""
393-
Calculates the band resolved density matrices (occupations) from the Matsubara
393+
Calculates the band resolved density matrices (occupations) from the Matsubara
394394
frequency self-energy.
395395
396396
Parameters
397397
----------
398398
mu : double, optional
399399
Chemical potential, overrides the one stored in the hdf5 archive.
400400
with_Sigma : boolean, optional
401-
If True, the self energy is used for the calculation.
401+
If True, the self energy is used for the calculation.
402402
If false, the DOS is calculated without self energy.
403403
with_dc : boolean, optional
404404
If True the double counting correction is used.
@@ -455,16 +455,16 @@ def occupations(self, mu=None, with_Sigma=True, with_dc=True, save_occ=True):
455455
def spectral_contours(self, mu=None, broadening=None, mesh=None, plot_range=None, FS=True, with_Sigma=True, with_dc=True, proj_type=None, save_to_file=True):
456456
"""
457457
Calculates the correlated spectral function at the Fermi level (relating to the Fermi
458-
surface) or at specific frequencies.
458+
surface) or at specific frequencies.
459459
460460
The output files have three columns representing the k-point index, frequency and A(k,w) in that order. The output files are as follows:
461461
462462
* `Akw_(sp).dat`, the total A(k,w)
463463
* `Akw_(proj_type)_(spn)_proj(i).dat`, the A(k,w) projected to shell with index (i).
464464
* `Akw_(proj_type)_(spn)_proj(i)_(m)_(n).dat`, as above, but for each (m) and (n) orbital contribution.
465-
466-
The files are prepended with either of the following:
467-
For `FS` set to True the output files name include _FS_ and these files contain four columns which are the cartesian reciprocal coordinates (kx, ky, kz) and Akw.
465+
466+
The files are prepended with either of the following:
467+
For `FS` set to True the output files name include _FS_ and these files contain four columns which are the cartesian reciprocal coordinates (kx, ky, kz) and Akw.
468468
For `FS` set to False the output files name include _omega_(iom) (with `iom` being the frequency mesh index). These files also contain four columns as described above along with a comment at the top of the file which gives the frequency value at which the spectral function was evaluated.
469469
470470
Parameters
@@ -476,7 +476,7 @@ def spectral_contours(self, mu=None, broadening=None, mesh=None, plot_range=None
476476
Lorentzian broadening of the spectra to avoid any numerical artifacts.
477477
If not given, standard value of lattice_gf (0.001 eV) is used.
478478
mesh : real frequency MeshType, optional
479-
Omega mesh for the real-frequency Green's function.
479+
Omega mesh for the real-frequency Green's function.
480480
Given as parameter to lattice_gf.
481481
plot_shift : double, optional
482482
Offset [=(ik-1)*plot_shift, where ik is the index of the k-point] for each A(k,w) for stacked plotting of spectra.
@@ -485,12 +485,12 @@ def spectral_contours(self, mu=None, broadening=None, mesh=None, plot_range=None
485485
If not provided, the min and max values of the energy mesh is used.
486486
FS : boolean
487487
Flag for calculating the spectral function at the Fermi level (omega ~ 0)
488-
If False, the spectral function will be generated for each frequency within
489-
plot_range.
488+
If False, the spectral function will be generated for each frequency within
489+
plot_range.
490490
with_Sigma : boolean, optional
491-
If True, the self energy is used for the calculation.
491+
If True, the self energy is used for the calculation.
492492
If false, the DOS is calculated without self energy.
493-
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(k,w) calculated.
493+
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(k,w) calculated.
494494
Both with_Sigma and with_dc equal to false is needed for DFT A(k,w) calculated.
495495
with_dc : boolean, optional
496496
If True the double counting correction is used.
@@ -500,7 +500,7 @@ def spectral_contours(self, mu=None, broadening=None, mesh=None, plot_range=None
500500
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
501501
The following options are:
502502
503-
* `None` Only total DOS calculated
503+
* `None` Only total DOS calculated
504504
* `wann` Wannier DOS calculated from the Wannier projectors
505505
save_to_file : boolean, optional
506506
If True, text files with the calculated data will be created.
@@ -652,7 +652,7 @@ def spaghettis(self, mu=None, broadening=None, mesh=None, plot_shift=0.0, plot_r
652652
Chemical potential, overrides the one stored in the hdf5 archive.
653653
By default, this is automatically set to the chemical potential within the SK object.
654654
broadening : double, optional
655-
Lorentzian broadening of the spectra to avoid any numerical artifacts.
655+
Lorentzian broadening of the spectra to avoid any numerical artifacts.
656656
If not given, standard value of lattice_gf (0.001 eV) is used.
657657
mesh : real frequency MeshType, optional
658658
Omega mesh for the real-frequency Green's function.
@@ -669,9 +669,9 @@ def spaghettis(self, mu=None, broadening=None, mesh=None, plot_shift=0.0, plot_r
669669
function is calculated for all shells.
670670
Note for experts: The spectra from Wien2k inputs are not rotated to the local coordinate system used in Wien2k.
671671
with_Sigma : boolean, optional
672-
If True, the self energy is used for the calculation.
672+
If True, the self energy is used for the calculation.
673673
If false, the DOS is calculated without self energy.
674-
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(k,w) calculated.
674+
Both with_Sigma and with_dc equal to True is needed for DFT+DMFT A(k,w) calculated.
675675
Both with_Sigma and with_dc equal to false is needed for DFT A(k,w) calculated.
676676
with_dc : boolean, optional
677677
If True the double counting correction is used.
@@ -681,12 +681,12 @@ def spaghettis(self, mu=None, broadening=None, mesh=None, plot_shift=0.0, plot_r
681681
By default, no projected DOS type will be calculated (the corresponding projected arrays will be empty).
682682
The following options are:
683683
684-
'None' - Only total DOS calculated
684+
'None' - Only total DOS calculated
685685
'wann' - Wannier DOS calculated from the Wannier projectors
686686
'wien2k' - Wien2k orbital-projected DOS from the wien2k theta projectors
687687
save_to_file : boolean, optional
688688
If True, text files with the calculated data will be created.
689-
689+
690690
Returns
691691
-------
692692
Akw : Dict of numpy arrays
@@ -698,7 +698,7 @@ def spaghettis(self, mu=None, broadening=None, mesh=None, plot_shift=0.0, plot_r
698698
Empty if proj_type = None
699699
pAkw_orb : Dict of numpy arrays
700700
(Correlated) k-resolved spectral function projected to atoms and
701-
resolved into orbital contributions.
701+
resolved into orbital contributions.
702702
This dictionary has the form of pAkw[n_shells][spn][n_k, n_om,dim,dim] where dim specifies the orbital dimension of the correlated/uncorrelated shell.
703703
Empty if proj_type = None
704704
"""
@@ -941,7 +941,7 @@ def gen_Akw(self, mu, broadening, mesh, plot_shift, plot_range, shell_list, with
941941
mpi.barrier()
942942

943943
return Akw, pAkw, pAkw_orb
944-
944+
945945
def partial_charges(self, mu=None, with_Sigma=True, with_dc=True):
946946
"""
947947
Calculates the orbitally-resolved density matrix for all the orbitals considered in the input, consistent with

0 commit comments

Comments
 (0)