REFERENCE_PDOS = VASP_DOS(ADSORBATE_DOSCAR)
BULK_PDOS = VASP_DOS(BULK_DOSCAR)

# Get adsorbate and site indices and initialize PDOS_OVERLAP object
adsorbate_indices, site_indices = get_adsorbate_indices(GAS_CONTCAR\
                                                        , ADSORBATE_CONTCAR)
#Initialize Coordination object. Repeat is necessary so it doesn't count itself
Overlap = PDOS_OVERLAP(GAS_PDOS, REFERENCE_PDOS, adsorbate_indices\
                          , site_indices, min_occupation=0.5\
                          , upshift=0.5, energy_weight=4)
Overlap.optimize_energy_shift(bound=[-10, 10], reset=True)

GCNList = []
orbital_indices = [0, 3, 4, 5]
orbital_array = [[] for i in range(len(orbital_indices))]
DOSCAR_files, CONTCAR_files = get_all_VASP_files(os.path.join(lobster_path,'nanoparticles_noW'))
DOSCAR_files = [file_name + '.lobster' for file_name in DOSCAR_files]
for nano_DOSCAR, nano_CONTCAR in zip(DOSCAR_files, CONTCAR_files):
    nano_indices, GCNs, atom_types = get_geometric_data(nano_CONTCAR)
    GCNList += GCNs[atom_types[...] == 'surface'].tolist()
    # read and return density of states object
    nano_PDOS = VASP_DOS(nano_DOSCAR)   
    for atom_index in nano_indices[atom_types[...] == 'surface']:
        for i, index in enumerate(orbital_indices):
            orbital_array[i].append(Overlap.get_orbital_interaction(index\
                    , nano_PDOS, atom_index, ['s','d']\
                    , BULK_PDOS, bulk_atom=43\
                    , method='band_width', use_orbital_proximity=False\
                    , index_type='adsorbate'
                    , sum_interaction=True))
            
Exemplo n.º 2
0
# Get adsorbate and site indices and initialize PDOS_OVERLAP object
adsorbate_indices, site_indices = get_adsorbate_indices(GAS_CONTCAR\
                                                        , ADSORBATE_CONTCAR)
#Initialize Coordination object. Repeat is necessary so it doesn't count itself
CO_overlap = PDOS_OVERLAP(GAS_PDOS, REFERENCE_PDOS, adsorbate_indices\
                          , site_indices, min_occupation=1.5\
                          , upshift=0.5, energy_weight=3)
CO_overlap.optimize_energy_shift(bound=[-10, 10], reset=True)

GCNList = []
four_sigma_list = []
one_pi_list = []
five_sigma_list = []

DOSCAR_files, CONTCAR_files = get_all_VASP_files(\
        r'C:\Users\lansf\Documents\Data\PROBE_PDOS\vasp_dos_files\Pt_nano')


for nano_DOSCAR, nano_CONTCAR in zip(DOSCAR_files, CONTCAR_files):
    nano_indices, GCNs, atom_types = get_geometric_data(nano_CONTCAR)
    GCNList += GCNs[atom_types[...] == 'surface'].tolist()
    # read and return density of states object
    nano_PDOS = VASP_DOS(nano_DOSCAR)   
    for atom_index in nano_indices[atom_types[...] == 'surface']:
        four_sigma = CO_overlap.get_orbital_interaction(1\
                    , nano_PDOS, atom_index, ['s','dz2']\
                    , BULK_PDOS, bulk_atom=43\
                    , method='band_width', use_orbital_proximity=False)
        one_pi = CO_overlap.get_orbital_interaction(2\
                    , nano_PDOS, atom_index, ['dyz','dxz']\
                    , BULK_PDOS, bulk_atom=43\
from pdos_overlap.vasp_dos import VASP_DOS
from pdos_overlap.vasp_dos import get_all_VASP_files
from pdos_overlap.plotting_tools import set_figure_settings
from scipy.stats import linregress
set_figure_settings('paper')
Downloads_folder = os.path.join(os.path.expanduser("~"), 'Downloads')
GCNList = []
atom_type = []
band_list = []
band_width_list = []
occupied_band_list = []
unoccupied_band_list = []
filling_list = []
second_moment_list = []
bond_energy_list = []
DOSCAR_files, CONTCAR_files = get_all_VASP_files(\
        r'C:\Users\lansf\Documents\Data\PROBE_PDOS\lobster_files_(N+1)bands\nanoparticles_noW')

for DOSCAR, CONTCAR in zip(DOSCAR_files, CONTCAR_files):
    indices, GCNs, atom_types = get_geometric_data(CONTCAR)
    GCNList += GCNs.tolist()
    atom_type += atom_types.tolist()
    # read and return densityofstates object
    PDOS = VASP_DOS(DOSCAR)
    for atom_index in indices:
        band_center = PDOS.get_band_center(atom_index, ['s','d']\
                                , sum_density=True) - PDOS.e_fermi
        occupied_band_center = PDOS.get_band_center(atom_index, ['s','d']\
                                , sum_density=True, max_energy=PDOS.e_fermi) - PDOS.e_fermi
        unoccupied_band_center = PDOS.get_band_center(atom_index, ['s','d']\
                                , sum_density=True, min_energy=PDOS.e_fermi) - PDOS.e_fermi
        band_width = PDOS.get_center_width(PDOS.e_fermi, atom_index, ['s','d']\