perses.analysis.Analysis¶
-
class
perses.analysis.
Analysis
(storage_filename)[source]¶ Analysis tools for perses automated design.
Methods
extract_logP_values
(environment, …[, …])Extract the requested logP_accept component from the ExpandedEnsembleSampler in the requested environment extract_state_trajectory
(environment)Extract the trajectory in chemical state space get_environments
()Return a list of environments in storage file. get_free_energies
(environment)Estimate the free energies between all pairs with bidirectional transitions of chemical states in the given environment plot_chemical_trajectory
(environment, filename)Plot the trajectory through chemical space. plot_exen_logp_components
(environment[, …])Generate histograms of each component of Expanded Ensemble log acceptance probability plot_ncmc_work_distributions
(environment, …)Plot the forward and reverse work distributions for NCMC switching in the given environment plot_ncmc_work_old
(filename)Generate plots of NCMC work. plot_sams_weights
(environment)Plot the trajectory of SAMS weights :param environment: :return: plot_work_trajectories
(environment, filename)Plot the NCMC work trajectories for the given environment and each attempted transition write_trajectory
(environmnent, pdb_filename)Write the trajectory of sampled configurations and chemical states. Methods
__init__
(storage_filename)Open a storage file for analysis. extract_logP_values
(environment, …[, …])Extract the requested logP_accept component from the ExpandedEnsembleSampler in the requested environment extract_state_trajectory
(environment)Extract the trajectory in chemical state space get_environments
()Return a list of environments in storage file. get_free_energies
(environment)Estimate the free energies between all pairs with bidirectional transitions of chemical states in the given environment plot_chemical_trajectory
(environment, filename)Plot the trajectory through chemical space. plot_exen_logp_components
(environment[, …])Generate histograms of each component of Expanded Ensemble log acceptance probability plot_ncmc_work_distributions
(environment, …)Plot the forward and reverse work distributions for NCMC switching in the given environment plot_ncmc_work_old
(filename)Generate plots of NCMC work. plot_sams_weights
(environment)Plot the trajectory of SAMS weights :param environment: :return: plot_work_trajectories
(environment, filename)Plot the NCMC work trajectories for the given environment and each attempted transition write_trajectory
(environmnent, pdb_filename)Write the trajectory of sampled configurations and chemical states. -
extract_logP_values
(environment, logP_accept_component, subtract_sams=False)[source]¶ Extract the requested logP_accept component from the ExpandedEnsembleSampler in the requested environment
Parameters: - environment : str
The name of the environment
- logP_accept_component : str
The name of the component of the acceptance probability that we want
- subtract_sams : bool, optional, default False
Whether to subtract the SAMS weights corresponding to the same iteration. Useful for logP_accept.
Returns: - logP_values : dict of (str, str)
A dictionary for each state transition, with a list of the requested logP_accept component
-
extract_state_trajectory
(environment)[source]¶ Extract the trajectory in chemical state space
Parameters: - environment : str
The environment for which the chemical state is desired
- chemical_state_trajectory : list of str
The trajectory in chemical space for the given environment
Returns: - chemical_state_traj : list of str
List of chemical states that were visited
-
get_environments
()[source]¶ Return a list of environments in storage file.
Returns: - environments : list of str
List of environment names in storage (e.g. []’explicit-complex’, ‘explicit-ligand’])
-
get_free_energies
(environment)[source]¶ Estimate the free energies between all pairs with bidirectional transitions of chemical states in the given environment
Parameters: - environment : str
The name of the environment for which free energies are desired
Returns: - free_energies : dict of (str, str): [float, float]
Dictionary of pairwaise free energies and their uncertainty, computed with bootstrapping
-
plot_chemical_trajectory
(environment, filename)[source]¶ Plot the trajectory through chemical space.
Parameters: - environment : str
the name of the environment for which the chemical space trajectory is desired
-
plot_exen_logp_components
(environment, filename_prefix=None, logP_range=20, nbins=20)[source]¶ Generate histograms of each component of Expanded Ensemble log acceptance probability
-
plot_ncmc_work_distributions
(environment, output_filename)[source]¶ Plot the forward and reverse work distributions for NCMC switching in the given environment
Parameters: - environment : str
The name of the environment for which NCMC work should be plotted
- output_filename : str
The name of the PDF file to output
-
plot_ncmc_work_old
(filename)[source]¶ Generate plots of NCMC work.
Parameters: - filename : str
File to write PDF of NCMC work plots to.
-
plot_sams_weights
(environment)[source]¶ Plot the trajectory of SAMS weights :param environment: :return:
-