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 Aug 18, 2024
1 parent 6f2a6c3 commit 68b82fc
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 22 deletions.
2 changes: 0 additions & 2 deletions docs/topic_guides/data_structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ Fit a Dihedral

.. automodule:: mosdef_dihedral_fit.dihedral_fit.fit_dihedral_with_gomc
:members: fit_dihedral_with_gomc


Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ DIHEDRALS * CHARMM
! Boltzmann = 0.0019872041 kcal / (mol * K)
!
! type_1 type_2 type_3 type_4 Kchi n delta ! extended_type_1 extended_type_2 extended_type_3 extended_type_4
HC CT CT HC 0.5 0 90.0 ! TMP_opls_140 TMP_opls_135 TMP_opls_135 TMP_opls_140
HC CT CT HC 0.5 0 90.0 ! TMP_opls_140 TMP_opls_135 TMP_opls_135 TMP_opls_140
! The input dihedral to periodic dihedral conversion error is OK [error <= 10^(-10)]
! Maximum( |(input dihedral calc)-(periodic dihedral calc)| ) = 3.608224830031759e-16

Expand Down
53 changes: 34 additions & 19 deletions mosdef_dihedral_fit/tests/test_fit_dihedral_with_gomc.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ def test_gaussian_log_file_fit_oplsaa_fit_ethane_HC_CT_CT_HC_with_2_log_files(
) == mdf_math.round_to_sig_figs(
correct_line_values[i][j], number_sig_i
)

def test_gaussian_log_file_fit_oplsaa_protonated_fragment_CT_CT_C_OH_in_COOH(
self,
):
Expand Down Expand Up @@ -5025,7 +5025,7 @@ def test_r_squared_rtol_not_a_float(self):
r_squared_rtol=2,
opls_force_k0_zero=True,
)

def test_error_r_squared_min_and_r_squared_rtol_need_adjusted(
self,
):
Expand Down Expand Up @@ -5085,7 +5085,7 @@ def test_error_r_squared_min_and_r_squared_rtol_need_adjusted(
r_squared_min=0.99,
r_squared_rtol=0.0000002,
)

def test_warning_r_squared_min_and_r_squared_rtol_need_adjusted(
self,
):
Expand Down Expand Up @@ -5136,7 +5136,7 @@ def test_warning_r_squared_min_and_r_squared_rtol_need_adjusted(
r_squared_min=0.98,
r_squared_rtol=0.015,
)

def test_gaussian_log_file_fit_oplsaa_protonated_fragment_CT_CT_C_OH_in_COOH_in_mie_form(
self,
):
Expand Down Expand Up @@ -5803,7 +5803,7 @@ def test_gaussian_log_file_fit_oplsaa_protonated_fragment_CT_CT_C_OH_in_COOH_in_
atol=0.02,
rtol=0.08,
)

def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_in_butane_files(
self,
):
Expand Down Expand Up @@ -5970,7 +5970,15 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_in_butane_files(
[str("1"), 0, 0.4721804016, 0, 0, 0, -1.38239818695],
[str("2"), 0, 0, 0.575010099536, 0, 0, -0.546636504029],
[str("3"), 0, 0, 0, 0.685865110811, 0, 0.538213945525],
[str("4"), 0.549332597925, 0, 0, 0, -0.274666298962, -1.1033603631],
[
str("4"),
0.549332597925,
0,
0,
0,
-0.274666298962,
-1.1033603631,
],
[
str("1_3"),
0,
Expand Down Expand Up @@ -6014,7 +6022,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_in_butane_files(
0.239549950189,
0.57212115096,
0,
0.749172728898 ,
0.749172728898,
],
[
str("1_2_3_4"),
Expand Down Expand Up @@ -6051,7 +6059,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_in_butane_files(
atol=0.02,
rtol=0.08,
)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
number_sig_i = 4
Expand Down Expand Up @@ -6471,12 +6479,12 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_in_butane_files(
atol=0.02,
rtol=0.08,
)

def test_gaussian_style_files_fit_amber_aa_all_unique_fit_CT_CT_CT_CT_in_butane_files(
self,
):
fit_dihedral_with_gomc(
['CT1', 'CT0', 'CT0', 'CT1'],
["CT1", "CT0", "CT0", "CT1"],
self.get_fn(
"gaussian_style_output_files/CT_CT_CT_CT/input/starting_coords/butane_aa.mol2"
),
Expand Down Expand Up @@ -6638,7 +6646,15 @@ def test_gaussian_style_files_fit_amber_aa_all_unique_fit_CT_CT_CT_CT_in_butane_
[str("1"), 0, 0.4721804016, 0, 0, 0, -1.38239818695],
[str("2"), 0, 0, 0.575010099536, 0, 0, -0.546636504029],
[str("3"), 0, 0, 0, 0.685865110811, 0, 0.538213945525],
[str("4"), 0.549332597925, 0, 0, 0, -0.274666298962, -1.1033603631],
[
str("4"),
0.549332597925,
0,
0,
0,
-0.274666298962,
-1.1033603631,
],
[
str("1_3"),
0,
Expand Down Expand Up @@ -6682,7 +6698,7 @@ def test_gaussian_style_files_fit_amber_aa_all_unique_fit_CT_CT_CT_CT_in_butane_
0.239549950189,
0.57212115096,
0,
0.749172728898 ,
0.749172728898,
],
[
str("1_2_3_4"),
Expand Down Expand Up @@ -6719,7 +6735,7 @@ def test_gaussian_style_files_fit_amber_aa_all_unique_fit_CT_CT_CT_CT_in_butane_
atol=0.02,
rtol=0.08,
)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
number_sig_i = 4
Expand Down Expand Up @@ -7350,7 +7366,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_force_k0_to_True_in_b
0.239549950189,
0.57212115096,
0,
0.749172728898 ,
0.749172728898,
],
[
str("1_2_3_4"),
Expand Down Expand Up @@ -7388,7 +7404,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_force_k0_to_True_in_b
atol=0.02,
rtol=0.08,
)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
number_sig_i = 4
Expand Down Expand Up @@ -7664,7 +7680,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_force_k0_to_True_in_b
atol=0.02,
rtol=0.08,
)

# check the RB torsion file
with open("RB_torsion_k_constants_fit_energy.txt", "r") as fp:
number_sig_i = 4
Expand Down Expand Up @@ -7808,7 +7824,7 @@ def test_gaussian_style_files_fit_amber_aa_fit_CT_CT_CT_CT_force_k0_to_True_in_b
atol=0.02,
rtol=0.08,
)

def test_gaussian_style_files_fit_trappe_ua_fit_CT_CT_CT_CT_in_butane_files(
self,
):
Expand Down Expand Up @@ -8476,7 +8492,6 @@ def test_gaussian_style_files_fit_trappe_ua_fit_CT_CT_CT_CT_in_butane_files(
atol=0.02,
rtol=0.08,
)


def test_gaussian_style_files_fit_mia_ua_fit_CT_CT_CT_CT_in_butane_files(
self,
Expand Down Expand Up @@ -9145,7 +9160,7 @@ def test_gaussian_style_files_fit_mia_ua_fit_CT_CT_CT_CT_in_butane_files(
atol=0.02,
rtol=0.08,
)

def test_gaussian_style_files_fit_exp6_fit_CT_CT_CT_CT_in_butane_files(
self,
):
Expand Down

0 comments on commit 68b82fc

Please sign in to comment.