analysis
analysis
Analysis tools for KIMMDY runs. For command line usage, run kimmdy-analysis -h
.
Functions
Name | Description |
---|---|
concat_traj | Find and concatenate trajectories (.xtc files) from a KIMMDY run into one trajectory. |
entry_point_analysis | Analyse existing KIMMDY runs. |
get_analysis_cmdline_args | Parse command line arguments. |
get_analysis_dir | Get analysis directory for a KIMMDY run. |
plot_energy | Plot GROMACS energy for a KIMMDY run. |
plot_rates | Plot rates of all possible reactions for each ‘decide_recipe’ step. |
radical_migration | Plot population of radicals for a KIMMDY run. |
radical_population | Plot population of radicals for a KIMMDY run. |
reaction_participation | Plot which atoms participate in reactions. |
runtime_analysis | Plot which atoms participate in reactions. |
concat_traj
dir, filetype, steps, open_vmd=False, output_group=None) analysis.concat_traj(
Find and concatenate trajectories (.xtc files) from a KIMMDY run into one trajectory. The concatenated trajectory is centered and pbc corrected.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | Directory to search for subdirectories | required |
steps | Union[list[str], str] | List of steps e.g. [“equilibrium”, “production”]. Or a string “all” to return all subdirectories | required |
open_vmd | bool | Open concatenated trajectory in VMD | False |
output_group | Optional[str] | index group for output. Default is “Protein” for xtc and “System” for trr. | None |
entry_point_analysis
analysis.entry_point_analysis()
Analyse existing KIMMDY runs.
get_analysis_cmdline_args
analysis.get_analysis_cmdline_args()
Parse command line arguments.
Returns
Name | Type | Description |
---|---|---|
Parsed command line arguments |
get_analysis_dir
dir) analysis.get_analysis_dir(
Get analysis directory for a KIMMDY run.
Creates the directory if it does not exist.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | Path | Directory of KIMMDY run | required |
Returns
Name | Type | Description |
---|---|---|
Path to analysis directory |
plot_energy
dir, steps, terms, open_plot=False) analysis.plot_energy(
Plot GROMACS energy for a KIMMDY run.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | Directory to search for subdirectories | required |
steps | Union[list[str], str] | List of steps e.g. [“equilibrium”, “production”]. Or a string “all” to return all subdirectories. Default is “all”. | required |
terms | list[str] | Terms from gmx energy that will be plotted. Uses ‘Potential’ by default. | required |
open_plot | bool | Open plot in default system viewer. | False |
plot_rates
dir, open=False) analysis.plot_rates(
Plot rates of all possible reactions for each ‘decide_recipe’ step.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | Directory of KIMMDY run | required |
open | bool | open plots in default system viewer | False |
radical_migration
type='qualitative', cutoff=1) analysis.radical_migration(dirs,
Plot population of radicals for a KIMMDY run.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dirs | list[str] | KIMMDY run directories to be analysed. | required |
type | str | How to analyse radical migration. Available are ‘qualitative’,‘occurence’ and ‘min_rate’“, | 'qualitative' |
cutoff | int | Ignore migration between two atoms if it happened less often than the specified value. | 1 |
radical_population
analysis.radical_population(dir
='frequency'
population_type='all'
steps='protein'
select_atoms=False
open_plot=False
open_vmd )
Plot population of radicals for a KIMMDY run.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | KIMMDY run directory to be analysed. | required |
population_type | str | How to calculate the fractional radical occupancy. Available are ‘frequency’ and ‘time’ | 'frequency' |
steps | Union[list[str], str] | List of steps e.g. [“equilibrium”, “production”]. Or a string “all” to return all subdirectories. Default is “all”. | 'all' |
select_atoms | str | Atoms chosen for radical population analysis, default is protein (uses MDAnalysis selection syntax) | 'protein' |
open_plot | bool | Open plot in default system viewer. | False |
open_vmd | bool | Open a pdb in VMD with the radical occupation as B-factors. | False |
reaction_participation
dir, open_plot=False) analysis.reaction_participation(
Plot which atoms participate in reactions.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | Directory of KIMMDY run | required |
open_plot | bool | Open plot in default system viewer. | False |
runtime_analysis
dir, open_plot=False) analysis.runtime_analysis(
Plot which atoms participate in reactions.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir | str | Directory of KIMMDY run | required |
open_plot | bool | Open plot in default system viewer. | False |