From 4930f9428d43e5c320e44c046ba3845e1c8c432b Mon Sep 17 00:00:00 2001 From: Brad Crawford <65550266+bc118@users.noreply.github.com> Date: Wed, 17 Jul 2024 12:14:42 -0400 Subject: [PATCH] Update equation_compare.py (#834) * Update equation_compare.py Changing 'sympy.symplify' to 'sympy.nsimplify' allows the less simple equations to be solved with the 0.5 decimals in it (example OPLS dihedral). This was the only was to improve or actually solve for the scalers in the equations when using non-integers in the forms like the OPLS dihedral. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update conf.py Added some names needed in the authors list here --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- docs/conf.py | 2 +- gmso/utils/equation_compare.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6630ce3e..888d5742 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -20,7 +20,7 @@ project = "gmso" copyright = "2024, mosdef-hub, Vanderbilt University" -author = "Matt Thompson, Alex Yang, Ray Matsumoto, Parashara Shamaprasad, Umesh Timalsina, Co D. Quach, Ryan S. DeFever, Justin Gilmer" +author = "Matt Thompson, Alex Yang, Ray Matsumoto, Parashara Shamaprasad, Umesh Timalsina, Co D. Quach, Ryan S. DeFever, Justin Gilmer, Nicholas C. Craven, Christopher R. Iacovella, Brad Crawford, and Chris Jones" # The full version, including alpha/beta/rc tags version = "0.12.4" diff --git a/gmso/utils/equation_compare.py b/gmso/utils/equation_compare.py index 9bc050d8..b96edd0f 100644 --- a/gmso/utils/equation_compare.py +++ b/gmso/utils/equation_compare.py @@ -483,7 +483,8 @@ def evaluate_OPLS_torsion_format_with_scaler(new_torsion_form, base_torsion_form values = sympy.nonlinsolve( [ eqn_ratio - - sympy.sympify(new_torsion_form) / sympy.sympify(base_torsion_form), + - sympy.nsimplify(new_torsion_form) + / sympy.nsimplify(base_torsion_form), ], [eqn_ratio], )