|
28 | 28 | adjust_dihedral_angles, |
29 | 29 | get_neighbors_by_electronegativity, |
30 | 30 | get_matching_dihedrals, |
31 | | - find_matching_dihedral, |
| 31 | + check_dao_angle, |
32 | 32 | hydrolysis |
33 | 33 | ) |
34 | 34 | from arc.reaction import ARCReaction |
@@ -2464,17 +2464,29 @@ def test_adjust_dihedral_angles(self): |
2464 | 2464 | result = adjust_dihedral_angles(initial_zmat, zmat_indices, 5) |
2465 | 2465 | self.assertFalse(result) |
2466 | 2466 |
|
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) |
2478 | 2490 |
|
2479 | 2491 | def test_ester_hydrolysis(self): |
2480 | 2492 | """Test ester hydrolysis reactions.""" |
|
0 commit comments