pyqmmm.md.gbsa_analyzer

Process and analyze output from AMBER GBSA calculation

Module Contents

Functions

format_plot(→ None)

General plotting parameters for the Kulik Lab.

get_gbsa_df(→ pandas.DataFrame)

Turn the GBSA file into a parsable pd.DataFrame.

update_res_names(→ pandas.DataFrame)

Updates odd residue names to more conventional names.

get_top_hits_df(→ pandas.DataFrame)

Gets the residues with the greatest energetic contributions.

plot_single_total_gbsa(→ None)

Plot the total GBSA energy scores for each residue.

plot_clustered_stacked(df, y_columns, sorted_x_labels)

Plot the GBSA energy by type for a single dataframe.

plot_all_gbsa(→ None)

Plot the GBSA energy scores by type for a single dataframe.

analyze(→ None)

Main GBSA analysis wrapper function for a single dataset.

pyqmmm.md.gbsa_analyzer.format_plot() None[source]

General plotting parameters for the Kulik Lab.

pyqmmm.md.gbsa_analyzer.get_gbsa_df(raw, ignore_residues) pandas.DataFrame[source]

Turn the GBSA file into a parsable pd.DataFrame.

Parameters:

raw (str) – The name of the GBSA output file.

Returns:

df – The raw GBSA file as a pd.DataFrame

Return type:

pd.DataFrame

pyqmmm.md.gbsa_analyzer.update_res_names(df) pandas.DataFrame[source]

Updates odd residue names to more conventional names.

Parameters:

df (pd.DataFrame) – The raw GBSA file read in as a DataFrame.

Returns:

df – The GBSA file as a DataFrame with more intuitive residue names.

Return type:

pd.DataFrame

pyqmmm.md.gbsa_analyzer.get_top_hits_df(df, sub_num, num_hits, sorted_x_labels) pandas.DataFrame[source]

Gets the residues with the greatest energetic contributions.

The user can specify how many they would like to see.

Parameters:
  • df (pd.DataFrame) – GBSA DataFrame with the updated residue names

  • sub_num (int) – The index of your substrate

  • num_hits (int) – The number of top hits that the user would like

  • sorted_x_labels (list) – List of residue names sorted by total energy

Returns:

df_hits – The DataFrame sorted only for the residues of interest.

Return type:

pd.DataFrame

pyqmmm.md.gbsa_analyzer.plot_single_total_gbsa(df, file_name) None[source]

Plot the total GBSA energy scores for each residue.

Generates a bar plot representing the by-residue total GBSA energy. The bar plot is saved as ‘gbsa_total.svg’ in the current directory.

Parameters:
  • df (pd.DataFrame) – DataFrame containing the residue information and GBSA energies.

  • file_name (str) – Name of the file where the plot will be saved.

pyqmmm.md.gbsa_analyzer.plot_clustered_stacked(df, y_columns, sorted_x_labels)[source]

Plot the GBSA energy by type for a single dataframe.

This function generates a stacked bar plot representing the GBSA energies. for each energy type. The plot is saved as a file in the working directory.

Parameters:
  • df_hits (pd.DataFrame) – DataFrame containing the residue information and GBSA energies.

  • y_columns (list) – List of column names in df_hits that represent different components.

  • sorted_x_labels (list) – List of residue names in order that they appear on the x-axis.

pyqmmm.md.gbsa_analyzer.plot_all_gbsa(df_hits, y_columns, sorted_x_labels) None[source]

Plot the GBSA energy scores by type for a single dataframe.

Generates a stacked bar plot representing the GBSA component energies. The plot is saved as a file in the working directory.

Parameters:
  • df_hits (pd.DataFrame) – DataFrame containing the residue information and GBSA energies.

  • y_columns (list) – List of column names in df_hits that represent component energies.

  • sorted_x_labels (list) – List of residue names in the order in which they appear on the x-axis.

pyqmmm.md.gbsa_analyzer.analyze() None[source]

Main GBSA analysis wrapper function for a single dataset.