Skip to content

Commit

Permalink
Fixed error in desmond OPLS tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrshirts committed May 25, 2019
1 parent 9cd0df7 commit 188c374
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions intermol/desmond/desmond_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,9 +710,8 @@ def parse_dihedrals(self, type, current_molecule_type):
elif key == "PROPER_TRIG" or key == "IMPROPER_TRIG":
kwds = [float(values[ed[x]]) for x in cnames]
elif key == "OPLS_PROPER" or key == "OPLS_IMPROPER":
# next 3 lines definitely not the right way to do it.
#opls_kwds = {key: value for key, value in zip("c1 c2 c3 c4".split(), [units.kilocalorie_per_mole * float(s) for s in values[7:11]])}
opls_kwds = [float(values[ed[x]]) * units.kilocalorie_per_mole for x in cnames[1:5]]
opls_vals = [float(values[ed[x]]) * units.kilocalorie_per_mole for x in cnames[1:5]]
opls_kwds = dict(zip([x[-2:] for x in cnames[1:5]],opls_vals))
opls_kwds = convert_dihedral_from_fourier_to_trig(opls_kwds)
kwds = np.zeros(8) # will fill this in later.
new_dihedral = self.create_forcetype(self.desmond_dihedrals[key], atoms, kwds)
Expand Down

0 comments on commit 188c374

Please sign in to comment.