ai2_kit.feat.spectrum.smiviz.gapplot module

ai2_kit.feat.spectrum.smiviz.gapplot module#

ai2_kit.feat.spectrum.smiviz.gapplot.plot_energy_force_error(ener_neu: ndarray, ener_red: ndarray, frcs_neu: ndarray, frcs_red: ndarray, n_atoms: int = 191, save_plot: Optional[str] = None)[source]#

Plot and analyze the error between DFT and MLP for energy and force, for both neutral and reduced systems.

Parameters:
  • ener_neu (np.ndarray) – Array of shape (N, 2), neutral system energies. Column 0: DFT, Column 1: MLP.

  • ener_red (np.ndarray) – Array of shape (N, 2), reduced system energies. Column 0: DFT, Column 1: MLP.

  • frcs_neu (np.ndarray) – Array of shape (N, 6), neutral system forces. Columns 0-2: DFT, Columns 3-5: MLP.

  • frcs_red (np.ndarray) – Array of shape (N, 6), reduced system forces. Columns 0-2: DFT, Columns 3-5: MLP.

  • n_atoms (int, default=191) – Number of atoms for normalization.

  • save_plot (Optional[str], default=None) – If not None, save the figure to this path.

Returns:

The function creates and optionally saves or shows a figure with two subplots: (1) DFT vs. MLP energy scatter and RMSE/STD annotations. (2) DFT vs. MLP force scatter and RMSE/STD annotations.

Return type:

None

ai2_kit.feat.spectrum.smiviz.gapplot.plot_smoothed_vertical_energy_gaps(gap_data: DataFrame, save_plot: Optional[str] = None)[source]#

Plot smoothed vertical energy gaps for multiple columns in a DataFrame using moving average.

Parameters:
  • gap_data (pd.DataFrame) – DataFrame with a ‘time’ column and one or more energy gap columns.

  • save_plot (Optional[str], default=None) – If not None, save the figure to this path.

Return type:

None

ai2_kit.feat.spectrum.smiviz.gapplot.plot_thermodynamic_integration(mean_data: DataFrame, save_plot: Optional[str] = None)[source]#

Plot thermodynamic integration curve from mean energy gap data.

Parameters:
  • mean_data (pd.DataFrame) – DataFrame with columns ‘eta’ and ‘Mean’.

  • save_plot (Optional[str], default=None) – If not None, save the figure to this path.

Return type:

None

ai2_kit.feat.spectrum.smiviz.gapplot.plot_ti_results(etas: Sequence[float], vegs: Sequence[float], etas_fp: Sequence[float], vegs_fp: Sequence[float], save_plot: Optional[str] = None)[source]#

Plot thermodynamic integration (TI) results for MLMD and FP data, and compute integrals.

Parameters:
  • etas (Sequence[float]) – List of lambda/eta values for MLMD.

  • vegs (Sequence[float]) – List of <Delta E> values for MLMD, same length as etas.

  • etas_fp (Sequence[float]) – List of lambda/eta values for FP.

  • vegs_fp (Sequence[float]) – List of <Delta E> values for FP, same length as etas_fp.

  • save_plot (Optional[str], default=None) – If not None, save the figure to this path.

Returns:

Tuple of (MLMD integral, FP integral).

Return type:

(float, float)

ai2_kit.feat.spectrum.smiviz.gapplot.plot_vertical_energy_gaps(gap_data: DataFrame, save_plot: Optional[str] = None)[source]#

Plot vertical energy gaps for multiple columns in a DataFrame.

Parameters:
  • gap_data (pd.DataFrame) – DataFrame with a ‘time’ column and one or more energy gap columns.

  • save_plot (Optional[str], default=None) – If not None, save the figure to this path.

Return type:

None