catmap.analyze package

Submodules

catmap.analyze.analysis_base module

class catmap.analyze.analysis_base.MapPlot[source]

Class for generating plots using a dictionary of default plotting attributes.

The following attributes can be modified:

Parameters:
  • resolution_enhancement (int) – Resolution enhancement for interpolated maps
  • min – Minimum
  • max – Maximum
  • n_ticks (int) – Number of ticks
  • descriptor_labels (list) – Label of descriptors
  • default_descriptor_pt_args (dict) – Dictionary of descriptor point arguments
  • default_descriptor_label_args (dict) – Dictionary of descriptor labels
  • descriptor_pt_args (dict) –
  • include_descriptors (bool) – Include the descriptors
  • plot_size (int) – Size of the plot
  • aspect
  • subplots_adjust_kwargs (dict) – Dictionary of keyword arguments for adjusting matplotlib subplots

Todo

Some missing descriptions

__init__()[source]
__module__ = 'catmap.analyze.analysis_base'
plot_descriptor_pts(mapp, idx, ax, plot_in=None)[source]

Plot descriptor points

Parameters:
  • mapp
  • idx
  • ax – axes object
  • plot_in

Todo

__doc__

plot_separate(mapp, ax_list=None, indices=None, overlay_map=None, **plot_single_kwargs)[source]

Generate separate plots

Todo

__doc__

plot_single(mapp, rxn_index, ax=None, overlay_map=None, alpha_range=None, **plot_args)[source]
Parameters:
  • mapp
  • rxn_index (int) – Index for the reaction
  • ax – axes object
  • overlay_map

Todo

__doc__

plot_weighted(mapp, ax=None, weighting='linear', second_map=None, indices=None, **plot_args)[source]

Generate weighted plot

Parameters:
  • mapp
  • ax – axes object
  • weighting (str) – weighting function, ‘linear’ or ‘dual’.
  • second_map
  • indices

Todo

__doc__

save(fig, save=True, default_name='map_plot.pdf')[source]
Parameters:
  • fig – figure object
  • save (bool) – save the figure
  • default_name – default name for the saved figure.
update_descriptor_args()[source]

Update descriptor arguments

Todo

__doc__

class catmap.analyze.analysis_base.MechanismPlot(energies, barriers=[], labels=[])[source]

Class for generating potential energy diagrams

Parameters:
  • energies (list) – list of energies
  • barriers (list) – list of barriers
  • labels (list) – list of labels
__init__(energies, barriers=[], labels=[])[source]
__module__ = 'catmap.analyze.analysis_base'
draw(ax=None)[source]

Draw the potential energy diagram

Todo

__doc__

class catmap.analyze.analysis_base.ScalingPlot(descriptor_names, descriptor_dict, surface_names, parameter_dict, scaling_function, x_axis_function, scaling_function_kwargs={}, x_axis_function_kwargs={})[source]
Parameters:
  • descriptor_names (list) – list of descriptor names
  • descriptor_dict (dict) – dictionary of descriptors
  • surface_names (list) – list of the surface names
  • parameter_dict (dict) – dictionary of parameters
  • scaling_function (function) – function to project descriptors into energies. Should take descriptors as an argument and return a dictionary of {adsorbate:energy} pairs.
  • x_axis_function (function) – function to project descriptors onto the x-axis. Should take descriptors as an argument and return a dictionary of {adsorbate:x_value} pairs.
  • scaling_function_kwargs (dict) – keyword arguments for scaling_function.
  • x_axis_function_kwargs (dict) – keyword arguments for x_axis_function.
__init__(descriptor_names, descriptor_dict, surface_names, parameter_dict, scaling_function, x_axis_function, scaling_function_kwargs={}, x_axis_function_kwargs={})[source]
__module__ = 'catmap.analyze.analysis_base'
plot(ax_list=None, plot_size=4.0, save=None)[source]
Parameters:
  • ax_list ([ax]) – list of axes objects
  • plot_size (float) – size of the plot
  • save (bool) – whether or not to save the plot

