예제 #1
0
def main(wd, attribute, number):
    """
    Example:

    pyvasp main -a gap  # this can read the gap and vbm, cbm

    pyvasp main -a fermi  -w work_dir  # this can read the fermi energy, -w is your work directory

    pyvasp main -a energy  # this can read the total energy

    pyvasp main -a ele  # this can read the electrons in your OUTCAR

    pyvasp main -a ele-free  # this can get electrons number of  the defect-free system

    pyvasp main -a  Ewald  # this can get the Ewald energy of your system

    pyvasp main -a cpu  # this can get CPU time
    """

    EV = ExtractValue(wd)
    if 'gap' in attribute:
        get_gap(EV)
    elif 'fermi' in attribute:
        click.echo(EV.get_fermi())
    elif 'total' in attribute.lower() or 'energy' in attribute.lower():
        click.echo(EV.get_energy())
    elif 'ele' in attribute.lower() and 'free' in attribute.lower():
        click.echo(EV.get_Ne_defect_free())
    elif 'ele' in attribute.lower() and 'free' not in attribute.lower(
    ) and 'static' not in attribute.lower():
        click.echo(EV.get_Ne_defect())
    elif 'ima' in attribute or 'ewald' in attribute.lower():
        clikc.echo(EV.get_image())
    elif 'elect' in attribute and 'static' in attribute:
        outcar = os.path.join(wd, 'OUTCAR')
        click.echo(str(number) + ' ' + str(get_ele_sta(outcar, number)))
    elif 'cpu' in attribute.lower():
        click.echo(EV.get_cpu_time())
예제 #2
0
def electron_defect_free(wd):
    EV = ExtractValue(wd)
    click.echo(EV.get_Ne_defect_free())