Skip to content

Commit d733f80

Browse files
committed
Feature enhancement.
1 parent 66387da commit d733f80

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vaspy/electro.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)