pyqmmm.qm.plot_combined_nebs¶
Generalizable script for plotting the PES of an xyz trajectory with NEB boundaries.
Module Contents¶
Functions¶
List all NEB xyz files in the current directory, sorted numerically. |
|
|
Write the energies to a CSV file. |
|
Parse the energy from a line based on the software used. |
|
Parse the energies from an xyz trajectory file. |
|
Identify the software used for the calculation from a line. |
|
General plotting parameters. |
Collect energies from the NEB xyz files and calculate NEB boundaries. |
|
|
Plot the collected energies with NEB boundaries. |
Main function that combines previous functions to generate the plot. |
Attributes¶
- pyqmmm.qm.plot_combined_nebs.HARTREE_TO_KCAL = 627.509¶
- pyqmmm.qm.plot_combined_nebs.get_xyz_files()[source]¶
List all NEB xyz files in the current directory, sorted numerically.
- pyqmmm.qm.plot_combined_nebs.write_energies_to_csv(total_energies, filename='energy_plot_data.csv')[source]¶
Write the energies to a CSV file.
- Parameters:
total_energies (list) – List of concatenated energies for all NEBs in kcal/mol.
filename (str) – The name of the output CSV file.
- pyqmmm.qm.plot_combined_nebs.parse_energy(line, software)[source]¶
Parse the energy from a line based on the software used.
- Parameters:
line (str) – Line from the file containing energy information.
software (str) – The software used for the calculation.
- Returns:
The energy extracted from the line, in Hartrees.
- Return type:
float
- pyqmmm.qm.plot_combined_nebs.get_trajectory_energies(filename, software)[source]¶
Parse the energies from an xyz trajectory file.
- Parameters:
filename (str) – Path to the trajectory file.
software (str) – Software used for the calculation.
- Returns:
First value is a list of absolute energies for each frame, in kcal/mol. Second value is the first frame energy in kcal/mol. Third value is a list of absolute energies in Hartrees.
- Return type:
tuple
- pyqmmm.qm.plot_combined_nebs.identify_software(line)[source]¶
Identify the software used for the calculation from a line.
- Parameters:
line (str) – Line from the file.
- Returns:
Identifier of the software used for the calculation.
- Return type:
str
- pyqmmm.qm.plot_combined_nebs.collect_data()[source]¶
Collect energies from the NEB xyz files and calculate NEB boundaries.
- Returns:
list – A list of concatenated absolute energies for all NEBs in kcal/mol.
float – The first frame energy of the first NEB in kcal/mol.
list – A list of cumulative frame counts where each NEB ends.
- pyqmmm.qm.plot_combined_nebs.plot_data(total_energies_abs, first_energy_kcal_of_first_neb, dim_list, neb_boundaries)[source]¶
Plot the collected energies with NEB boundaries.
- Parameters:
total_energies_abs (list) – List of concatenated absolute energies for all NEBs in kcal/mol.
first_energy_kcal_of_first_neb (float) – The first frame energy of the first NEB in kcal/mol.
dim_list (list) – Dimensions for the plot.
neb_boundaries (list) – List of cumulative frame counts where each NEB ends.