Todo

__doc__

catmap.analyze.analysis_base.boltzmann_vector(energy_list, vector_list, temperature)[source]

Create a vector which is a Boltzmann average of the vector_list weighted with energies in the energy_list.

Parameters:
  • energy_list (float) – List of energies
  • vector_list – List of vectors
  • temperature – Temperature
catmap.analyze.analysis_base.get_colors(n_colors)[source]

Get n colors from basic_colors.

Parameters:n_colors (int) – Number of colors

catmap.analyze.matrix_map module

class catmap.analyze.matrix_map.MatrixMap(reaction_model)[source]

Bases: catmap.analyze.vector_map.VectorMap

Todo

__doc__

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__init__(reaction_model)
__module__ = 'catmap.analyze.matrix_map'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

get_included_indices(pts, cols)

Todo

__doc__

get_labels()[source]

Todo

__doc__

get_pts_cols()[source]

Todo

__doc__

include_labels_to_idxs()[source]

Todo

__doc__

plot(ax=None, ax_list=None, save=True)

Todo

__doc__

plot_descriptor_pts(mapp, idx, ax, plot_in=None)

Plot descriptor points

Parameters:
  • mapp
  • idx
  • ax – axes object
  • plot_in

Todo

__doc__

plot_separate(mapp, ax_list=None, indices=None, overlay_map=None, **plot_single_kwargs)

Generate separate plots

Todo

__doc__

plot_single(mapp, rxn_index, ax=None, overlay_map=None, alpha_range=None, **plot_args)
Parameters:
  • mapp
  • rxn_index (int) – Index for the reaction
  • ax – axes object
  • overlay_map

Todo

__doc__

plot_weighted(mapp, ax=None, weighting='linear', second_map=None, indices=None, **plot_args)

Generate weighted plot

Parameters:
  • mapp
  • ax – axes object
  • weighting (str) – weighting function, ‘linear’ or ‘dual’.
  • second_map
  • indices

Todo

__doc__

save(fig, save=True, default_name='map_plot.pdf')
Parameters:
  • fig – figure object
  • save (bool) – save the figure
  • default_name – default name for the saved figure.
update_descriptor_args()

Update descriptor arguments

Todo

__doc__

catmap.analyze.mechanism module

class catmap.analyze.mechanism.MechanismAnalysis(reaction_model=None)[source]

Bases: catmap.analyze.analysis_base.MechanismPlot, catmap.ReactionModelWrapper, catmap.analyze.analysis_base.MapPlot

A simple tool for the generation of potential energy diagrams from a reaction network.

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__init__(reaction_model=None)[source]

Class for generating potential energy diagrams.

Parameters:reaction_model – The ReactionModel object to load.
__module__ = 'catmap.analyze.mechanism'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

create_graph(mechanism=None, filename=None, exclude_sites=True, exclude_ts=False)[source]

Creates a directed acyclic graph corresponding to the reaction nework. Leaves out the surface states.

Parameters:
  • mechanism – mechanism to select for the graph
  • filename – filename for output
  • exclude_sites – boolean for whether to exclude sites from graph
  • exclude_ts – boolean for whether to exclude transition states from graph
draw(ax=None)

Draw the potential energy diagram

Todo

__doc__

label_maker(species)[source]

Todo

__doc__

plot(ax=None, plot_variants=None, mechanisms=None, labels=None, save=True)[source]

Generates the potential energy diagram plot

Parameters:
  • ax – Matplotlib Axes object to optionally plot into
  • plot_variants – Which PEDs to plot. Defaults to all surfaces or all applied voltages
  • plot_variants – list of voltages (if electrochemical) or descriptor tuples to plot
  • mechanisms ({string:[int]}) – Which reaction pathways to plot. Each integer corresponds to an elementary step. Elementary steps are indexed in the order that they are input with 1 being the first index. Negative integers are used to designate reverse reactions. Read in from model.rxn_mechanisms by default
  • labels ([string]) – Labels for each state. Can be generated automatically
  • save (bool) – Whether to write plot to file
