wekap.Kinetics

class wekap.Kinetics(direct=None, assign=None, statepop='direct', tau=1e-10, state=1, label=None, units='rates', ax=None, savefig=None, color=None, moltime=True, cumulative_avg=True, linewidth=None, linestyle='-', postprocess_func=None, red=False, *args, **kwargs)

Plot the fluxes and rates from direct.h5 files.

__init__(direct=None, assign=None, statepop='direct', tau=1e-10, state=1, label=None, units='rates', ax=None, savefig=None, color=None, moltime=True, cumulative_avg=True, linewidth=None, linestyle='-', postprocess_func=None, red=False, *args, **kwargs)
Parameters:
  • direct (str) – Name of output direct.h5 file from WESTPA w_direct or w_ipa.

  • assign (str) – Default None (and will search for a file names assign.h5 in the same dir). Otherwise can specify a specific assign.h5 file. Needed for labeled population data.

  • tau (float) – The resampling interval of the WE simualtion. This should be in seconds, default 100ps = 100 * 10^-12 (s).

  • state (int) – State for flux calculations (flux into state), 0 = A and 1 = B.

  • label (str) – Data label.

  • statepop (str) – ‘direct’ for state_population_evolution from direct.h5 or ‘assign’ for labeled_populations from assign.h5.

  • units (str) – Can be rates (default) or mfpts.

  • ax (mpl axes object)

  • savefig (str) – Path to optionally save the figure.

  • color (str) – Color of the line plot. Default None for mpl tab10 colors.

  • moltime (bool) – Default True, use molecular time on X axis, otherwise use WE iteration.

  • cumulative_avg (bool) – Set to True (default) when kinetics were calculated with cumulative averaging. Only relevant with assign.h5 state populations.

  • linewidth (float)

  • linestyle (str)

  • postprocess_func (func) – User function to import.

  • red (bool) – Optionally use flux evolution data calculated using the Rate from Event Durations (RED) scheme. Set to True to use the red_flux_evolution dataset.

  • ** args

  • ** kwargs

Methods

__init__([direct, assign, statepop, tau, ...])

Parameters:
  • direct (str) -- Name of output direct.h5 file from WESTPA w_direct or w_ipa.

extract_rate()

Get the raw rate array from one direct.h5 file.

format_rate_plot()

General formatting options for rate plots.

get_state_pop()

Update self.state_pops, self.state_pop_a, and self.state_pop_b based on self.direct_h5 and self.assign_h5

load_module(module_name[, path])

Load and return the given module, recursively loading containing packages as necessary.

plot_exp_vals([ax, f_range, d2d1, f_range_all])

f_range : bool

plot_multi_rates(multi_direct)

Plot multiple direct.h5 flux evolution datasets.

plot_rate()

Plot the rate constant = target flux evolution AB / P_A

plot_statepop()

Plot the state populations