Plotting#
- autode.plotting.calculate_reaction_profile_energies(reactions, units, free_energy=False, enthalpy=False)#
Calculate a list of energies comprising the reaction profile
- Parameters:
units (autode.units.Units)
- Keyword Arguments:
free_energy (bool) – Calculate ∆Gs
enthalpy (bool) – Calculate ∆Hs
- Returns:
(np.ndarray(autode.plotting.Energy))
- autode.plotting.error_on_stationary_points(x, energies)#
Calculate the difference between the stationary points of an interpolated function and those observed (given in the energies array). Example:
| . E |. / | The points indicate the true stationary points | |_/ |. |_____________ zi
- Parameters:
energies (np.ndarray) – Observed stationary points
- Returns:
A measure of the error
- Return type:
(float)
- autode.plotting.get_reaction_profile_warnings(reactions)#
Get a string of warnings for a reaction
- Returns:
List of warnings to annotate the plot with
- Return type:
(str)
- autode.plotting.get_stationary_points(xs, dydx)#
Compute the productive of the derivative at points x(i-1) and x(i) which is negative if there is a point x(k) between x(i-1) and x(i) that has dy/dx|x(k) = 0
- Parameters:
dydx (function)
- autode.plotting.plot_bracket_method_energy_profile(filename: str, left_points: List[Tuple[int, Energy]], cineb_point: tuple | None, right_points: List[Tuple[int, Energy]], x_title: str) None #
Plot the energy profile from a bracketing method run, showing the points from left and right image and final CI-NEB (if done), in different colours. Energies should be in kcal/mol.
- Parameters:
filename (str) – Filename with extension
left_points (list[tuple]) – List of tuples containing position and energies from left image
cineb_point (tuple|None) – Tuple with position and energy for CI-NEB peak
right_points (list[tuple]) – List of tuples containing position and energies from right image
x_title (str) – Title of the x-axis
- autode.plotting.plot_optimiser_profile(history: OptimiserHistory, plot_energy: bool, plot_rms_grad: bool, filename: str)#
Plot the energy and RMS gradient profile from an optimiser history. Skips plotting of points where energy/grad is not available
- Parameters:
plot_energy (bool) – Whether to plot energy or not
plot_rms_grad (bool) – Whether to plot rms grad or not
filename (str) – Name of plotted file
- autode.plotting.plot_points(zi_s, energies, ax)#
Plot a reaction profile just adding the points to the graph
- Parameters:
energies (list(autode.plotting.Energy)) – len(energies) = len(zi_s)
ax (matplotlib.axes.Axes)
- autode.plotting.plot_reaction_profile(reactions: Sequence[Reaction], units: Unit | str, name: str, free_energy: bool = False, enthalpy: bool = False) None #
For a set of reactions plot the reaction profile using matplotlib
- Parameters:
units (autode.units.Units | str)
name (str)
free_energy (bool) – Plot the free energy profile (G)
enthalpy (bool) – Plot the enthalpic profile (H)
- autode.plotting.plot_smooth_profile(zi_s, energies, ax)#
Plot a smooth reaction profile by spline interpolation and finding the stationary points. This will not afford the correct number of stationary points for some energy arrays, so raise an exception if it fails
- Parameters:
energies (list(autode.plotting.Energy)) – len(energies) = len(zi_s)
ax (matplotlib.axes.Axes)
- autode.plotting.save_plot(figure: Figure, filename: str, **kwargs)#
Save a pyplot figure
- Parameters:
figure (matplotlib.figure.Figure) – The matplotlib figure object
filename (str) – Name of the file to plot
**kwargs – Other keyword arguments for matplotlib which are passed onto figure.savefig()