Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 22, 2023
1 parent 0896cee commit fc75d95
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 19 deletions.
12 changes: 6 additions & 6 deletions mosdef_gomc/formats/gmso_charmm_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -4625,7 +4625,7 @@ def write_inp(self):
print_error = "ERROR: The {'HarmonicImproperPotential'} is not supported " \
"for the {'Mie'} or {'Exp6'} potentials."
raise ValueError(print_error)
# write all orders of impropers to capture other possible orders in GMSO (6 possible)
# improper order 1 (0-1-2-3)
data.write(
Expand All @@ -4643,7 +4643,7 @@ def write_inp(self):
f"{res_x}_{improper_members_iter[3]}",
)
)
# improper order 2 (0-2-1-3)
data.write(
improper_format.format(
Expand All @@ -4660,7 +4660,7 @@ def write_inp(self):
f"{res_x}_{improper_members_iter[3]}",
)
)
# improper order 3 (0-1-3-2)
data.write(
improper_format.format(
Expand All @@ -4677,7 +4677,7 @@ def write_inp(self):
f"{res_x}_{improper_members_iter[2]}",
)
)
# improper order 4 (0-3-1-2)
data.write(
improper_format.format(
Expand All @@ -4694,7 +4694,7 @@ def write_inp(self):
f"{res_x}_{improper_members_iter[2]}",
)
)
# improper order 5 (0-2-3-1)
data.write(
improper_format.format(
Expand All @@ -4711,7 +4711,7 @@ def write_inp(self):
f"{res_x}_{improper_members_iter[1]}",
)
)
# improper order 5 (0-3-2-1)
data.write(
improper_format.format(
Expand Down
14 changes: 1 addition & 13 deletions mosdef_gomc/tests/test_gmso_charmm_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -931,28 +931,24 @@ def test_save_charmm_gomc_ethyl_benzene_aa_ff(self):
["CE", "CE", "HCE", "CE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],

["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "HCE", "CE", "1.075526", "3", "180.0"],
["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "HCE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "CE", "HCE", "1.075526", "3", "180.0"],
["CE", "CE", "CE", "HCE", "1.075526", "3", "180.0"],

["CE", "HCE", "CE", "CE", "0.956023", "1", "0.0"],
["CE", "CE", "HCE", "CE", "0.956023", "1", "0.0"],
["CE", "HCE", "CE", "CE", "0.956023", "1", "0.0"],
["CE", "CE", "HCE", "CE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],

["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "HCE", "CE", "1.075526", "3", "180.0"],
["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "HCE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "CE", "HCE", "1.075526", "3", "180.0"],
["CE", "CE", "CE", "HCE", "1.075526", "3", "180.0"],

["CE", "CT", "CE", "CE", "1.195029", "2", "0.0"],
["CE", "CE", "CT", "CE", "1.195029", "2", "0.0"],
["CE", "CT", "CE", "CE", "1.195029", "2", "0.0"],
Expand Down Expand Up @@ -1023,28 +1019,24 @@ def test_save_charmm_gomc_methyl_benzene_aa_ff(self):
["CE0", "CE1", "HCE0", "CE0", "0.956023", "1", "0.0"],
["CE0", "CE0", "CE1", "HCE0", "0.956023", "1", "0.0"],
["CE0", "CE1", "CE0", "HCE0", "0.956023", "1", "0.0"],

["CE0", "HCE0", "CE0", "CE1", "1.075526", "3", "180.0"],
["CE0", "CE0", "HCE0", "CE1", "1.075526", "3", "180.0"],
["CE0", "HCE0", "CE1", "CE0", "1.075526", "3", "180.0"],
["CE0", "CE1", "HCE0", "CE0", "1.075526", "3", "180.0"],
["CE0", "CE0", "CE1", "HCE0", "1.075526", "3", "180.0"],
["CE0", "CE1", "CE0", "HCE0", "1.075526", "3", "180.0"],

["CE0", "HCE0", "CE0", "CE0", "0.956023", "1", "0.0"],
["CE0", "CE0", "HCE0", "CE0", "0.956023", "1", "0.0"],
["CE0", "HCE0", "CE0", "CE0", "0.956023", "1", "0.0"],
["CE0", "CE0", "HCE0", "CE0", "0.956023", "1", "0.0"],
["CE0", "CE0", "CE0", "HCE0", "0.956023", "1", "0.0"],
["CE0", "CE0", "CE0", "HCE0", "0.956023", "1", "0.0"],

["CE0", "HCE0", "CE0", "CE0", "1.075526", "3", "180.0"],
["CE0", "CE0", "HCE0", "CE0", "1.075526", "3", "180.0"],
["CE0", "HCE0", "CE0", "CE0", "1.075526", "3", "180.0"],
["CE0", "CE0", "HCE0", "CE0", "1.075526", "3", "180.0"],
["CE0", "CE0", "CE0", "HCE0", "1.075526", "3", "180.0"],
["CE0", "CE0", "CE0", "HCE0", "1.075526", "3", "180.0"],

["CE1", "CT0", "CE0", "CE0", "1.195029", "2", "0.0"],
["CE1", "CE0", "CT0", "CE0", "1.195029", "2", "0.0"],
["CE1", "CT0", "CE0", "CE0", "1.195029", "2", "0.0"],
Expand Down Expand Up @@ -1110,7 +1102,6 @@ def test_save_charmm_gomc_benzene_aa_ff(self):
["CE", "CE", "HCE", "CE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],
["CE", "CE", "CE", "HCE", "0.956023", "1", "0.0"],

["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
["CE", "CE", "HCE", "CE", "1.075526", "3", "180.0"],
["CE", "HCE", "CE", "CE", "1.075526", "3", "180.0"],
Expand Down Expand Up @@ -7591,7 +7582,6 @@ def test_save_charmm_gomc_ua_charmm_periodic_improper_ff(
["CH", "CH3", "O", "CH3", "-2.0", "1", "180.0"],
["CH", "CH3", "CH3", "O", "-2.0", "1", "180.0"],
["CH", "CH3", "CH3", "O", "-2.0", "1", "180.0"],

["CH", "O", "CH3", "CH3", "1.0", "3", "0.0"],
["CH", "CH3", "O", "CH3", "1.0", "3", "0.0"],
["CH", "O", "CH3", "CH3", "1.0", "3", "0.0"],
Expand Down Expand Up @@ -7659,7 +7649,6 @@ def test_save_charmm_gomc_ua_charmm_periodic_wildcard_improper_ff(
["CH", "CH3", "CH3", "O", "-2.0", "1", "180.0"],
["CH", "O", "CH3", "CH3", "-2.0", "1", "180.0"],
["CH", "CH3", "O", "CH3", "-2.0", "1", "180.0"],

["CH", "CH3", "O", "CH3", "1.0", "3", "0.0"],
["CH", "O", "CH3", "CH3", "1.0", "3", "0.0"],
["CH", "CH3", "CH3", "O", "1.0", "3", "0.0"],
Expand Down Expand Up @@ -7949,7 +7938,6 @@ def test_save_charmm_ua_bonded_types_and_classes_xml_ff(
["CH", "CH3", "O", "CH3", "-8.0", "1", "180.0"],
["CH", "CH3", "CH3", "O", "-8.0", "1", "180.0"],
["CH", "CH3", "CH3", "O", "-8.0", "1", "180.0"],

["CH", "O", "CH3", "CH3", "4.0", "3", "0.0"],
["CH", "CH3", "O", "CH3", "4.0", "3", "0.0"],
["CH", "O", "CH3", "CH3", "4.0", "3", "0.0"],
Expand Down Expand Up @@ -11027,4 +11015,4 @@ def test_save_charmm_Mie_eqn_times_2(self, water, two_propanol_ua):
else:
pass

assert nonbondeds_read
assert nonbondeds_read

0 comments on commit fc75d95

Please sign in to comment.