Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #695 +/- ##
==========================================
+ Coverage 60.43% 61.96% +1.52%
==========================================
Files 102 112 +10
Lines 31102 38184 +7082
Branches 8104 10010 +1906
==========================================
+ Hits 18798 23660 +4862
- Misses 9965 11602 +1637
- Partials 2339 2922 +583
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
8825e9f to
cbec920
Compare
908773e to
0acc5d4
Compare
Also fixed the is_isomerization() method
Also testing the atom_order arg
And updated update_zmat_by_xyz()
added the linear adapter families
So that parallel execution of tests on CI won't run w/o job.execute()
When an ARCSpecies is constructed with both an adjlist (or SMILES) and xyz, mol_from_xyz re-perceives the molecule from the 3D geometry. Previously, perceive_molecule_from_xyz was called with n_radicals=None (the default) even when the existing mol carried radical information. For singlet biradicals this caused the perception to produce a closed-shell molecule with lone pairs instead of radical centers, which then replaced the original mol and broke downstream family detection (e.g., Intra_Disproportionation was not identified). Now, when self.mol already has radical electrons and the user did not explicitly set number_of_radicals, the radical count is derived from self.mol and forwarded to perceive_molecule_from_xyz and is_mol_valid.
To read additional types of RMG-database families
get_entries_label_with_parentheses, TestSplitEntries
| both flanking bonds with order >= 2 (cumulated). | ||
| """ | ||
| i_atom, j_atom = forming_bond | ||
| n_atoms = len(mol.atoms) |
Check notice
Code scanning / CodeQL
Unused local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
General fix: remove unused local assignments unless the right-hand side has side effects; if intentional, rename to an accepted unused-name pattern. Here, len(mol.atoms) has no side effects and the value is not needed, so the best fix is to delete the assignment line.
Best specific fix: in arc/job/adapters/ts/linear_utils/isomerization.py, inside path_has_cumulated_bonds, remove the line n_atoms = len(mol.atoms) and keep all other logic unchanged.
No imports, new methods, or new definitions are needed.
| @@ -235,7 +235,6 @@ | ||
| both flanking bonds with order >= 2 (cumulated). | ||
| """ | ||
| i_atom, j_atom = forming_bond | ||
| n_atoms = len(mol.atoms) | ||
|
|
||
| # Build adjacency list | ||
| adj = mol_to_adjacency(mol) |
| dict: A new XYZ dictionary with the near-attack geometry. | ||
| """ | ||
| coords = np.array(xyz['coords'], dtype=float) | ||
| n_atoms = len(mol.atoms) |
Check notice
Code scanning / CodeQL
Unused local variable Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
Remove the unused local variable assignment in arc/job/adapters/ts/linear_utils/isomerization.py within get_near_attack_xyz.
- General approach: when a local variable is never read, delete the assignment unless the right-hand side has side effects.
- Here,
len(mol.atoms)has no side effects, so the whole line can be safely removed without changing behavior. - Edit region: around lines 314–317 in
get_near_attack_xyz. - No imports, helper methods, or new definitions are needed.
| @@ -312,7 +312,6 @@ | ||
| dict: A new XYZ dictionary with the near-attack geometry. | ||
| """ | ||
| coords = np.array(xyz['coords'], dtype=float) | ||
| n_atoms = len(mol.atoms) | ||
|
|
||
| adj = mol_to_adjacency(mol) | ||
|
|
| from arc.job.adapters.ts.linear_utils.postprocess import ( | ||
| PAULING_DELTA, | ||
| build_zmat_with_retry, | ||
| has_detached_hydrogen, | ||
| _has_h_close_contact, | ||
| has_too_many_fragments, | ||
| _has_misoriented_migrating_h, | ||
| _has_migrating_h_nearer_to_nonreactive, | ||
| _has_bad_ts_motif, | ||
| has_excessive_backbone_drift, | ||
| has_misdirected_migrating_h, | ||
| adjust_reactive_bond_distances, | ||
| has_broken_nonreactive_bond, | ||
| fix_forming_bond_distances, | ||
| fix_nonreactive_h_distances, | ||
| fix_crowded_h_atoms, | ||
| fix_h_nonbonded_clashes, | ||
| has_inward_migrating_group_h, | ||
| fix_migrating_group_umbrella, | ||
| postprocess_generic, | ||
| postprocess_ts_guess, | ||
| stagger_donor_terminal_h, | ||
| postprocess_h_migration, | ||
| validate_ts_guess, | ||
| ) |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 17 hours ago
Remove the unused symbols from the from arc.job.adapters.ts.linear_utils.postprocess import (...) list in arc/job/adapters/ts/linear_utils/postprocess_test.py.
Best fix (no behavior change):
- Edit only the import block starting at line 17.
- Delete
has_inward_migrating_group_handpostprocess_genericfrom that import tuple. - Keep all remaining imports as-is and in place.
- No method/body/test logic changes are required.
| @@ -31,9 +31,7 @@ | ||
| fix_nonreactive_h_distances, | ||
| fix_crowded_h_atoms, | ||
| fix_h_nonbonded_clashes, | ||
| has_inward_migrating_group_h, | ||
| fix_migrating_group_umbrella, | ||
| postprocess_generic, | ||
| postprocess_ts_guess, | ||
| stagger_donor_terminal_h, | ||
| postprocess_h_migration, |
Adds a new Linear TS search adapter that builds TS guesses from atom-mapped reactants and products via Z-matrix chimera construction with Hammond-biased weighting. The adapter is incore-only, plugs into ARC's scheduler like heuristics/autotst_ts, and delegates heavy geometry work to a new linear_utils/ subpackage (5 modules). Currently implemented for isomerization/unimolecular reactions.
The PR also carries supporting additions to arc/species/zmat.py (anchors, smart-anchor detection, zmat re-indexing helpers), arc/species/converter.py (atom-map reordering), arc/reaction/reaction.py (is_unimolecular, refined is_isomerization), and a biradical-preservation fix in arc/species/species.py. CI was hardened: pinned action,
-n 4 --dist workstealfor stability, and obabel test made self-contained.