Exemplo n.º 1
0
def plot_band_structure(spin, Band, fermi, xtic_file, xlabel_file, plot_range,
                        target):
    # make band.dat
    make_band_dat(xtic_file, Band, spin, target)

    # make band.in
    nband = len(Band)
    if pyhead(target + '/Band_gap.log', 1).split()[2] == 'is':
        gap = 0
        fermi = str(fermi)
    else:
        gap = round(float(pyhead(target + '/Band_gap.log', 1).split()[2]))
        fermi = pygrep('VBM', target + '/Band_gap.log', 0,
                       0).splitlines()[0].split()[-2]

    title = target.split('/')[-2]
    make_band_in(title, xlabel_file, fermi, gap, nband, spin, plot_range,
                 target)
Exemplo n.º 2
0
def read_code_head(code, head_num):
    from module_vasprun import pyhead
    code_ver = pyhead(code, head_num)
    return code_ver
Exemplo n.º 3
0
def read_code_head(code,head_num):
	from module_vasprun import pyhead
	code_ver = pyhead(code,head_num)
#	code_ver = subprocess.check_output(['head','-'+str(head_num),code])
	return code_ver