Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #695 +/- ##
==========================================
+ Coverage 73.80% 73.97% +0.17%
==========================================
Files 99 101 +2
Lines 27352 27596 +244
Branches 5718 5746 +28
==========================================
+ Hits 20187 20415 +228
- Misses 5738 5745 +7
- Partials 1427 1436 +9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8825e9f to
cbec920
Compare
| print(self.rxn_2.ts_species.ts_guesses[0].initial_xyz) | ||
| self.assertEqual(self.rxn_2.ts_species.ts_guesses[0].initial_xyz['symbols'], | ||
| ('C', 'C', 'O', 'N', 'O', 'H', 'H', 'H', 'H', 'H')) | ||
| expected_xyz = 1 # todo |
Check notice
Code scanning / CodeQL
Unused local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 1 day ago
To fix the problem, we should either remove the unused local variable assignment or rename the variable to a name that clearly indicates it is intentionally unused (e.g., _expected_xyz or just _). Because the value 1 is clearly a placeholder tied to a TODO and is not used for any side effects, the most straightforward fix without changing existing functionality is to delete the line defining expected_xyz.
Concretely, in arc/job/adapters/ts/linear_test.py, inside the test_linear_adapter_2 method, remove line 4103:
4103: expected_xyz = 1 # todoNo additional imports, methods, or definitions are needed. The rest of the test remains unchanged and will continue to validate behavior as before.
| @@ -4100,7 +4100,6 @@ | ||
| self.assertGreater(len(self.rxn_2.ts_species.ts_guesses), 0) | ||
| self.assertEqual(self.rxn_2.ts_species.ts_guesses[0].initial_xyz['symbols'], | ||
| ('C', 'C', 'O', 'N', 'O', 'H', 'H', 'H', 'H', 'H')) | ||
| expected_xyz = 1 # todo | ||
|
|
||
| def test_get_r_constraints(self): | ||
| """Test the get_r_constraints() function.""" |
Also fixed the is_isomerization() method
added the linear adapter, and sorted alphabetically as in RMG
NMD Improvements (arc/checks/ts.py): - Replaced mean-based displacement baseline with Median + MAD (Median Absolute Deviation) to insulate the check from floppy rotors. - Implemented a mandatory Directionality Check: ensures formed and broken bonds move in anti-correlated directions along the imaginary mode. - Separated primary (formed/broken) from secondary (changed-order) bonds in the sigma test to reflect physical displacement scales. - Set a global numerical noise floor (1e-4 A) for the Hessian and raised the default validation threshold to 3.0 sigma.
IRC Improvements (arc/checks/ts.py): - Upgraded 'check_irc_species_and_rxn' to use molecular graph isomorphism as the primary validation method. - Added 'perceive_irc_fragments' using DFS-based connected component detection to handle multi-species reactions (e.g., A + B) reliably. - Implemented permutation-based matching to verify that the set of perceived IRC fragments matches the expected reaction species. - Retained distance-matrix bond-list comparison as a robust fallback.
| from arc.family.family import get_reaction_family_products | ||
| from arc.imports import settings | ||
| from arc.species.converter import check_xyz_dict, displace_xyz, xyz_to_dmat | ||
| from arc.species.converter import check_isomorphism, check_xyz_dict, displace_xyz, xyz_from_data, xyz_to_dmat |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 2 days ago
To fix an unused import, remove that specific symbol from the import statement while leaving the rest of the imports unchanged. This eliminates the unnecessary dependency and clears the CodeQL warning without impacting behavior.
Concretely, in arc/checks/ts.py, adjust the import on line 22 so that displace_xyz is no longer imported from arc.species.converter. Keep the other imported names (check_isomorphism, check_xyz_dict, xyz_from_data, xyz_to_dmat) intact. No other code changes are required, and no new methods, imports, or definitions are needed.
| @@ -19,7 +19,7 @@ | ||
| ) | ||
| from arc.family.family import get_reaction_family_products | ||
| from arc.imports import settings | ||
| from arc.species.converter import check_isomorphism, check_xyz_dict, displace_xyz, xyz_from_data, xyz_to_dmat | ||
| from arc.species.converter import check_isomorphism, check_xyz_dict, xyz_from_data, xyz_to_dmat | ||
| from arc.species.perceive import perceive_molecule_from_xyz | ||
| from arc.statmech.factory import statmech_factory | ||
|
|
Added a method for generating TS structures from atom mapped reactants and products.
The method works for unimolecular reactions, and at present is only implemented for isomerization reactions.