File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ def __add__(self, dosx_inst):
9393 def reset_data (self ):
9494 "Reset data array to zeros."
9595 self .data [:, 1 :] = 0.0
96+ return self
9697
9798 def plotsum (self , xcol , ycols , ** kwargs ):
9899 '''
@@ -205,13 +206,14 @@ def get_dband_center(self, d_cols):
205206
206207 Parameters:
207208 -----------
208- d_cols: The column number range for d orbitals, tuple of int.
209+ d_cols: The column number range for d orbitals, int or tuple of int.
209210
210211 Examples:
211212 ---------
212213 # The 5 - 9 columns are state density for d orbitals.
213214 >>> dos.get_dband_center(d_cols=(5, 10))
214215 """
216+ d_cols = (d_cols , d_cols + 1 ) if type (d_cols ) is int else d_cols
215217
216218 # 合并d轨道DOS
217219 start , end = d_cols
You can’t perform that action at this time.
0 commit comments