pyqmmm.qm.residue_decomposition

Extract and compare energies from a residue decomposition analysis

Module Contents

Functions

natural_sort(s)

Splits the input string on digits and returns a list with

get_energy(filename)

Extracts the final energy from the input file.

process_directory(path, ignore)

Processes directories, finding 'qmscript.out' files and retrieving energies.

plot_data(df)

Plots data from the DataFrame.

format_plot(→ None)

General plotting parameters for the Kulik Lab.

residue_decomposition()

Performs the residue decomposition analysis, reading in energy

pyqmmm.qm.residue_decomposition.natural_sort(s)[source]

Splits the input string on digits and returns a list with integers for digit components and lower-case strings for others.

Parameters:

s (str) – Input string to be split.

Returns:

List of integers and lower-case strings.

Return type:

list

pyqmmm.qm.residue_decomposition.get_energy(filename)[source]

Extracts the final energy from the input file.

Parameters:

filename (str) – Path to the file.

Returns:

Final energy found in the file, or None if not found.

Return type:

float

pyqmmm.qm.residue_decomposition.process_directory(path, ignore)[source]

Processes directories, finding ‘qmscript.out’ files and retrieving energies.

Parameters:
  • path (str) – Directory to process.

  • ignore (list) – List of directory names to ignore.

Returns:

Dictionary of {dir_name: energy} pairs.

Return type:

dict

pyqmmm.qm.residue_decomposition.plot_data(df)[source]

Plots data from the DataFrame.

Parameters:

df (pandas.DataFrame) – DataFrame containing the data to plot.

pyqmmm.qm.residue_decomposition.format_plot() None[source]

General plotting parameters for the Kulik Lab.

pyqmmm.qm.residue_decomposition.residue_decomposition()[source]

Performs the residue decomposition analysis, reading in energy data from files, processing, plotting and saving the results.