ADSORBATE_CONTCAR = os.path.join(lobster_path, 'surfaces_noW/'+surface + '+'\ + adsorbate + '/CONTCAR') BULK_DOSCAR = os.path.join(example_path,'Pt_nano/Pt147/DOSCAR') # VASP_DOS objects for both the gas (vacuum) and the adsorbate+surface system GAS_PDOS = VASP_DOS(GAS_DOSCAR) 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 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)
####################################################################################### # Plot projected density # ---------------------- # # We plot the projected density of the gas, adsorbate, and adsorption site. NO_overlap.plot_projected_density() ####################################################################################### # Find the optimal upshift factor # ------------------------------- # # The optimal upshift factor shifts the gas molecular orbital energies to # minimize the sum the orbital scores used in matching gas and adsorbate orbitals. # This has the effect of increasing certainty and roughly corresponds to the # average shift in molecular orbital energies when a gas adsorbs to the surface optimized_upshift = NO_overlap.optimize_energy_shift(bound=[-10, 10]\ , reset=True, plot=True) print(optimized_upshift) ####################################################################################### # Print orbital CO_overlap attributes # ----------------------------------- # # Differences in features are used in computing orbital scores. # Scores are used to map gas molecular orbitals ot adsorbate molecular orbitals. print('Print molecular gas and adsorbate orbital features, respectively.') print(NO_overlap.gas_features) print(NO_overlap.adsorbate_features) print('#####################################################################') print('Orbital matching scores') print(NO_overlap.orbital_scores) print('#####################################################################')
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=0.9\ , upshift=0.5, energy_weight=4) # Find the optimal upshift factor # ------------------------------- # # The optimal upshift factor shifts the molecular orbital energies to # minimize the sum the orbital scores used in matching gas and adsorbate orbitals. # This has the effect of increasing certainty and roughly corresponds to the # average shift in molecular orbital energies when a gas adsorbs to the surface # as a fraction of the fermi energy. optimized_upshift = CO_overlap.optimize_energy_shift(bound=[-0.5,1.5]\ , reset=True, plot=True) print(optimized_upshift) # Print orbital CO_overlap attributes # ----------------------------------- # # Differences in features are used in computing orbital scores. # Scores are used to map gas molecular orbitals ot adsorbate molecular orbitals. print('Print molecular gas and adsorbate orbital features, respectively.') print(CO_overlap.gas_features) print(CO_overlap.adsorbate_features) print('#####################################################################') print('Orbital matching scores') print(CO_overlap.orbital_scores) print('#####################################################################') print('Gas to adsorbate indices and band centers')