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 ParmEd converter for new components #45

Merged
merged 16 commits into from
Nov 17, 2020
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ENH: Clear matches/potentials when assigning new pairs
  • Loading branch information
mattwthompson committed Nov 16, 2020
commit f0f2a0ac951d69fe4bf3b5307274f45e029a3082
4 changes: 4 additions & 0 deletions openff/system/components/smirnoff.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ def store_matches(self, parameter_handler: BondHandler, topology: Topology) -> N
and unique potential identifiers

"""
if self.slot_map:
self.slot_map = dict()
matches = parameter_handler.find_matches(topology)
for key, val in matches.items():
self.slot_map[key] = val.parameter_type.smirks
Expand All @@ -39,6 +41,8 @@ def store_potentials(self, parameter_handler: BondHandler) -> None:
identifiers and their associated Potential objects

"""
if self.potentials:
self.potentials = dict()
for smirks in self.slot_map.values():
parameter_type = parameter_handler.get_parameter({"smirks": smirks})[0]
potential = Potential(
Expand Down