Skip to content

Commit

Permalink
add input checking
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangChunHe committed Nov 9, 2018
1 parent 0855807 commit c008ed2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions draw_dos_element.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ function draw_dos_element(dos_file, pos_file)
% See also draw_dos_pdos, draw_band_structure, draw_specific_atoms

[sum_dos, p_dos] = read_doscar(dos_file);
if p_dos == 0
error('No PDOS found, LORBIT=11 should be set in INCAR')
end
[atom, num, sys_name] = read_element(pos_file);

fid = fopen(dos_file, 'rt');
Expand Down

0 comments on commit c008ed2

Please sign in to comment.