'is_classic': False, 'temperature': 300, #'temperature'=300K 'folder': 'ALD_Si46', 'storage': 'formatted' } # Set up phonon object by passing in configuration details and the forceconstants object computed above phonons = Phonons(forceconstants=forceconstants, **phonons_config) # Visualize phonon dispersion, group velocity and density of states with # the build-in plotter. # 'with_velocity': specify whether to plot both group velocity and dispersion relation # 'is_showing':specify if figure window pops up during simulation plotter.plot_dispersion(phonons, with_velocity=True, is_showing=False) plotter.plot_dos(phonons, is_showing=False) # Visualize heat capacity vs frequency and # 'order': Index order to reshape array, # 'order'='C' for C-like index order; 'F' for Fortran-like index order # Define the base folder to contain plots # 'base_folder':name of the base folder folder = get_folder_from_label(phonons, base_folder='plots') if not os.path.exists(folder): os.makedirs(folder) # Define a boolean flag to specify if figure window pops during sumuatlion is_show_fig = False frequency = phonons.frequency.flatten(order='C') heat_capacity = phonons.heat_capacity.flatten(order='C')
} forceconstants = ForceConstants(atoms=atoms, supercell=supercell, folder='forceconstant') forceconstants.second.calculate(calculator=LAMMPSlib(**lammps_inputs)) forceconstants.third.calculate(calculator=LAMMPSlib(**lammps_inputs)) n_replicas = np.prod(supercell) kpts = [5, 5, 5] temperature = 300 # # Create a phonon object phonons = Phonons(forceconstants=forceconstants, kpts=kpts, is_classic=is_classic, temperature=temperature, folder='ald_out') plotter.plot_dispersion(phonons) print('Inverse conductivity in W/m/K') print(Conductivity(phonons=phonons, method='inverse').conductivity.sum(axis=0)) print('RTA conductivity in W/m/K') print(Conductivity(phonons=phonons, method='rta').conductivity.sum(axis=0)) plotter.plot_dos(phonons) plotter.plot_vs_frequency(phonons, phonons.heat_capacity, 'cv') plotter.plot_vs_frequency(phonons, phonons.bandwidth, 'gamma_THz') plotter.plot_vs_frequency(phonons, phonons.phase_space, 'phase_space')