# Path: pyDFTutils/vasp/vasp_utils.py
# def read_poscar_and_unsort(filename='CONTCAR'):
#     """
#     read poscar and unsort. return the symbols,positions and cell in unsorted order.
#     """
#     atoms = read_vasp(filename)
#     symbols = get_unsorted(atoms.get_chemical_symbols())
#     positions = get_unsorted(atoms.get_positions())
#     cell = atoms.get_cell()
#     return symbols, positions, cell
# 
# Path: pyDFTutils/ase_utils/symbol.py
# def symbol_number(symbols):
#     """
#     symbols can be also atoms. Thus the chemical symbols will be used.
#     Fe Fe Fe O -> {Fe1:0 Fe2:1 Fe3:2 O1:3}
#     """
#     try:
#         symbs=symbols.copy().get_chemical_symbols()
#     except Exception:
#         symbs=symbols
#     symdict={}
#     result=OrderedDict()
#     for i,sym in enumerate(symbs):
#         if sym in symdict:
#             symdict[sym]=symdict[sym]+1
#         else:
#             symdict[sym]=1
#         result[sym+str(symdict[sym])]=i
#     return result


from pyDFTutils.vasp.vasp_utils import read_poscar_and_unsort
from ase.calculators.vasp import Vasp, Vasp2
from ase.dft.kpoints import get_bandpath
from os.path import join
from ase.utils import devnull, basestring
from pyDFTutils.ase_utils.symbol import symbol_number
from shutil import copyfile, move
import ase.calculators.vasp.create_input
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import tempfile
import ase.io
import socket
    'Nb': 'Nb_sv',
    'Nd': 'Nd_3',
    'C': 'C',
    'Li': 'Li_sv',
    'Pb': 'Pb_d',
    'Y': 'Y_sv',
    'Tl': 'Tl_d',
    'Lu': 'Lu_3',
    'Rb': 'Rb_sv',
    'Ti': 'Ti_sv',
    'Te': 'Te',
    'Rh': 'Rh_pv',
    'Tc': 'Tc_pv',
    'Ta': 'Ta_pv',
    'Be': 'Be',
    'Sm': 'Sm_3',
    'Ba': 'Ba_sv',
    'Bi': 'Bi_d',
    'La': 'La',
    'Ge': 'Ge_d',
    'Po': 'Po_d',
    'Fe': 'Fe',
    'Br': 'Br',
    'Sr': 'Sr_sv',
    'Pm': 'Pm_3',
    'Hf': 'Hf_pv',
    'Mo': 'Mo_sv',
    'At': 'At_d',
    'Tb': 'Tb_3',
    'Cl': 'Cl',

# Path: pyDFTutils/vasp/vasp_utils.py
# def read_poscar_and_unsort(filename='CONTCAR'):
#     """
#     read poscar and unsort. return the symbols,positions and cell in unsorted order.
#     """
#     atoms = read_vasp(filename)
#     symbols = get_unsorted(atoms.get_chemical_symbols())
#     positions = get_unsorted(atoms.get_positions())
#     cell = atoms.get_cell()
#     return symbols, positions, cell
# 
# Path: pyDFTutils/ase_utils/symbol.py
# def symbol_number(symbols):
#     """
#     symbols can be also atoms. Thus the chemical symbols will be used.
#     Fe Fe Fe O -> {Fe1:0 Fe2:1 Fe3:2 O1:3}
#     """
#     try:
#         symbs=symbols.copy().get_chemical_symbols()
#     except Exception:
#         symbs=symbols
#     symdict={}
#     result=OrderedDict()
#     for i,sym in enumerate(symbs):
#         if sym in symdict:
#             symdict[sym]=symdict[sym]+1
#         else:
#             symdict[sym]=1
#         result[sym+str(symdict[sym])]=i
#     return result


# Path: pyDFTutils/vasp/myvasp.py
from pyDFTutils.vasp.vasp_utils import read_poscar_and_unsort
from ase.calculators.vasp import Vasp, Vasp2
from ase.dft.kpoints import get_bandpath
from os.path import join
from ase.utils import devnull, basestring
from pyDFTutils.ase_utils.symbol import symbol_number
from shutil import copyfile, move
import ase.calculators.vasp.create_input
import matplotlib.pyplot as plt
import os
import sys
import numpy as np
import tempfile
import ase.io
import socket

    'Nb': 'Nb_sv',
    'Nd': 'Nd_3',
    'C': 'C',
    'Li': 'Li_sv',
    'Pb': 'Pb_d',
    'Y': 'Y_sv',
    'Tl': 'Tl_d',
    'Lu': 'Lu_3',
    'Rb': 'Rb_sv',
    'Ti': 'Ti_sv',
    'Te': 'Te',
    'Rh': 'Rh_pv',
    'Tc': 'Tc_pv',
    'Ta': 'Ta_pv',
    'Be': 'Be',
    'Sm': 'Sm_3',
    'Ba': 'Ba_sv',
    'Bi': 'Bi_d',
    'La': 'La',
    'Ge': 'Ge_d',
    'Po': 'Po_d',
    'Fe': 'Fe',
    'Br': 'Br',
    'Sr': 'Sr_sv',
    'Pm': 'Pm_3',
    'Hf': 'Hf_pv',
    'Mo': 'Mo_sv',
    'At': 'At_d',
    'Tb': 'Tb_3',
    'Cl': 'Cl',

    'Mg': 'Mg',