Example #1
0
def get_point_defect(poscar, doped_in, doped_out, num, symprec):
    """
    argument:

    poscar, the  path of your initial POSCAR

    doped_in, the element you want to put into the system

    doped_out, the element you want to remove out of the system

    Optional parameter:
    num: the number of element you want to put, the default is 1
    sympre: system precision

    Example:

    pyvasp get_point_defect -i Fe,Ti -o Si -n 2,3 POSCAR
    """
    DM = DefectMaker(no_defect=poscar)
    doped_out, doped_in, num = doped_out.split(','), doped_in.split(
        ','), num.split(',')
    try:
        num = [int(i) for i in num]
    except:
        if num[0].lower() == "all":
            num = None
        else:
            raise ValueError(num + " is not supported here")
    DM.get_point_defect(doped_in=doped_in,
                        doped_out=doped_out,
                        symprec=symprec,
                        num=num)
Example #2
0
def get_tetrahedral_poscar(poscar,doped_in,isunique,min_d):
    """
    argument:

    poscar, the  path of your initial POSCAR

    doped_in, the element you want to put into the system

    Example:

    pyvasp get_tetrahedral_poscar -i H  POSCAR
    """
    DM = DefectMaker(no_defect=poscar)
    DM.get_tetrahedral_defect(isunique=isunique,doped_in=doped_in,min_d=min_d)
Example #3
0
def get_magnetic_config(poscar, magnetic_atom, magmon, magmon_identity,
                        symprec):
    """
    argument:
    poscar, the  path of your initial POSCAR
    Optional parameter:
    magnetic_atom, specify a magnetic atom
    magmon, magmon
    magmon_identity, the equivalent atoms will have equivalent spins. (True or False)
    sympre: system precision
    Example:
    pyvasp get_magnetic_config POSCAR -ma Fe -m 3 -mi True
    """
    DM = DefectMaker(no_defect=poscar)
    DM.get_magnetic_config([magnetic_atom], magmon, magmon_identity, symprec)
Example #4
0
def get_point_defect(poscar,doped_in,doped_out,num,symprec):
    """
    argument:

    poscar, the  path of your initial POSCAR

    doped_in, the element you want to put into the system

    doped_out, the element you want to remove out of the system

    Optional parameter:
    num: the number of element you want to put, the default is 1
    sympre: system precision

    Example:

    pyvasp get_point_defect -i Fe,Ti -o Si -n 2,3 POSCAR
    """
    DM = DefectMaker(no_defect=poscar)
    doped_in,num = doped_in.split(','),num.split(',')
    DM.get_point_defect(doped_in=doped_in,doped_out=doped_out,symprec=symprec,num=[int(i) for i in num])
Example #5
0
def get_purity_poscar(poscar, purity_in, purity_out, num, symprec):
    """
    argument:

    poscar, the  path of your initial POSCAR

    purity_in, the element you want to put into the system

    purity_out, the element you want to drop out of the system

    Optional parameter:
    num: the number of element you want to put, the default is 1
    sympre: system precision

    Example:

    pyvasp get_purity_poscar -i Vacc -o Si POSCAR
    """
    DM = DefectMaker(no_defect=poscar)
    DM.get_purity_defect(purity_out=purity_out,
                         purity_in=purity_in,
                         symprec=symprec,
                         num=num)