Skip to content

Commit 8c2c358

Browse files
committed
test for check_dao_angel()
1 parent 7c81a6e commit 8c2c358

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

arc/job/adapters/ts/heuristics_test.py

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
adjust_dihedral_angles,
2929
get_neighbors_by_electronegativity,
3030
get_matching_dihedrals,
31-
find_matching_dihedral,
31+
check_dao_angle,
3232
hydrolysis
3333
)
3434
from arc.reaction import ARCReaction
@@ -2464,17 +2464,29 @@ def test_adjust_dihedral_angles(self):
24642464
result = adjust_dihedral_angles(initial_zmat, zmat_indices, 5)
24652465
self.assertFalse(result)
24662466

2467-
'DX_1_2_4_7': 90,
2468-
'DX_3_4_5_6': -60,
2469-
'D_2_3_5_6': 150}}
2470-
count_without_d = count_all_possible_dihedrals(zmat, a=2, b=3, f=5, d=None)
2471-
expected_count_without_d = 2
2472-
self.assertEqual(count_without_d, expected_count_without_d,
2473-
"count_all_possible_dihedrals without 'd' provided failed.")
2474-
count_no_matches = count_all_possible_dihedrals(zmat, a=8, b=9, f=10, d=None)
2475-
expected_count_no_matches = 0
2476-
self.assertEqual(count_no_matches, expected_count_no_matches,
2477-
"count_all_possible_dihedrals should return 0 for no matches.")
2467+
def test_check_dao_angle(self):
2468+
"""Test the check_dao_angle() function."""
2469+
initial_xyz = {'coords': ((0.30355829, -0.66195506, -1.72681105),
2470+
(-0.43699079, 0.12678172, -0.66520607),
2471+
(-0.43699079, 0.12678172, 0.76025877),
2472+
(-0.43699079, 1.54424376, 1.2153343),
2473+
(-1.51651197, -1.74230895, -0.7476734),
2474+
(0.22760699, -1.92765268, -0.60796871),
2475+
(-0.48269046, -1.432306, -2.16308677),
2476+
(-1.2382232, 0.71323739, -1.12821542),
2477+
(0.53171526, 0.5251499, -0.98644288),
2478+
(-1.24394344, 2.15646467, 0.80128544),
2479+
(-0.52457078, 1.54152685, 2.30509001),
2480+
(0.53491089, 1.96742818, 0.94377345),
2481+
(1.09881554, -0.99733851, 0.22229234)),
2482+
'isotopes': (12, 12, 16, 12, 1, 1, 1, 1, 1, 1, 1, 1, 16),
2483+
'symbols': ('C', 'C', 'O', 'C', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'H', 'O')}
2484+
d1_indices = [0, 7, 1, 12]
2485+
d2_indices=[0, 8, 1, 12]
2486+
result = check_dao_angle(d1_indices, initial_xyz)
2487+
self.assertTrue(result)
2488+
result = check_dao_angle(d2_indices, initial_xyz)
2489+
self.assertFalse(result)
24782490

24792491
def test_ester_hydrolysis(self):
24802492
"""Test ester hydrolysis reactions."""

0 commit comments

Comments
 (0)