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. |
get_step_directories | create list of subdirectories that match the steps. |
plot_energy | Plot GROMACS energy for a KIMMDY run. |
plot_rates | Plot rates of all possible reactions for each ‘decide_recipe’ step. |
plot_runtime | Plot runtime of all tasks. |
radical_population | Plot population of radicals for a KIMMDY run. |
concat_traj
analysis.concat_traj(dir, steps, open_vmd=False)
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 |
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
Type | Description |
---|---|
Parsed command line arguments |
get_analysis_dir
analysis.get_analysis_dir(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
Type | Description |
---|---|
Path to analysis directory |
get_step_directories
analysis.get_step_directories(dir, steps='all')
create list of subdirectories that match the steps. If steps is “all”, all subdirectories are returned.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir |
Path | 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 | 'all' |
plot_energy
analysis.plot_energy(dir, steps, terms, open_plot=False)
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
analysis.plot_rates(dir)
Plot rates of all possible reactions for each ‘decide_recipe’ step.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir |
str | Directory of KIMMDY run | required |
plot_runtime
analysis.plot_runtime(dir, md_tasks, datefmt, open_plot=False)
Plot runtime of all tasks.
Parameters
Name | Type | Description | Default |
---|---|---|---|
dir |
str | Directory of KIMMDY run | required |
md_tasks |
list | Names of MD tasks to color | required |
datefmt |
str | Date format in the KIMMDY logfile | required |
open_plot |
bool | Open plot in default system viewer. | False |
radical_population
analysis.radical_population(dir, population_type='frequency', steps='all', select_atoms='protein', open_plot=False, open_vmd=False)
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 |