Skip to content

Commit

Permalink
Use Sage 2.2.0 RC1 as default (#307)
Browse files Browse the repository at this point in the history
* Use Sage 2.2.0 RC1 as default

* Use released 2.2.0

* fix date check

---------

Co-authored-by: Jeff Wagner <jwagnerjpl@gmail.com>
  • Loading branch information
mattwthompson and j-wags authored Apr 22, 2024
1 parent f7cd2a6 commit 6602daf
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 25 deletions.
3 changes: 1 addition & 2 deletions devtools/conda-envs/docs-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@ dependencies:
- openff-utilities
- openff-toolkit-base =0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-forcefields
- openff-forcefields >=2024.04.0
- openff-qcsubmit >=0.50
- openmm >=7.6.0

# Optional
- forcebalance
- openff-fragmenter-base

- openeye-toolkits

### Bespoke dependencies
Expand Down
1 change: 1 addition & 0 deletions devtools/conda-envs/no_openeye.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- openff-utilities
- openff-toolkit-base =0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-forcefields >=2024.04.0
- openff-qcsubmit >=0.50
- openmm >=7.6.0

Expand Down
1 change: 1 addition & 0 deletions devtools/conda-envs/test-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ dependencies:
- openff-utilities
- openff-toolkit-base =0.15
- openff-interchange # only needed because openff-toolkit-base
- openff-forcefields >=2024.04.0
- openff-units
- openff-qcsubmit >=0.50
- openmm >=7.6.0
Expand Down
8 changes: 4 additions & 4 deletions docs/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Sometimes bespoke commands will raise `RuntimeError: The gateway could not be re
by rerunning the command a few times.
:::

Here we have specified that we wish to start the fit from the general OpenFF 2.0.0 (Sage) force field, augmenting
Here we have specified that we wish to start the fit from the general OpenFF 2.2.0 (Sage) force field, augmenting
it with bespoke parameters generated according to the
[default built-in workflow using GFN2-xTB reference data](workflow_chapter).

Expand Down Expand Up @@ -197,7 +197,7 @@ from openff.qcsubmit.common_structures import QCSpec
factory = BespokeWorkflowFactory(
# Define the starting force field that will be augmented with bespoke
# parameters.
initial_force_field="openff-2.0.0.offxml",
initial_force_field="openff-2.2.0.offxml",
# Change the level of theory that the reference QC data is generated at
default_qc_specs=[
QCSpec(
Expand All @@ -216,7 +216,7 @@ Similar to the previous steps, here we override the default
["default" QC specification](default_qc_method) to use GFN2-xTB. If we had Psi4
installed, we could remove the `default_qc_specs` argument and the factory would instead use our mainline
[fitting QC method](default_qc_method).
The default factory will produce [workflows](workflow_chapter) that augment the OpenFF 2.0.0 force field
The default factory will produce [workflows](workflow_chapter) that augment the OpenFF 2.2.0 force field
with bespoke torsion parameters for all non-terminal *rotatable* bonds in the molecule that have been trained
to quantum chemical torsion scan data generated for said molecule.

Expand Down Expand Up @@ -287,7 +287,7 @@ from openff.bespokefit.schema.targets import TorsionProfileTargetSchema
factory = BespokeWorkflowFactory(
# Define the starting force field that will be augmented with bespoke
# parameters.
initial_force_field="openff-2.0.0.offxml",
initial_force_field="openff-2.2.0.offxml",
# Select the underlying optimization engine.
optimizer=ForceBalanceSchema(
max_iterations=50, penalty_type="L1"
Expand Down
4 changes: 4 additions & 0 deletions docs/releasehistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ Releases follow the ``major.minor.micro`` scheme recommended by
* [#325] - Document issue where `xtb` doesn't respect the `--qc-compute-n-cores` argument and provide workaround. by [@mattwthompson]
* [#330] - Corrects a reference to Rosemary, which is not released, in the theory section. by [@mattwthompson]

### Behavior changes
* [#307] - OpenFF 2.2.0 RC1 ("Sage 2.2 RC1") is used as the initial force filed by default (if no other initial force field is specified). by [@mattwthompson]

### Bug fixes
* [#320] - Fixes a formatting issue ([#319]) when printing SMILES to summary table. by [@j-wags]

Expand Down Expand Up @@ -154,6 +157,7 @@ The first major release of bespokefit intended for public use.
[#279]: https://github.com/openforcefield/openff-bespokefit/pull/279
[#280]: https://github.com/openforcefield/openff-bespokefit/pull/280
[#286]: https://github.com/openforcefield/openff-bespokefit/pull/286
[#307]: https://github.com/openforcefield/openff-bespokefit/pull/307
[#320]: https://github.com/openforcefield/openff-bespokefit/pull/320
[#321]: https://github.com/openforcefield/openff-bespokefit/pull/321
[#325]: https://github.com/openforcefield/openff-bespokefit/pull/325
Expand Down
8 changes: 4 additions & 4 deletions docs/users/bespoke-workflows.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ bespoke fit (represented by the [`BespokeOptimizationSchema`] object), and are u

## The default workflow

The default workflow is suitable for augmenting a general [SMIRNOFF] force field (currently the[OpenFF 2.0.0] force
The default workflow is suitable for augmenting a general [SMIRNOFF] force field (currently the [OpenFF 2.2.0] force
field) with a new bespoke torsion term for each non-terminal rotatable bond in the input molecule, trained to reproduce
a bespoke one-dimensional quantum chemical torsion scan performed around that bond.
a bespoke one-dimensional quantum chemical torsion scan performed around that bond.

[SMIRNOFF]: https://openforcefield.github.io/standards/standards/smirnoff/

Expand Down Expand Up @@ -127,7 +127,7 @@ Parameter generation also needs an initial force field to use as a starting poin
should be the filename of a force field in [offxml format]:

```python
factory.initial_force_field = "openff-2.0.0.offxml"
factory.initial_force_field = "openff-2.2.0.offxml"
```

[`smirk_settings`]: openff.bespokefit.workflows.bespoke.BespokeWorkflowFactory.smirk_settings
Expand Down Expand Up @@ -167,7 +167,7 @@ factory.parameter_hyperparameters = [ProperTorsionHyperparameters()]
[`Fragmenter`]: openff.fragmenter.fragment.Fragmenter
[ForceBalance]: https://github.com/leeping/forcebalance
[`ForceBalanceSchema`]: openff.bespokefit.schema.optimizers.ForceBalanceSchema
[OpenFF 2.0.0]: https://openforcefield.org/force-fields/force-fields/#sage
[OpenFF 2.2.0]: https://openforcefield.org/force-fields/force-fields/#sage
[`BaseOptimizerSchema`]: openff.bespokefit.schema.optimizers.BaseOptimizerSchema
[offxml format]: https://openforcefield.github.io/standards/standards/smirnoff/
[`optimizer`]: openff.bespokefit.workflows.bespoke.BespokeWorkflowFactory.optimizer
Expand Down
12 changes: 7 additions & 5 deletions openff/bespokefit/_tests/cli/executor/test_submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_to_input_schema_mutual_exclusive_args(
input_schema = _to_input_schema(
console,
Molecule.from_smiles("CC"),
force_field_path="openff-2.0.0.offxml",
force_field_path="openff-2.2.0.offxml",
target_torsion_smirks=tuple(),
default_qc_spec=None,
workflow_name=workflow_name,
Expand Down Expand Up @@ -107,8 +107,10 @@ def test_to_input_schema(force_field_path):
assert isinstance(input_schema, BespokeOptimizationSchema)
assert input_schema.id == "bespoke_task_0"

# Default to Sage 2.2 if no force field is provided,
# but 2019 if Parsley is provided
assert (
"2021-08-16" if force_field_path is None else "2019-10-10"
"2024-04-18" if force_field_path is None else "2019-10-10"
) in input_schema.initial_force_field


Expand Down Expand Up @@ -206,7 +208,7 @@ def test_submit_multi_molecule(tmpdir):
console,
input_file_path=[],
molecule_smiles=["[Cu+2].[O-]S(=O)(=O)[O-]"],
force_field_path="openff-2.0.0.offxml",
force_field_path="openff-2.2.0.offxml",
target_torsion_smirks=tuple(),
default_qc_spec=None,
workflow_name="debug",
Expand All @@ -231,7 +233,7 @@ def test_submit_invalid_schema(tmpdir):
input_file_path,
],
molecule_smiles=[],
force_field_path="openff-2.0.0.offxml",
force_field_path="openff-2.2.0.offxml",
target_torsion_smirks=tuple(),
default_qc_spec=None,
workflow_name=None,
Expand Down Expand Up @@ -276,7 +278,7 @@ def test_submit(tmpdir, file, smiles):
rich.get_console(),
input_file_path=file,
molecule_smiles=smiles,
force_field_path="openff-2.0.0.offxml",
force_field_path="openff-2.2.0.offxml",
target_torsion_smirks=tuple(),
default_qc_spec=None,
workflow_name="debug",
Expand Down
4 changes: 2 additions & 2 deletions openff/bespokefit/_tests/cli/test_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def test_combine_local_and_tasks(tmpdir, runner, bespoke_optimization_results):
"""

# make some local files to work with
for ff_name in ["openff-1.0.0.offxml", "openff-2.0.0.offxml"]:
for ff_name in ["openff-1.0.0.offxml", "openff-2.2.0.offxml"]:
ForceField(ff_name).to_file(ff_name)

settings = current_settings()
Expand Down Expand Up @@ -59,7 +59,7 @@ def test_combine_local_and_tasks(tmpdir, runner, bespoke_optimization_results):
"--output",
"my_ff.offxml",
"--ff",
"openff-2.0.0.offxml",
"openff-2.2.0.offxml",
"--ff",
"openff-1.0.0.offxml",
"--id",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ async def test_process_task(redis_connection, monkeypatch):
create_task(
input_schema=BespokeOptimizationSchema(
smiles="CC",
initial_force_field="openff-2.0.0.offxml",
initial_force_field="openff-2.2.0.offxml",
initial_force_field_hash="test_hash",
target_torsion_smirks=[],
stages=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_post_optimize(optimizer_client, redis_connection, monkeypatch):

input_schema = BespokeOptimizationSchema(
smiles="CC",
initial_force_field="openff-2.0.0.offxml",
initial_force_field="openff-2.2.0.offxml",
initial_force_field_hash="test_hash",
target_torsion_smirks=[],
stages=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def test_optimize(monkeypatch, redis_connection):
input_schema = BespokeOptimizationSchema(
id="test",
smiles="CC",
initial_force_field="openff-2.0.0.offxml",
initial_force_field="openff-2.2.0.offxml",
initial_force_field_hash="test_hash",
target_torsion_smirks=[],
stages=[
Expand All @@ -50,7 +50,7 @@ def test_optimize(monkeypatch, redis_connection):
OptimizationStageResults(
provenance={},
status="success",
refit_force_field=ForceField("openff-2.0.0.offxml").to_string(),
refit_force_field=ForceField("openff-2.2.0.offxml").to_string(),
)
],
)
Expand Down
2 changes: 1 addition & 1 deletion openff/bespokefit/data/schemas/debug.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"initial_force_field": "openff-2.0.0.offxml",
"initial_force_field": "openff-2.2.0.offxml",
"optimizer": {
"type": "ForceBalance",
"max_iterations": 1,
Expand Down
4 changes: 2 additions & 2 deletions openff/bespokefit/data/schemas/default.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"initial_force_field": "openff_unconstrained-2.0.0.offxml",
"initial_force_field": "openff_unconstrained-2.2.0.offxml",
"optimizer": {
"type": "ForceBalance",
"max_iterations": 10,
Expand Down Expand Up @@ -100,4 +100,4 @@
"keywords": {}
}
]
}
}
2 changes: 1 addition & 1 deletion openff/bespokefit/workflows/bespoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class BespokeWorkflowFactory(ClassBase):
"""

initial_force_field: str = Field(
"openff_unconstrained-2.0.0.offxml",
"openff_unconstrained-2.2.0.offxml",
description="The name of the unconstrained force field to use as a starting "
"point for optimization. The force field must be installed with conda/mamba.",
)
Expand Down

0 comments on commit 6602daf

Please sign in to comment.