COGITOanalyze

Tools for analyzing tight-binding Hamiltonians and band structures derived from COGITO projections.

COGITO_dft.COGITOanalyze.analyze_orb_converg_info(dir: str = '', tag: str = '', make_change_plot: bool = True, show_fig: bool = False, group_same_elem: bool = True)[source]

This function serves to analyze the orbital convergence of the COGITO run using the ‘orb_converg_info.json’ created when save_orb_converg_info=True in COGITO.generate_TBmodel(). The function checks the convergence for errors or warnings and recommends adjustments to the COGITO inputs or VASP NBANDS. The function also plots the orbital radius changes for different elements.

Parameters:
  • dir (str) – Directory of the ‘orb_converg_info’ file

  • tag (str) – Tag appended to ‘orb_converg_info’ file. Final path is (dir “orb_converg_info” + tag + “.json”).

  • make_change_plot (bool) – Whether to create, save to (dir+”orb_change”+tag+”.png”), and show the orbital radius change plot.

  • show_fig (bool) – Whether to plt.show() the orbital change figure.

  • group_same_elem (bool) – Whether to group atoms that are of the same element in the orbital change plot. Set to False to observe differences between the same element in varying coordination.

COGITO_dft.COGITOanalyze.analyze_spill_error(dir: str = '', tag: str = '')[source]

This function serves to analyze the spillge and orbital mixing of the COGITO run using the ‘error_output.txt’ created when running COGITO.generate_TBmodel(). The function checks that the values are within range or return an error or warning with recommended adjustments to the COGITO inputs or VASP NBANDS.

Parameters:
  • dir (str) – Directory of the ‘error_output’ file

  • tag (str) – Tag appended to ‘error_output’ file. Final path is (dir “error_output” + tag + “.txt”).

COGITO_dft.COGITOanalyze.analyze_band_error(dir: str = '', tag: str = '')[source]

This function serves to analyze the band interpolation error of the COGITO tight binding run using the ‘DFT_band_error.txt’ created when running COGITO_TB_Model.compare_to_DFT(). The function checks that the values are within range or return an error or warning with recommended adjustments to the COGITO inputs or VASP NBANDS.

Parameters:
  • dir (str) – Directory of the ‘DFT_band_error’ file

  • tag (str) – Tag appended to ‘DFT_band_error’ file. Final path is (dir “DFT_band_error” + tag + “.txt”).

class COGITO_dft.COGITOanalyze.Tee(*streams)[source]

Bases: object

write(data)[source]
flush()[source]
COGITO_dft.COGITOanalyze.analyze_all(dir: str = '', tag: str = '', make_change_plot: bool = True, show_fig: bool = False, group_same_elem: bool = True)[source]

This function serves to analyze the three files to monitor quality of the COGITO run. Each function checks that values are within range or returns error or warning messages with recommended adjustments to the COGITO inputs or VASP NBANDS to potentially improve quality. The analyze_orb_converg_info() function also plots the orbital radius changes for different elements.

Parameters:
  • dir (str) – Directory of the files

  • tag (str) – Tag appended to file. Final path is (dir “*” + tag + “.*”).

  • make_change_plot (bool) – Whether to create, save to (dir+”orb_change”+tag+”.png”), and show the orbital radius change plot.

  • show_fig (bool) – Whether to plt.show() the orbital change figure.

  • group_same_elem (bool) – Whether to group atoms that are of the same element in the orbital change plot. Set to False to observe differences between the same element in varying coordination.

COGITO_dft.COGITOanalyze.main(argv=None)[source]