From de2ce24a84bd487392ab3fc6f40183524db7c1f3 Mon Sep 17 00:00:00 2001 From: JoshuaSBrown Date: Fri, 28 Sep 2018 15:17:00 -0600 Subject: [PATCH] Set coefficients to 0 if they were missing from input file, this is a result of addressing error where dihedral angle expected five coefficients but only four were provided --- intermol/forces/forcefunctions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/intermol/forces/forcefunctions.py b/intermol/forces/forcefunctions.py index 08d158d3..382c0fc0 100644 --- a/intermol/forces/forcefunctions.py +++ b/intermol/forces/forcefunctions.py @@ -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