Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
daico007 committed Oct 4, 2023
1 parent e8f8415 commit fd02196
Showing 1 changed file with 9 additions and 19 deletions.
28 changes: 9 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 @@ -1528,7 +1528,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -1538,7 +1537,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin
),
atol=0.02,
rtol=0.08,

)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -1805,7 +1804,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -1815,7 +1813,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin
),
atol=0.02,
rtol=0.08,

)

# check the RB torsion file
with open("RB_torsion_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -1950,7 +1948,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -1960,7 +1957,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_missing_1st_poin
),
atol=0.02,
rtol=0.08,

)

def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):
fit_dihedral_with_gomc(
Expand Down Expand Up @@ -2196,7 +2193,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -2206,7 +2202,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):
),
atol=0.02,
rtol=0.08,

)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -2473,7 +2469,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -2483,7 +2478,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):
),
atol=0.02,
rtol=0.08,

)

# check the RB torsion file
with open("RB_torsion_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -2618,7 +2613,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -2628,7 +2622,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH(self):
),
atol=0.02,
rtol=0.08,

)

def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_1_first_point(
self,
Expand Down Expand Up @@ -2869,7 +2863,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -2879,7 +2872,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_
),
atol=0.02,
rtol=0.08,

)

# check the periodic dihedral file
with open("periodic_dihedral_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -3146,7 +3139,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -3156,7 +3148,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_
),
atol=0.02,
rtol=0.08,

)

# check the RB torsion file
with open("RB_torsion_k_constants_fit_energy.txt", "r") as fp:
Expand Down Expand Up @@ -3291,7 +3283,6 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_

# check the k-values and the r-squared fit
else:

assert np.isclose(
mdf_math.round_to_sig_figs(
float(split_line_i[j]), number_sig_i
Expand All @@ -3301,7 +3292,7 @@ def test_gaussian_style_files_fit_oplsaa_fit_CT_CT_C_OH_in_COOH_2_files_missing_
),
atol=0.02,
rtol=0.08,

)

def test_gaussian_log_file_fit_oplsaa_protonated_fragment_CT_CT_C_OH_in_COOH_bad_element_order_mol2(
self,
Expand Down Expand Up @@ -4887,7 +4878,6 @@ def test_warning_fit_min_validated_r_squared_and_fit_validation_r_squared_rtol_n
f"Gaussian minus GOMC with the selected individual dihedral added in GOMC \n"
f"-- >R-squared = "
f"{'0.987'} \n"

f"The 'fit_min_validated_r_squared' and 'fit_validation_r_squared_rtol' "
f"variables may need to be adjusted, \n"
f"there is likely something wrong with the fitting procedure, the "
Expand Down

0 comments on commit fd02196

Please sign in to comment.