Repository navigation
Conversation
…e MLIP force noise
…nstead of crashing
…fore saving the project
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1072 +/- ##
==========================================
- Coverage 67.15% 67.12% -0.04%
==========================================
Files 123 123
Lines 43675 43706 +31
Branches 11153 11161 +8
==========================================
+ Hits 29332 29338 +6
- Misses 11203 11224 +21
- Partials 3140 3144 +4
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…rmer jobs it restored
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fourteen fixes for failures that appeared when running ARC at scale on a machine-learned potential (UMA through the ASE adapter) next to a DFT reference route. The benchmark was 116 C/H/O species and 25 H-abstraction reactions, thermo and rates, on a PBS cluster with several ARC runs at once. Each fix is its own commit with a test where one is possible. Most are in the ASE adapter; the rest are general (the job cap, restarts, the IRC check, rotor-scan checks, Arkane species files).
Changes
ASE adapter (
ase_adapter.py,scripts/ase_script.py)localserver that is a queue (PBS here),upload_files()copies only check files, but the submit script runs$JOB_DIR/ase_script.py. Every ASE queue job failed.set_files()now copies the script into the job directory.rotor_top()built its neighbor list with ASE's defaultskin=0.3, which ASE adds to every cutoff, so heavy atoms counted as bonded up to 2.42 Å apart: the carbons of C–O–C (2.33 Å), or C and the far O of C–O–O. Nowskin=0.0.FixInternals.adjust_positions did not converge). ARC defines, e.g., the OH rotor of HOC≡COH as H–O–C≡C, with O–C≡C at 175°, and a dihedral through three collinear atoms is undefined.well_defined_torsion()replaces such an end atom by the first atom beyond it that is off the pivot axis. That measures the same rotation about the same bond. If one side is linear to its end, the scan raises, since no torsion exists. Gaussian scanned the same torsions.min(fmax, 0.01)eV/Å. At the opt default of 0.001, it failed on the first step off UMA's CH₄ + OH saddle (IRCInnerLoopConvergenceFailure), because that is the level of an MLIP's force noise. The IRC now has its ownirc_fmax(default 0.01) andkeep_going=True, and a path cut short is kept with a warning. The endpoints only seed ARC's IRC species, which ARC optimizes anyway.Scheduler and checks
A scan-troubleshooting crash ended the whole run. For an inconsistent ASE scan, ARC's "freeze" remedy called
ics_to_scan_constraints(), which raisesNotImplementedErrorfor YAML outputs.trsh_scan_job()now raises aTrshError, which the Scheduler already handles by giving up that rotor.Correct IRC endpoints of O-atom reactions were rejected. For O(³P) + H₂, the endpoints were H₂···O and OH···H, but ARC perceives a lone O as a closed-shell singlet, which is not isomorphic with the reactant. The bond-list fallback then failed too, because it compares bonds under one atom map, while the two H atoms of H₂ are interchangeable. Isolated atoms now match by element. The existing bond-list test now disables the isomorphism tier, so that it still tests the bond-list tier.
max_simultaneous_jobscounted the user's other jobs. The cap compared every job ID in the queue with the limit. A second ARC run of the same user (or any other job) could starve a run forever, since the waiting loop doesn't process the run's own finished jobs meanwhile. It now counts only the run's own job IDs (own_job_ids()).A restarted run crashed on TS conformer jobs still in flight.
run_ts_conformer_jobs()respawned them, resetjob_dict[label]['conf_opt'], andsave_restart_dict()then raised aKeyErrorfor the restored job names. It now returns if conformer jobs of that TS are already running.The end of a run crashed when a TS failed its IRC check. The Scheduler deletes that TS's IRC species from its own list only, so
save_project_info_file()raised aKeyError, which skipped Arkane andoutput.yml. ARC now drops those species from its list too.Arkane ignored the multiplicity ARC wrote. The species template wrote
spinMultiplicity, but Arkane readsspin_multiplicityfrom species files. Logs that state their own multiplicity were unaffected, but an output without it (e.g., a YAML output) had none.ARC accepted rotor scans that stopped partway. A Gaussian scan that ends on an "Internal coordinate error" is invalidated in
check_scan_job(). But for more than five points,scan_quality_check()then ran on the points the scan reached and overwrote that verdict, so a smooth partial scan became a successful rotor (e.g., HOC≡COH, stopped at point 12 of 46). Arkane rejects such a log, and since ARC runs one Arkane job for all species, one of them left the whole project without thermo; on a TS, without rates. The quality check now runs only on a scan that is not already invalid.A restarted run crashed generating conformers for an IRC species. On restart, an IRC endpoint species whose opt had not finished went through
run_conformer_jobs()like any species, and ARC often has no 2D graph for these complexes (AttributeError: 'NoneType' object has no attribute 'copy'incheat_sheet()). IRC species take their geometry from the IRC path, so they now get no conformers.A flat rotor scan crashed the run. A scan whose 46 energies were identical (nothing turned: the rotating group lay on the axis) has no peaks or valleys, and
determine_rotor_symmetry()raised onmin()of the empty peak list. Such a scan is now invalidated before its symmetry is sought.A restarted run re-optimized species it had already optimized and scanned. Two paths spawned an optimization from a species' conformers again:
schedule_jobs()optimizes any species that has conformer energies but no geometry. A restart file saved while conformer jobs ran still holds the force-field energies of those that had not reported, so the restart optimized the force field's best conformer while the restored conformer jobs were still running.running_jobsrepeated this on later restarts (butanal's two, across three restarts), after the rotor scans of the first optimization had run.In the benchmark, butanal and ethanol ended on a different conformer from the one their rotors were scanned on (0.56 and 0.16 kJ/mol apart), so Arkane combined the scans of one conformer with the frequencies of another. Both paths now go through
optimize_most_stable_conformer(). It spawns nothing while conformer jobs of the species are running, or once the species has an optimization (or composite job) running or converged. Troubleshooting that re-runs conformers deletes the species' jobs first, which clears both conditions.Checks
ase_test.py,trsh_test.py,checks/ts_test.py,scheduler_test.py,main_test.pyandstatmech/arkane_test.pypass (scheduler_test.pyrun with-n0; under xdist a few of its tests share files and fail at random, also without this PR's last commit). The exceptions are three tests that already fail onmainin this environment, because they run Arkane:test_check_rxn_e0,test_compute_rxn_e0,test_run_statmech_using_molecular_properties.Tests
test_set_files_puts_the_script_in_a_local_queue_job_directory(1)test_rotor_top_does_not_bond_geminal_heavy_atoms: dimethyl ether (2)test_well_defined_torsion: HOC≡COH, ethane, and a linear acyl with no torsion (3)test_an_irc_job_ends_at_the_end_of_its_path: a stand-in Sella; checks the endpoint,irc_fmaxandkeep_going(4)test_trsh_scan_job_cannot_freeze_in_a_software_without_constraints(5)test_check_irc_matches_an_isolated_atom_by_element: the UMA O + H₂ endpoints (6)test_check_scan_job_keeps_an_internal_coordinate_error_invalid(11)test_run_conformer_jobs_skips_irc_species: an IRC species gets no conformers, an ordinary one still does (12)test_check_scan_job_invalidates_a_flat_scan(13)test_optimize_most_stable_conformer_once: conformer jobs still running, an optimization running or converged, a composite job running, and the ordinary case (14)