Skip to content

Commit

Permalink
chore(main): release 6.11.0 (#474)
Browse files Browse the repository at this point in the history
* chore(main): release 6.11.0

* chore(docs): render docs

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Jannik Buhr <17450586+jmbuhr@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 5, 2024
1 parent 8fc9eef commit 814e7e5
Show file tree
Hide file tree
Showing 24 changed files with 949 additions and 918 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Changelog


## [6.11.0](https://github.com/graeter-group/kimmdy/compare/v6.10.3...v6.11.0) (2024-09-04)


### Features

* recipes with deferred RecipeSteps ([#476](https://github.com/graeter-group/kimmdy/issues/476)) ([b953130](https://github.com/graeter-group/kimmdy/commit/b95313021c0e9f869e1772fdd50de771d9d1fadc))


### Bug Fixes

* **ci:** always mark draft PRs as not green ([#473](https://github.com/graeter-group/kimmdy/issues/473)) ([bb8ce10](https://github.com/graeter-group/kimmdy/commit/bb8ce105f7aefbcdf40a6791c6f671a228b7a025))
* **ci:** we don't actually need the fail-if-draft action ([b953130](https://github.com/graeter-group/kimmdy/commit/b95313021c0e9f869e1772fdd50de771d9d1fadc))

## [6.10.3](https://github.com/graeter-group/kimmdy/compare/v6.10.2...v6.10.3) (2024-08-20)


Expand Down
27 changes: 14 additions & 13 deletions _reference/kmc.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,23 @@ and because we have one reactant molecule

| Name | Description |
| --- | --- |
| [KMCResult](#kimmdy.kmc.KMCResult) | The result of a KMC step. Similar to a Recipe but for the concrete realization of a reaction. |
| [KMCAccept](#kimmdy.kmc.KMCAccept) | The result of a KMC step. Similar to a Recipe but for the concrete realization of a reaction. |

### KMCResult { #kimmdy.kmc.KMCResult }
### KMCAccept { #kimmdy.kmc.KMCAccept }

`kmc.KMCResult(self, recipe=lambda: Recipe([], [], [])(), reaction_probability=None, time_delta=None, time_start=None)`
`kmc.KMCAccept(self, recipe, reaction_probability, time_delta, time_start, time_start_index, time_start_index_within_plugin=None)`

The result of a KMC step. Similar to a Recipe but for the concrete realization of a reaction.

#### Attributes

| Name | Type | Description |
|----------------------|---------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| recipe | [Recipe](`kimmdy.recipe.Recipe`) | Single sequence of RecipeSteps to build product |
| reaction_probability | [Optional](`typing.Optional`)\[[list](`list`)\[[float](`float`)\]\] | Integral of reaction propensity with respect to time |
| time_delta | [Optional](`typing.Optional`)\[[float](`float`)\] | MC time jump during which the reaction occurs [ps] |
| time_start | [Optional](`typing.Optional`)\[[float](`float`)\] | Time, from which the reaction starts. The reaction changes the geometry/topology of this timestep and continues from there. [ps] |
| Name | Type | Description |
|----------------------|--------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------|
| recipe | [Recipe](`kimmdy.recipe.Recipe`) | Single sequence of RecipeSteps to build product |
| reaction_probability | [list](`list`)\[[float](`float`)\] \| None | Integral of reaction propensity with respect to time |
| time_delta | [float](`float`) | MC time jump during which the reaction occurs [ps] |
| time_start | [float](`float`) | Time, from which the reaction starts. The reaction changes the geometry/topology of this timestep and continues from there. [ps] |
| time_start_index | [int](`int`) | Index into the list of timesteps or rates of the timestep where the reaction starts |

## Functions

Expand All @@ -42,7 +43,7 @@ The result of a KMC step. Similar to a Recipe but for the concrete realization o

### extrande { #kimmdy.kmc.extrande }

`kmc.extrande(recipe_collection, tau_scale, logger=logging.getLogger(__name__), rng=default_rng())`
`kmc.extrande(recipe_collection, tau_scale, rng=default_rng())`

Extrande KMC

Expand All @@ -66,7 +67,7 @@ Implemented as in

### extrande_mod { #kimmdy.kmc.extrande_mod }

`kmc.extrande_mod(recipe_collection, tau_scale, logger=logging.getLogger(__name__), rng=default_rng())`
`kmc.extrande_mod(recipe_collection, tau_scale, rng=default_rng())`

Modified Extrande KMC

Expand Down Expand Up @@ -97,7 +98,7 @@ containing constant rates.

### frm { #kimmdy.kmc.frm }

`kmc.frm(recipe_collection, logger=logging.getLogger(__name__), rng=default_rng(), MD_time=None)`
`kmc.frm(recipe_collection, rng=default_rng(), MD_time=None)`

First Reaction Method variant of Kinetic Monte Carlo.
takes RecipeCollection and choses a recipe based on which reaction would occur.
Expand All @@ -114,7 +115,7 @@ Compare e.g. [Wikipedia KMC - time dependent](https://en.wikipedia.org/wiki/Kine

### rf_kmc { #kimmdy.kmc.rf_kmc }

`kmc.rf_kmc(recipe_collection, logger=logging.getLogger(__name__), rng=default_rng())`
`kmc.rf_kmc(recipe_collection, rng=default_rng())`

Rejection-Free Monte Carlo.
Takes RecipeCollection and choses a recipe based on the relative propensity of the events.
Expand Down
37 changes: 26 additions & 11 deletions _reference/recipe.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Contains the Reaction Recipe, RecipeStep and RecipeCollection.
| [CustomTopMod](#kimmdy.recipe.CustomTopMod) | A custom recipe step that can be used to define a custom topology modification. |
| [Place](#kimmdy.recipe.Place) | Change topology and/or coordinates to place an atom. |
| [Recipe](#kimmdy.recipe.Recipe) | A reaction path defined by one series of RecipeSteps. |
| [RecipeCollection](#kimmdy.recipe.RecipeCollection) | A RecipeCollection encompasses a number of reaction paths. |
| [RecipeCollection](#kimmdy.recipe.RecipeCollection) | A RecipeCollection encompasses a list of reaction paths. |
| [RecipeStep](#kimmdy.recipe.RecipeStep) | Base class for all RecipeSteps. |
| [Relax](#kimmdy.recipe.Relax) | Start a relaxation MD. |

Expand Down Expand Up @@ -113,18 +113,19 @@ product state from the educt state.

#### Parameters

| Name | Type | Description | Default |
|----------------|------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| `recipe_steps` | [list](`list`)\[[RecipeStep](`kimmdy.recipe.RecipeStep`)\] | Single sequence of RecipeSteps to build product | _required_ |
| `rates` | [list](`list`)\[[float](`float`)\] | Reaction rates corresponding 1:1 to timespans. | _required_ |
| `timespans` | [list](`list`)\[[list](`list`)\[[float](`float`), [float](`float`)\]\] | List of half-open timespans (t1, t2] in ps, at which this rate is valid. Recipe steps which change the coordinates only need to be applicable at the first time in the interval. Must have same number of timespans as rates. t1 can equal t2 for the last frame. | _required_ |
| Name | Type | Description | Default |
|----------------|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------|
| `recipe_steps` | [list](`list`)\[[RecipeStep](`kimmdy.recipe.RecipeStep`)\] \| [DeferredRecipeSteps](`kimmdy.recipe.DeferredRecipeSteps`) | Can be a single sequence of RecipeSteps to modify the topology or a tuple with a key and a function that takes said key to generate the RecipeSteps once it has been choosen. It is up to the ReactionPlugins to choose how to match the key to the their internal state and return the RecipeSteps. | _required_ |
| `rates` | [list](`list`)\[[float](`float`)\] | Reaction rates corresponding 1:1 to timespans. | _required_ |
| `timespans` | [list](`list`)\[[list](`list`)\[[float](`float`), [float](`float`)\]\] | List of half-open timespans (t1, t2] in ps, at which this rate is valid. Recipe steps which change the coordinates only need to be applicable at the first time in the interval. Must have same number of timespans as rates. t1 can equal t2 for the last frame. | _required_ |

#### Methods

| Name | Description |
| --- | --- |
| [check_consistency](#kimmdy.recipe.Recipe.check_consistency) | Run consistency checks for correct size of variables |
| [combine_with](#kimmdy.recipe.Recipe.combine_with) | Combines this Recipe with another with the same RecipeSteps. |
| [get_vmd_selection](#kimmdy.recipe.Recipe.get_vmd_selection) | Get a VMD selection string |

##### check_consistency { #kimmdy.recipe.Recipe.check_consistency }

Expand All @@ -144,18 +145,26 @@ Combines this Recipe with another with the same RecipeSteps.
|---------|----------------------------------|---------------|------------|
| `other` | [Recipe](`kimmdy.recipe.Recipe`) | | _required_ |

##### get_vmd_selection { #kimmdy.recipe.Recipe.get_vmd_selection }

`recipe.Recipe.get_vmd_selection()`

Get a VMD selection string

for the atoms involved in the recipe steps.

### RecipeCollection { #kimmdy.recipe.RecipeCollection }

`recipe.RecipeCollection(self, recipes)`

A RecipeCollection encompasses a number of reaction paths.
A RecipeCollection encompasses a list of reaction paths.
They can originate from multiple reaction plugins, but do not need to.

#### Returns
#### Parameters

| Type | Description |
|--------------------------------------------|--------------------------------------------------------------------------------|
| [unique_recipes_ixs](`unique_recipes_ixs`) | List of lists binning the old recipe indices and maps to the new recipes list. |
| Name | Type | Description | Default |
|-----------|----------------------------------------------------|-------------------------|------------|
| `recipes` | [list](`list`)\[[Recipe](`kimmdy.recipe.Recipe`)\] | List of Recipe objects. | _required_ |

#### Methods

Expand All @@ -174,6 +183,12 @@ They can originate from multiple reaction plugins, but do not need to.

Combines reactions having the same sequence of RecipeSteps.

###### Returns

| Type | Description |
|--------------------------------------------|--------------------------------------------------------------------------------|
| [unique_recipes_ixs](`unique_recipes_ixs`) | List of lists binning the old recipe indices and maps to the new recipes list. |

##### calc_cumprob { #kimmdy.recipe.RecipeCollection.calc_cumprob }

`recipe.RecipeCollection.calc_cumprob()`
Expand Down
28 changes: 14 additions & 14 deletions _reference/runmanager.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ rest of the program and keeps track of global state.

#### Attributes

| Name | Type | Description |
|-------------------|-----------------------------------------------------------------------------------------|------------------------------------------------------------|
| config | [Config](`kimmdy.config.Config`) | The configuration object. |
| tasks | [queue](`queue`).[Queue](`queue.Queue`)\[[Task](`kimmdy.tasks.Task`)\] | Tasks from config. |
| priority_tasks | [queue](`queue`).[Queue](`queue.Queue`)\[[Task](`kimmdy.tasks.Task`)\] | Additional tasks added during the run by other tasks. |
| iteration | [int](`int`) | Current iteration. |
| state | [State](`kimmdy.runmanager.State`) | Current state of the system. |
| recipe_collection | [RecipeCollection](`kimmdy.recipe.RecipeCollection`) | Collection of recipes. |
| latest_files | [dict](`dict`)\[[str](`str`), [Path](`pathlib.Path`)\] | Dictionary of latest files. |
| histfile | [Path](`pathlib.Path`) | Path to history file. |
| top | | Topology object. |
| filehist | [list](`list`)\[[dict](`dict`)\[[str](`str`), [TaskFiles](`kimmdy.tasks.TaskFiles`)\]\] | List of dictionaries of TaskFiles. |
| task_mapping | | Mapping of task names to runmanager methods. |
| reaction_plugins | [list](`list`)\[[ReactionPlugin](`kimmdy.plugins.ReactionPlugin`)\] | List of initialized reaction plugins used in the sequence. |
| Name | Type | Description |
|--------------------|-----------------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
| config | [Config](`kimmdy.config.Config`) | The configuration object. |
| tasks | [queue](`queue`).[Queue](`queue.Queue`)\[[Task](`kimmdy.tasks.Task`)\] | Tasks from config. |
| priority_tasks | [queue](`queue`).[Queue](`queue.Queue`)\[[Task](`kimmdy.tasks.Task`)\] | Additional tasks added during the run by other tasks. |
| iteration | [int](`int`) | Current iteration. |
| state | [State](`kimmdy.runmanager.State`) | Current state of the system. |
| recipe_collections | [dict](`dict`)\[[str](`str`), [RecipeCollection](`kimmdy.recipe.RecipeCollection`)\] | Dictionary of recipe collections. Keyed by the name of the reaction plugin. |
| latest_files | [dict](`dict`)\[[str](`str`), [Path](`pathlib.Path`)\] | Dictionary of latest files. |
| histfile | [Path](`pathlib.Path`) | Path to history file. |
| top | | Topology object. |
| filehist | [list](`list`)\[[dict](`dict`)\[[str](`str`), [TaskFiles](`kimmdy.tasks.TaskFiles`)\]\] | List of dictionaries of TaskFiles. |
| task_mapping | | Mapping of task names to runmanager methods. |
| reaction_plugins | [list](`list`)\[[ReactionPlugin](`kimmdy.plugins.ReactionPlugin`)\] | List of initialized reaction plugins used in the sequence. |

#### Methods

Expand Down
2 changes: 1 addition & 1 deletion _reference/tasks.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Files which can not be found by get_latest must be added manually.
>>> def get_latest(self, s):
>>> return f"latest {s}"
>>> runmng = run()
>>> files = TaskFiles(runmng)
>>> files = TaskFiles(runmng.get_latest)
>>> files.input
>>> files.input["top"]
{'top': 'latest top'}
Expand Down
2 changes: 2 additions & 0 deletions _reference/utils.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ Check for an existing gromacs installation.
If PLUMED is meant to be used it additionally checks for the keyword
'MODIFIED' or 'plumed' in the version name.

If slow growth pairs are used, it checks for gromacs version >= 2023.2

### get_atominfo_from_atomnrs { #kimmdy.utils.get_atominfo_from_atomnrs }

`utils.get_atominfo_from_atomnrs(atomnrs, top)`
Expand Down
Loading

0 comments on commit 814e7e5

Please sign in to comment.