Skip to content

Commit

Permalink
code copied from PR shirtsgroup#349 to add 0s if coefficients in inpu…
Browse files Browse the repository at this point in the history
…t file are left out
  • Loading branch information
orionarcher committed Oct 15, 2021
1 parent d709abe commit fc939c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion intermol/forces/forcefunctions.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ def create_kwds_from_entries(unitvars, paramlist, entries, force_type, offset=0)
u = unitvars[typename]
params = paramlist[typename]
for i, p in enumerate(params):
kwds[p] = float(entries[offset+i]) * u[i]
if len(entries)<=(offset+i):
kwds[p] = float(0.0)
else:
kwds[p] = float(entries[offset+i]) * u[i]
return kwds


Expand Down

0 comments on commit fc939c6

Please sign in to comment.