Aluminum Example
Here is the example of Aluminum.
Aluminum has FCC lattice with a single atom per primitive unit cell.
The following structure.yml file is used in this example:
# CrystalFTG
vec:
  [[ 0.00000000,  1.99208958,  1.99208958],
   [ 1.99208958,  0.00000000,  1.99208958],
   [ 1.99208958,  1.99208958,  0.00000000]]
atoms:
  - Al:
      [[ 0.00000000,  0.00000000,  0.00000000]]
orbitals: p
supa:
  [[ 1,  0,  0],
   [ 0,  1,  0],
   [ 0,  0,  1]]
This example can be found in the examples/compute_id/al/hsbid/order2 directory of the  principia-materia-examples repository.
Compute phonon with HS-BID
- First, we execute the symmetry analysis and create the jobs that need to be calculated with a first principle method. These jobs we be saved in the database - database.db.
pm-hsbid --config config.yml --create --save-hsbidThe
config.ymlfile is defined below:config.ymlstructure: '../../data/structure.yml' supa: | 4 0 0 0 4 0 0 0 4 pg: 'Oh' order: 2 full_symmetry: True delta: [ 0.02, 0.03, 0.04] fdtype: 'c' root_directory: '.' database: 'database.db' db_type: 'sqlite' db_table: 'bid_phonon'
- In this example, we use VASP to perform first principle calculations. This we need to create the input files for VASP calculations. 
pm-jobs --config config.yml --create --engine vasp --save-config jobs_config.yml \ --job-config-path ../../data/dft_files --root-directory jobs-to-runWhere
../../data/dft_filesstores the template input files includingINCAR,POTCARandKPOINTS. After the input files are generated, we can execute VASP inside the directories of the individual jobs.
- When the first principle calculations are finished. The following command can parse out the results of the calculations and store them into the database we created. 
pm-jobs --config jobs_config.yml --retrieveThe
jobs_config.ymlfile is generated from the previous step.
- Finally, we run the post-processing step to solve for the irreducible derivatives and compute dynamic tensors and real space force constant tensors. 
pm-hsbid --load-hsbid hsbid.hdf5 --config config.yml \ --post --save-fi --save-ids --save-dts
Plot phonon band structure and DOS
- First we prepare the configuration file - phonon_config.ymlto compute phonon band structure and DOS:
phonon_config.ymlband: - 0 0 0; 1/2 1/2 0 - -1/2 1/2 0; 0 0 0 - 0 0 0; 1/2 0 0 band_label: - $\Gamma$ - X - $\Gamma$ - L mesh: 20 20 20
- Then we compute phonon band structure and DOS with - pm-phonon-band-doscommand.
pm-phonon-band-dos --load-fi fourier_interpolation.hdf5 --config phonon_config.yml \ --save-band --save-grid --save-dos --save-plot --units THz
- Finally we can plot the phonon band structure and DOS of Al with the following to get Fig. 15. 
pm-plot-band --show band_plot_config.yml
Fig. 15 Phonon band structure and DOS of Al.
Working with Quantum-ESPRESSO
- If in this case we are working with Quantum-ESPRESSO (QE) instead of VASP, first we will need to create a template QE input file. NaCl.scf.in- &control calculation = 'scf' tprnfor = .true. tstress = .true. pseudo_dir = 'pseudo/' restart_mode='from_scratch', outdir='tmp' / &system ibrav = 0 nat = 1 ntyp = 1 ecutwfc = 60.0 / &electrons diagonalization = 'david' conv_thr = 1.0d-8 / ATOMIC_SPECIES Al 26.981539 Al.pbe-n-kjpaw_psl.1.0.0.UPF ATOMIC_POSITIONS crystal Al 0.0000000000000000 0.0000000000000000 0.0000000000000000 CELL_PARAMETERS angstrom 0.00000000 1.99208958 1.99208958 1.99208958 0.00000000 1.99208958 1.99208958 1.99208958 0.00000000 K_POINTS automatic 20 20 20 0 0 0 
- Then we create the input files for QE calculations. In the case of QE the option - --job-config-pathexpects the path to the above template QE input file (The data in- nat,- ATOMIC_POSITIONS,- CELL_PARAMETERSand- K_POINTSof the template file will be replaced with the configurations of the jobs).
pm-jobs --config config.yml --create --engine qe --save-config jobs_config.yml \ --job-config-path NaCl.scf.in --root-directory jobs-to-runAfter the input files are created the static QE calculations can be executed and the remaining steps are the same as before.