Skip to content
New issue

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

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

Already on GitHub? # to your account

Remove un-used Topology attributes #1213

Merged
merged 4 commits into from
Mar 12, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions docs/releasehistory.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ print(value_roundtrip)
This does not affect existing paths and gives some new, easier to remember paths to core objects.
- [PR #1198](https://github.com/openforcefield/openforcefield/pull/1198): Ensure the vdW switch
width is correctly set and enabled.
- [PR #1213](https://github.com/openforcefield/openff-toolkit/pull/1213): Removes
`Topology.charge_model` and `Topology.fractional_bond_order_model`.

### Behaviors changed and bugfixes

Expand Down
1 change: 0 additions & 1 deletion openff/toolkit/tests/test_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,6 @@ def test_pruned_impropers(self):
)
assert mod_imp in top.amber_impropers

# test_get_fractional_bond_order
# test_two_of_same_molecule
# test_two_different_molecules
# test_to_from_dict
Expand Down
68 changes: 1 addition & 67 deletions openff/toolkit/topology/topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@
from openff.toolkit.utils.serialization import Serializable
from openff.toolkit.utils.toolkits import (
ALLOWED_AROMATICITY_MODELS,
ALLOWED_CHARGE_MODELS,
ALLOWED_FRACTIONAL_BOND_ORDER_MODELS,
DEFAULT_AROMATICITY_MODEL,
GLOBAL_TOOLKIT_REGISTRY,
)
Expand Down Expand Up @@ -440,6 +438,7 @@ def _initialize(self):
self._molecules = list()
self._cached_chemically_identical_molecules = None

# Should this be deprecated?
@property
def reference_molecules(self) -> List[Molecule]:
"""
Expand Down Expand Up @@ -607,39 +606,6 @@ def is_periodic(self, is_periodic):
"First set box_vectors to None."
)

@property
def charge_model(self):
"""
Get the partial charge model applied to all molecules in the topology.

Returns
-------
charge_model : str
Charge model used for all molecules in the Topology.

"""
return self._charge_model

@charge_model.setter
def charge_model(self, charge_model):
"""
Set the partial charge model used for all molecules in the topology.

Parameters
----------
charge_model : str
Charge model to use for all molecules in the Topology.
Allowed values: ['AM1-BCC']
* ``AM1-BCC``: Canonical AM1-BCC scheme
"""
if not charge_model in ALLOWED_CHARGE_MODELS:
raise ValueError(
"Charge model must be one of {}; specified '{}'".format(
ALLOWED_CHARGE_MODELS, charge_model
)
)
self._charge_model = charge_model

@property
def constrained_atom_pairs(self):
"""Returns the constrained atom pairs of the Topology
Expand All @@ -651,38 +617,6 @@ def constrained_atom_pairs(self):
"""
return self._constrained_atom_pairs

@property
def fractional_bond_order_model(self):
"""
Get the fractional bond order model for the Topology.

Returns
-------
fractional_bond_order_model : str
Fractional bond order model in use.

"""
return self._fractional_bond_order_model

@fractional_bond_order_model.setter
def fractional_bond_order_model(self, fractional_bond_order_model):
"""
Set the fractional bond order model applied to all molecules in the topology.

Parameters
----------
fractional_bond_order_model : str
Fractional bond order model to use. One of: ['Wiberg']

"""
if not fractional_bond_order_model in ALLOWED_FRACTIONAL_BOND_ORDER_MODELS:
raise ValueError(
"Fractional bond order model must be one of {}; specified '{}'".format(
ALLOWED_FRACTIONAL_BOND_ORDER_MODELS, fractional_bond_order_model
)
)
self._fractional_bond_order_model = fractional_bond_order_model

@property
def n_molecules(self):
"""Returns the number of molecules in this Topology
Expand Down