Skip to content

Commit

Permalink
Fix scaling factors and mixing rule bug when atomtype with `general_f…
Browse files Browse the repository at this point in the history
…orcefield` (#489)

* transfer forcefield combining rule in parametrizing step

* use alternative way to transfer scaling factors from ff to topology
  • Loading branch information
daico007 committed Feb 11, 2022
1 parent e847d01 commit 25c6596
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion foyer/general_forcefield.py
Expand Up @@ -377,8 +377,12 @@ def _parametrize_gmsoFF(self, top, typemap, combining_rule):
# Assign ImproperTypes
for improper in top.impropers:
self._connection_type_lookup(improper)
# Assign combining rules
# Assign combining rules and mixing rules
top.combining_rule = combining_rule
for key in self.ff.scaling_factors.keys():
msg = f"Incorrect scaling_factors key word provided: {key}"
assert key in top.scaling_factors.keys(), msg
top.scaling_factors.update(self.ff.scaling_factors)
return top

def _connection_type_lookup(self, connection):
Expand Down

0 comments on commit 25c6596

Please sign in to comment.