Concatenating multiple calculations — PyProcar 6.2.1 documentation

Skip to main content
`Ctrl`+`K`

# Concatenating multiple calculations

Multiple PROCAR files from multiple DFT calculations can be combined with this utility. This utility is particularly useful in cases of large systems, where one can split the bandstructure calculations along different high-symmetry directions in BZ, and then concatenate the PROCAR files for each separate \(k\)-paths, and finally plot the full bandstructure in a single plot. The following command concatenates the PROCAR files obtained from three separate bandstructure calculations done along \(\Gamma-K\), \(K-M\), and \(M-\Gamma\) \(k\)-path in hexagonal Brillouin zone.

Usage:

    pyprocar.cat(inFiles=['PROCAR_G-K','PROCAR_K-M','PROCAR_M-G'], outFile='PROCAR_merged', gz=False, mergeparallel = False, fixformat = False)

If the PROCARs are in a compressed .gz file, set `gz=True`. If inFiles is not provided it will put all the `PROCAR_*` files into the inFiles list.

NOTE:

When running Abinit in parallel the PROCAR is split into multiple files. To merge these files, set `mergeparallel=True`. To detect if the calculation is spin polarized, provide `abinit_output` or set `nspin` value manually. To fix formatting errors in Abinit PROCARs (spin directions not seperated, total projections not calculated) set `fixformat=True` as well.

pyprocar.scripts.scriptCat.cat(inFiles: List[str] | None = None, outFile: str = 'PROCAR_merged', gz: bool = False, mergeparallel: bool = False, fixformat: bool = False, nspin: int = 1, abinit_output: str | None = None)

  This module concatenates multiple PROCARs. If a list of input PROCAR files is not provided it will merge all the PROCAR_* files in the directory.

  Parameters:

    - inFiles (List[str], optional) – A list of PROCAR files to concatenate, by default None

    - outFile (str, optional) – String for the output, by default “PROCAR_merged”

    - gz (bool, optional) – Boolean if output should be compressed to .gz file, by default False

    - mergeparallel (bool, optional) – Boolean for merging PROCARs generated from parallel Abinit calculations., by default False

    - fixformat (bool, optional) – Boolean to fix formatting issues in the Abinit PROCAR file., by default False

    - nspin (int, optional) – To detect if the calculation is spin-colinear it checks for the nsppol flag in the Abinit output file as set in abinit_output. If not present, set nspin., by default 1

    - abinit_output (str, optional) – The abinit output file, by default None