Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ParameterHandler.add_parameter docstring #970

Merged
merged 1 commit into from
Jun 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions openff/toolkit/typing/engines/smirnoff/parameters.py
Original file line number Diff line number Diff line change
Expand Up @@ -2063,11 +2063,15 @@ def add_parameter(
The SMIRKS pattern (if str) or index (if int) of the parameter directly after where
the new parameter will be added

Note that one of (parameter_kwargs, parameter) must be specified
Note that when `before` and `after` are both None, the new parameter will be appended
to the END of the parameter list.
Note that when `before` and `after` are both specified, the new parameter
will be added immediately after the parameter matching the `after` pattern or index.
Note the following behavior:
* Either `parameter_kwargs` or `parameter` must be specified.
* When `before` and `after` are both `None`, the new parameter will be appended
to the **END** of the parameter list.
* When `before` and `after` are both specified, the new parameter will be added immediately
after the parameter matching the `after` pattern or index.
* The order of parameters in a parameter list can have significant impacts on parameter assignment. For details,
see the [SMIRNOFF](https://open-forcefield-toolkit.readthedocs.io/en/latest/smirnoff.html#smirnoff-parameter-specification-is-hierarchical)
specification.

Examples
--------
Expand Down