plot_descriptor_pts(mapp, idx, ax, plot_in=None)

Plot descriptor points

Parameters:
  • mapp
  • idx
  • ax – axes object
  • plot_in

Todo

__doc__

plot_separate(mapp, ax_list=None, indices=None, overlay_map=None, **plot_single_kwargs)

Generate separate plots

Todo

__doc__

plot_single(mapp, rxn_index, ax=None, overlay_map=None, alpha_range=None, **plot_args)
Parameters:
  • mapp
  • rxn_index (int) – Index for the reaction
  • ax – axes object
  • overlay_map

Todo

__doc__

plot_weighted(mapp, ax=None, weighting='linear', second_map=None, indices=None, **plot_args)

Generate weighted plot

Parameters:
  • mapp
  • ax – axes object
  • weighting (str) – weighting function, ‘linear’ or ‘dual’.
  • second_map
  • indices

Todo

__doc__

save(fig, save=True, default_name='map_plot.pdf')
Parameters:
  • fig – figure object
  • save (bool) – save the figure
  • default_name – default name for the saved figure.
update_descriptor_args()

Update descriptor arguments

Todo

__doc__

catmap.analyze.scaling module

class catmap.analyze.scaling.ScalingAnalysis(reaction_model)[source]

Bases: catmap.analyze.analysis_base.ScalingPlot, catmap.ReactionModelWrapper

Todo

__doc__

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__init__(reaction_model)[source]
__module__ = 'catmap.analyze.scaling'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

get_error()[source]

Todo

__doc__

plot(ax_list=None, plot_size=4.0, save=None)
Parameters:
  • ax_list ([ax]) – list of axes objects
  • plot_size (float) – size of the plot
  • save (bool) – whether or not to save the plot

Todo

__doc__

plotter_scaling_function(descriptors, **kwargs)[source]

Todo

__doc__

plotter_x_axis_function(descriptors, **kwargs)[source]

Todo

__doc__

catmap.analyze.vector_map module

class catmap.analyze.vector_map.VectorMap(reaction_model)[source]

Bases: catmap.analyze.analysis_base.MapPlot, catmap.ReactionModelWrapper

Todo

__doc__

__getattr__(attr)

Return the value of the reaction model instance if its there. Otherwise return the instances own value (or none if the instance does not have the attribute defined and the attribute is not private)

__init__(reaction_model)[source]
__module__ = 'catmap.analyze.vector_map'
__setattr__(attr, val)

Set attribute for the instance as well as the reaction_model instance

get_included_indices(pts, cols)[source]

Todo

__doc__

get_labels()[source]

Todo

__doc__

get_pts_cols()[source]

Todo

__doc__

include_labels_to_idxs()[source]

Todo

__doc__

plot(ax=None, ax_list=None, save=True)[source]

Todo

__doc__

plot_descriptor_pts(mapp, idx, ax, plot_in=None)

Plot descriptor points

Parameters:
  • mapp
  • idx
  • ax – axes object
  • plot_in

Todo

__doc__

plot_separate(mapp, ax_list=None, indices=None, overlay_map=None, **plot_single_kwargs)

Generate separate plots

Todo

__doc__

plot_single(mapp, rxn_index, ax=None, overlay_map=None, alpha_range=None, **plot_args)
Parameters:
  • mapp
  • rxn_index (int) – Index for the reaction
  • ax – axes object
  • overlay_map

Todo

__doc__

plot_weighted(mapp, ax=None, weighting='linear', second_map=None, indices=None, **plot_args)

Generate weighted plot

Parameters:
  • mapp
  • ax – axes object
  • weighting (str) – weighting function, ‘linear’ or ‘dual’.
  • second_map
  • indices

Todo

__doc__

save(fig, save=True, default_name='map_plot.pdf')
Parameters:
  • fig – figure object
  • save (bool) – save the figure
  • default_name – default name for the saved figure.
update_descriptor_args()

Update descriptor arguments

Todo

__doc__

Module contents