Skip to content

Commit 6c2b8e6

Browse files
authored
Merge branch 'master' into link-ff-repos
2 parents ce2dd7c + c011c93 commit 6c2b8e6

File tree

12 files changed

+680
-19
lines changed

12 files changed

+680
-19
lines changed

.github/workflows/dangerbot.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: off-dangerbot
2+
3+
on:
4+
pull_request:
5+
types: assigned
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v1
14+
- name: Set up Ruby 2.6
15+
uses: actions/setup-ruby@v1
16+
with:
17+
ruby-version: 2.6.x
18+
- name: Assign reviewer if prompted
19+
# API token for off-dangerbot
20+
env:
21+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
22+
run: |
23+
gem install danger --version '~> 5.0'
24+
danger --version
25+
danger

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,9 @@ install:
7373

7474
# Install RDKit
7575
- if [[ "$RDKIT" == true ]]; then conda install --yes -c conda-forge rdkit; fi
76-
- if [[ "$RDKIT" == true ]]; then conda install --yes -c omnia ambermini; fi
76+
# This is no longer needed, since the newest version of ParmEd is only available from the
77+
# omnia:ambertools repo, which is now included in the test_env.yaml file
78+
#- if [[ "$RDKIT" == true ]]; then conda install --yes -c omnia ambermini; fi
7779

7880
# Install OpenEye
7981
- if [[ "$OPENEYE" == true ]]; then conda install -c openeye openeye-toolkits; fi
@@ -99,8 +101,10 @@ script:
99101
--nbval-lax --cov=openforcefield --cov-config=setup.cfg;
100102
fi
101103

104+
# Raise a fuss if cron jobs break
102105
notifications:
103-
email: false
106+
email:
107+
if: type = cron
104108

105109
after_success:
106110
- codecov

Dangerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Run the shared Dangerfile with these settings
2+
danger.import_dangerfile(github: "openforcefield/dangerbot")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| **Status** | [![Travis build](https://img.shields.io/travis/openforcefield/openforcefield/master.svg?logo=linux&logoColor=white)](https://travis-ci.org/openforcefield/openforcefield) [![Codecov coverage](https://img.shields.io/codecov/c/github/openforcefield/openforcefield.svg?logo=Codecov&logoColor=white)](https://codecov.io/gh/openforcefield/openforcefield) [![LGTM analysis](https://img.shields.io/lgtm/grade/python/g/openforcefield/openforcefield.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/openforcefield/openforcefield/context:python) |
22
| :------ | :------- |
3-
| **Latest Release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openforcefield.svg)](https://github.com/openforcefield/openforcefield/releases) [![Commits since release](https://img.shields.io/github/commits-since/openforcefield/openforcefield/0.5.1.svg)](https://github.com/openforcefield/openforcefield/releases/tag/0.5.1) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.597754.svg)](https://doi.org/10.5281/zenodo.597754) |
3+
| **Latest Release** | [![Last release tag](https://img.shields.io/github/release-pre/openforcefield/openforcefield.svg)](https://github.com/openforcefield/openforcefield/releases) [![Commits since release](https://img.shields.io/github/commits-since/openforcefield/openforcefield/0.6.0.svg)](https://github.com/openforcefield/openforcefield/releases/tag/0.6.0) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.597754.svg)](https://doi.org/10.5281/zenodo.597754) |
44
| **Communication** | [![docs latest](https://img.shields.io/badge/docs-latest-5077AB.svg?logo=read%20the%20docs)](https://open-forcefield-toolkit.readthedocs.io/en/latest/) [![dev chat on slack](https://img.shields.io/badge/dev_chat-on_slack-808493.svg?logo=slack)](https://join.slack.com/t/openforcefieldgroup/shared_invite/enQtNjA4MTMxMDg0MDAxLWY3Y2Q5NDY4MmU1OTIzMDhiYzFjOWFkZGFjN2Y4N2Q4OTRkOWNjODVhMDMxMzkwMDcxNDA5MjYyNjJjYjE2NTM) |
55
| **Foundation** | [![license](https://img.shields.io/github/license/openforcefield/openforcefield.svg)](https://opensource.org/licenses/MIT) [![platforms](https://img.shields.io/badge/Platforms-Linux%2C%20MacOS-orange.svg)](https://open-forcefield-toolkit.readthedocs.io/en/latest/installation.html) [![python](https://img.shields.io/badge/python-3.6%2C%203.7-blue.svg)](https://open-forcefield-toolkit.readthedocs.io/en/latest/installation.html) [![Funding](https://img.shields.io/badge/Funding-Open%20Force%20Field%20Consortium-brightgreen.svg)](http://openforcefield.org) |
66
| **Installation** | [![Releases](https://img.shields.io/badge/obtain-latest-green.svg)](https://github.com/openforcefield/openforcefield/releases) [![Conda](https://img.shields.io/conda/v/omnia/openforcefield.svg)](https://anaconda.org/omnia/openforcefield) [![Last updated](https://anaconda.org/omnia/openforcefield/badges/latest_release_relative_date.svg)](https://anaconda.org/omnia/openforcefield) [![Anaconda Cloud downloads](https://anaconda.org/omnia/openforcefield/badges/downloads.svg)](https://anaconda.org/omnia/openforcefield) |

The-SMIRNOFF-force-field-format.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ For example, to ensure water molecules are assigned partial charges for [TIP3P](
219219

220220
| LibraryCharges section tag version | Tag attributes and default values | Required parameter attributes | Optional parameter attributes |
221221
|------------------------------------|--------------------------------------|---------------------------------|-------------------------------|
222-
| 0.3 | | `smirks`, `charges` (indexed) | `name`, `id`, `parent_id` |
222+
| 0.3 | | `smirks`, `charge` (indexed) | `name`, `id`, `parent_id` |
223223

224224

225225

devtools/conda-envs/test_env.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ dependencies:
1313
- pytest-cov
1414
- nbval
1515
- codecov
16-
- coverage
16+
- coverage < 5.0
1717
- numpy
1818
- networkx
19-
- parmed
19+
- ambertools
2020
- packaging
2121
- openmmtools
2222
- openforcefields

docs/releasehistory.rst

Lines changed: 44 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,26 @@ Releases follow the ``major.minor.micro`` scheme recommended by `PEP440 <https:/
88
* ``micro`` increments represent bugfix releases or improvements in documentation
99

1010

11-
Current Development
12-
-------------------
11+
0.6.0 - Library Charges
12+
-----------------------
13+
14+
This release adds support for a new SMIRKS-based charge assignment method,
15+
`Library Charges <https://open-forcefield-toolkit.readthedocs.io/en/latest/smirnoff.html#librarycharges-library-charges-for-polymeric-residues-and-special-solvent-models>`_.
16+
The addition of more charge assignment methods opens the door for new types of
17+
experimentation, but also introduces several complex behaviors and failure modes.
18+
Accordingly, we have made changes
19+
to the charge assignment infrastructure to check for cases when partial charges do
20+
not sum to the formal charge of the molecule, or when no charge assignment method is able
21+
to generate charges for a molecule. More detailed explanation of the new errors that may be raised and
22+
keywords for overriding them are in the "Behavior Changed" section below.
23+
24+
25+
With this release, we update ``test_forcefields/tip3p.offxml`` to be a working example of assigning LibraryCharges.
26+
However, we do not provide any force field files to assign protein residue ``LibraryCharges``.
27+
If you are interested in translating an existing protein FF to SMIRNOFF format or developing a new one, please
28+
feel free to contact us on the `Issue tracker <https://github.com/openforcefield/openforcefield/issues>`_ or open a
29+
`Pull Request <https://github.com/openforcefield/openforcefield/pulls>`_.
30+
1331

1432
New features
1533
""""""""""""
@@ -19,17 +37,33 @@ New features
1937
`LibraryCharges tag in the SMIRNOFF specification <https://open-forcefield-toolkit.readthedocs.io/en/latest/smirnoff.html#librarycharges-library-charges-for-polymeric-residues-and-special-solvent-models>`_
2038
using
2139
:py:class:`LibraryChargeHandler <openforcefield.typing.engines.smirnoff.parameters.LibraryChargeHandler>`.
22-
For a molecule to have charges assigned using LibraryCharges, all of its atoms must be covered by
23-
at least one LibraryCharge. If an atom is covered by multiple LibraryCharges, then the last
24-
one read will be applied (per the hierarchy rules in the SMIRNOFF format).
40+
For a molecule to have charges assigned using Library Charges, all of its atoms must be covered by
41+
at least one ``LibraryCharge``. If an atom is covered by multiple ``LibraryCharge`` s, then the last
42+
``LibraryCharge`` matched will be applied (per the hierarchy rules in the SMIRNOFF format).
2543

2644
This functionality is thus able to apply per-residue charges similar to those in traditional
2745
protein force fields. At this time, there is no concept of "residues" or "fragments" during
2846
parametrization, so it is not possible to assign charges to `some` atoms in a molecule using
29-
LibraryCharges, but calculate charges for other atoms in the same molecule using a different
47+
``LibraryCharge`` s, but calculate charges for other atoms in the same molecule using a different
3048
method. To assign charges to a protein, LibraryCharges SMARTS must be provided for
31-
the standard residues, as well as for any capping groups and post-translational modifications
32-
that are present.
49+
the residues and protonation states in the molecule, as well as for any capping groups
50+
and post-translational modifications that are present.
51+
52+
It is valid for ``LibraryCharge`` SMARTS to `partially` overlap one another. For example, a molecule
53+
consisting of atoms ``A-B-C`` connected by single bonds could be matched by a SMIRNOFF
54+
``LibraryCharges`` section containing two ``LibraryCharge`` SMARTS: ``A-B`` and ``B-C``. If
55+
listed in that order, the molecule would be assigned the ``A`` charge from the ``A-B`` ``LibraryCharge``
56+
element and the ``B`` and ``C`` charges from the ``B-C`` element. In testing, these types of
57+
partial overlaps were found to frequently be sources of undesired behavior, so it is recommended
58+
that users define whole-molecule ``LibraryCharge`` SMARTS whenever possible.
59+
60+
- `PR #455 <https://github.com/openforcefield/openforcefield/pull/455>`_: Addresses
61+
`Issue #393 <https://github.com/openforcefield/openforcefield/issues/393>`_ by adding
62+
:py:meth:`ParameterHandler.attribute_is_cosmetic <openforcefield.typing.engines.smirnoff.parameters.ParameterHandler.attribute_is_cosmetic>`
63+
and
64+
:py:meth:`ParameterType.attribute_is_cosmetic <openforcefield.typing.engines.smirnoff.parameters.ParameterType.attribute_is_cosmetic>`,
65+
which return True if the provided attribute name is defined for the queried object
66+
but does not correspond to an allowed value in the SMIRNOFF spec.
3367

3468
Behavior changed
3569
""""""""""""""""
@@ -44,10 +78,10 @@ Behavior changed
4478
``Molecule.partial_charges`` array to be all zeroes, and including the molecule in the
4579
``charge_from_molecules`` keyword argument to ``create_openmm_system``.
4680
- `PR #433 <https://github.com/openforcefield/openforcefield/pull/433>`_: Due to risks
47-
introduced by permitting charge assignment using partially-overlapping ``LibraryCharge``s,
81+
introduced by permitting charge assignment using partially-overlapping ``LibraryCharge`` s,
4882
the toolkit will now raise a
4983
``openforcefield.typing.engines.smirnoff.parameters.NonIntegralMoleculeChargeException``
50-
if the sum of partial charges on a molecule are found to be more than 0.001 elementary charge units
84+
if the sum of partial charges on a molecule are found to be more than 0.01 elementary charge units
5185
different than the molecule's formal charge. This exception can be overridden by providing
5286
the ``allow_nonintegral_charges=True`` keyword argument to ``ForceField.create_openmm_system``.
5387

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ The following examples are available in [the openforcefield toolkit repository](
77
* [SMIRNOFF_simulation](https://github.com/openforcefield/openforcefield/tree/master/examples/SMIRNOFF_simulation) - simulation of a molecule in the gas phase with the SMIRNOFF forcefield format
88
* [forcefield_modification](https://github.com/openforcefield/openforcefield/tree/master/examples/forcefield_modification) - modify forcefield parameters and evaluate how system energy changes
99
* [using_smirnoff_in_amber_or_gromacs](https://github.com/openforcefield/openforcefield/tree/master/examples/using_smirnoff_in_amber_or_gromacs) - convert a System generated with the Open Forcefield Toolkit, which can be simulated natively with OpenMM, into AMBER prmtop/inpcrd and GROMACS top/gro input files through the ParmEd library.
10+
* [swap_amber_parameters](https://github.com/openforcefield/openforcefield/tree/master/examples/swap_amber_parameters) - take a prepared AMBER protein-ligand system (prmtop and crd) along with a structure file of the ligand, and replace ligand parameters with OpenFF parameters.
1011
* [inspect_assigned_parameters](https://github.com/openforcefield/openforcefield/tree/master/examples/inspect_assigned_parameters) - check which parameters are used in which molecules and generate parameter usage statistics.
1112
* [using_smirnoff_with_amber_protein_forcefield](https://github.com/openforcefield/openforcefield/tree/master/examples/using_smirnoff_with_amber_protein_forcefield) - use SMIRNOFF parameters for small molecules in combination with more conventional force fields for proteins and other components of your system (using ParmEd to combine parameterized structures)
1213
* [check_dataset_parameter_coverage](https://github.com/openforcefield/openforcefield/tree/master/examples/check_dataset_parameter_coverage) - shows how to use the Open Force Field Toolkit to ingest a dataset of molecules, and generate a report summarizing any chemistry that can not be parameterized.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
## Taking an AMBER system and replacing the ligand parameters with OpenFF parameters
2+
3+
These examples illustrate how the [ParmEd](http://parmed.github.io/ParmEd/html/index.html) utility can be used to take a fully parameterized (and solvated) protein-ligand system and replace the ligand parameters with those from OpenFF. In this case, the system uses an AMBER protein force field, ions, and TIP3P water, and we replace the GAFF ligand parameters with OpenFF 1.0 parameters, writing out the resulting fully parameterized system.
4+
5+
### BRD4:inhibitor complex
6+
7+
8+
[`swap_existing_ligand_parameters.ipynb`](swap_existing_ligand_parameters.ipynb) contains an example illustrating taking a fully parameterized BRD4 protein-ligand system, with an AMBER protein force field and GAFF ligand parameters, and replacing the ligand parameters with OpenFF parameters from SMIRNOFF format. The BRD4:inhibitor complex is taken from the [free energy benchmark systems living review](https://www.annualreviews.org/doi/abs/10.1146/annurev-biophys-070816-033654) [GitHub repo](https://github.com/MobleyLab/benchmarksets/tree/master/input_files/BRD4).

0 commit comments

Comments
 (0)