coflandscaper.Landscape

class coflandscaper.Landscape[source]

Generate potential energy landscape plots from single-point CSV data.

Methods

run

Build PES plots for one stacking mode.

run_mode

Generate landscapes for selected stacking mode(s).

run(input_folder, cof_name=None, dft=False, output_folder=None, colorscheme='viridis', plot_mode='both', rel_energy_max=None, show_minima_markers=True, minima_mode='global', show_header=True, show_title_block=False, show=False)[source]

Build PES plots for one stacking mode.

Parameters:
  • input_folder (str) – Mode folder path (serr or incl) used to infer mode; its parent must contain {cof_name}_sp_energies_{mode}.csv (or {cof_name}_sp_energies_{mode}_dft.csv when dft=True).

  • cof_name (str | None) – COF identifier used for expected CSV naming. Defaults to None (must be provided explicitly for this method).

  • dft (bool) – If True, read input CSVs with _dft suffix. Defaults to False.

  • output_folder (str | None) – Optional output folder for plots. Defaults to None (uses {cof_name}/3_{cof_name}_landscape).

  • colorscheme (str) – Any valid Matplotlib colormap name. Defaults to “viridis”.

  • plot_mode (str) – Plot variant selector. Allowed values are “heatmap”, “isolines”, or “both”. Defaults to “both”.

  • rel_energy_max (float | None) – Optional max value (eV) to cap relative energies. Values above this are clipped in the plots. Defaults to None.

  • show_minima_markers (bool) – If True (default), mark global and local minima in red on heatmap/isolines. Defaults to True.

  • minima_mode (str) – Minima marker mode: “global” (default) marks only the single global minimum; “local” marks local minima as well. Defaults to “global”.

  • show_header (bool) – If True, draw title and header text. Defaults to True.

  • show_title_block (bool) – If True, draw title plus two header lines (stacking mode and level of theory when available). Defaults to False.

  • show (bool) – If True, display plots interactively via Matplotlib. Defaults to False for non-interactive/batch workflows.

Raises:
Return type:

None

run_mode(cof_name, mode, dft=False, colorscheme='viridis', plot_mode='both', rel_energy_max=None, show_minima_markers=True, minima_mode='global', show_header=True, show_title_block=False, show=False, input_folder=None, output_folder=None)[source]

Generate landscapes for selected stacking mode(s).

Parameters:
  • cof_name (str) – COF name used for folder naming.

  • mode (str) – Mode selector. Allowed values are “incl”, “serr”, or “both”.

  • dft (bool) – If True, read input CSVs with _dft suffix. Defaults to False.

  • colorscheme (str) – Any valid Matplotlib colormap name. Defaults to “viridis”.

  • plot_mode (str) – Plot variant selector. Allowed values are “heatmap”, “isolines”, or “both”. Defaults to “both”.

  • rel_energy_max (float | None) – Optional max value for relative energies. Defaults to None.

  • show_minima_markers (bool) – If True, mark minima on plots. Defaults to True.

  • minima_mode (str) – “global” (default) marks only one global minimum; “local” includes local minima markers too. Defaults to “global”.

  • show_header (bool) – If True, draw title and header text. Defaults to True.

  • show_title_block (bool) – If True, draw title plus two header lines. Defaults to False.

  • show (bool) – If True, display plots interactively. Defaults to False for cluster/batch runs.

  • input_folder (str | None) – Optional base folder containing mode folders and {cof_name}_sp_energies_{mode}.csv files, or {cof_name}_sp_energies_{mode}_dft.csv when dft=True. Defaults to None (uses {cof_name}/3_{cof_name}_landscape).

  • output_folder (str | None) – Optional output folder for plots. Defaults to None (uses {cof_name}/3_{cof_name}_landscape).

Raises:
Return type:

None