Skip to content

Fix the normal mode displacement TS check#768

Closed
alongd wants to merge 28 commits intomainfrom
nmd
Closed

Fix the normal mode displacement TS check#768
alongd wants to merge 28 commits intomainfrom
nmd

Conversation

@alongd
Copy link
Copy Markdown
Member

@alongd alongd commented Oct 7, 2024

The normal model displacement check was fixed, a new module for this check was added.
Tests added, though more thorough testing for the overall functionality are still needed.

Comment thread arc/checks/nmd.py Fixed
Comment thread arc/checks/nmd.py Fixed
Comment thread arc/checks/nmd_test.py Fixed
Comment thread arc/species/converter.py Fixed
@alongd alongd force-pushed the nmd branch 2 times, most recently from a9f8714 to 1337c95 Compare October 28, 2024 02:17
@codecov
Copy link
Copy Markdown

codecov Bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 92.88762% with 50 lines in your changes missing coverage. Please review.

Project coverage is 75.28%. Comparing base (66134b3) to head (cd4c959).
Report is 24 commits behind head on main.

Files with missing lines Patch % Lines
arc/checks/nmd.py 89.11% 13 Missing and 8 partials ⚠️
arc/scheduler.py 8.33% 11 Missing ⚠️
arc/species/species.py 69.23% 6 Missing and 2 partials ⚠️
arc/checks/ts.py 62.50% 1 Missing and 2 partials ⚠️
arc/species/converter.py 91.17% 3 Missing ⚠️
arc/checks/nmd_test.py 99.25% 1 Missing and 1 partial ⚠️
arc/reaction.py 96.66% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #768      +/-   ##
==========================================
+ Coverage   74.03%   75.28%   +1.24%     
==========================================
  Files         101      103       +2     
  Lines       28030    29480    +1450     
  Branches     5870     6322     +452     
==========================================
+ Hits        20752    22194    +1442     
- Misses       5803     5812       +9     
+ Partials     1475     1474       -1     
Flag Coverage Δ
unittests 74.33% <93.03%> (+0.29%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread arc/reaction.py Fixed
Comment thread arc/reaction.py Fixed
@calvinp0
Copy link
Copy Markdown
Member

calvinp0 commented Dec 4, 2024

Currently it appears the branch has an issue when it comes to parsing the energy of a fine opt job since it attempts to parse the fine opt before it is completed

Here is an input file that I have seen the issue occur

project: "rmg_rxn_1216"
level_of_theory: "wb97xd/def2tzvp"
job_types:
  rotors: False
  irc: False
  fine: True
  sp: True
compute_thermo: False
allow_nonisomorphic_2d: False
species:
  - label: "rmg_rxn_1216_r1_ON=O"
    smiles: "ON=O"
  - label: "rmg_rxn_1216_r2_sbr-C-sbr#N"
    smiles: "[C]#N"
  - label: "rmg_rxn_1216_p1_sbr-O--sbrsbr-N+-sbr=O"
    smiles: "[O-][N+]=O"
  - label: "rmg_rxn_1216_p2_C#N"
    smiles: "C#N"
reactions:
  - label: "rmg_rxn_1216_r1_ON=O + rmg_rxn_1216_r2_sbr-C-sbr#N <=> rmg_rxn_1216_p1_sbr-O--sbrsbr-N+-sbr=O + rmg_rxn_1216_p2_C#N"

The exception:

Exception has occurred: InputError       (note: full exception trace is shown but execution is paused at: _run_module_as_main)
Could not find file /home/calvin.p/runs/ARC/rmg_rxn_1216/calcs/Species/rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O/opt_a2957/output.out
  File "/home/calvin.p/Code/ARC/arc/parser.py", line 325, in parse_e_elect
    raise InputError(f'Could not find file {path}')
  File "/home/calvin.p/Code/ARC/arc/scheduler.py", line 2733, in post_sp_actions
    zpe_scale_factor=zpe_scale_factor)
  File "/home/calvin.p/Code/ARC/arc/scheduler.py", line 1306, in run_sp_job
    level=level,
  File "/home/calvin.p/Code/ARC/arc/scheduler.py", line 1544, in spawn_post_opt_jobs
    self.run_sp_job(label)
  File "/home/calvin.p/Code/ARC/arc/scheduler.py", line 622, in schedule_jobs
    self.spawn_post_opt_jobs(label=label, job_name=job_name)
  File "/home/calvin.p/Code/ARC/arc/scheduler.py", line 519, in __init__
    self.schedule_jobs()
  File "/home/calvin.p/Code/ARC/arc/main.py", line 646, in execute
    output=self.output,
  File "/home/calvin.p/Code/ARC/ARC.py", line 65, in main
    arc_object.execute()
  File "/home/calvin.p/Code/ARC/ARC.py", line 69, in <module>
    main()
  File "/home/calvin.p/mambaforge/envs/arc_env/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/calvin.p/mambaforge/envs/arc_env/lib/python3.7/runpy.py", line 193, in _run_module_as_main (Current frame)
    "__main__", mod_spec)
arc.exceptions.InputError: Could not find file /home/calvin.p/runs/ARC/rmg_rxn_1216/calcs/Species/rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O/opt_a2957/output.out

And when looking at arc.log we see it has spawned job opt_2957 but it has yet to end

Running local queue job **opt_a2957** using gaussian for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (fine opt)
  Ending job conf_opt_4 for TS0 (run time: 0:13:12)
Warning: Conformer 4 for TS0 did not converge.


Warning: Troubleshooting TS0 job conf_opt_4 which failed with status: "errored,"
with keywords: ['MaxOptCycles', 'GL9999'] in gaussian. The error "Maximum optimization cycles reached." was derived from the following line in the log file:
"Number of steps exceeded".
Troubleshooting conf_opt job in gaussian for TS0 using int=(Acc2E=14), using nosymm, using opt=(cartesian), opt=(maxcycle=200), opt=(RFO)
Running local queue job conf_opt_4 (a2958) using gaussian for TS0
  Ending job opt_a2955 for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (run time: 0:00:46)

Optimized geometry for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O at wb97xd/def2tzvp:
O       0.00000000    1.15416400   -0.25380800
N       0.00000000    0.00000000    0.58013300
O       0.00000000   -1.15416400   -0.25380800

Running local queue job freq_a2959 using gaussian for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O
Not running an sp job for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O at wb97xd/def2tzvp, software: gaussian since the optimization was done at the same level of theory. Using the optimization output to parse the sp energy.

I think it is also important to point out that ARC is running opt and fine opt for a species twice in parallel.
Refer to opt_a2951 and opt_a2953 for the opt
Refer to opt_a2955 and opt_a2957 for the fine opt

Running local queue job **opt_a2951** using gaussian for **rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O**
  Ending job conf_opt_3 for TS0 (run time: 0:08:50)
Warning: Conformer 3 for TS0 did not converge.


Warning: Troubleshooting TS0 job conf_opt_3 which failed with status: "errored,"
with keywords: ['MaxOptCycles', 'GL9999'] in gaussian. The error "Maximum optimization cycles reached." was derived from the following line in the log file:
"Number of steps exceeded".
Troubleshooting conf_opt job in gaussian for TS0 using int=(Acc2E=14), using scf=(qc), using nosymm, using opt=(cartesian), opt=(maxcycle=200)
Running local queue job conf_opt_3 (a2952) using gaussian for TS0
  Ending job conf_opt_0 for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (run time: 0:01:28)

Conformer jobs for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O successfully terminated.

Most stable conformer for species rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O was found to be isomorphic with the 2D graph representation [O]N=O

Conformer number 0 for species rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O is used for geometry optimization.
Running local queue job **opt_a2953** using gaussian for **rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O**
  Ending job conf_opt_3 for TS0 (run time: 0:04:37)
Warning: Conformer 3 for TS0 did not converge.


Warning: Troubleshooting TS0 job conf_opt_3 which failed with status: "errored,"
with keywords: ['MaxOptCycles', 'GL9999'] in gaussian. The error "Maximum optimization cycles reached." was derived from the following line in the log file:
"Number of steps exceeded".
Troubleshooting conf_opt job in gaussian for TS0 using int=(Acc2E=14), using scf=(qc), using nosymm, using opt=(cartesian), opt=(maxcycle=200), opt=(RFO)
Running local queue job conf_opt_3 (a2954) using gaussian for TS0
  Ending job opt_a2951 for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (run time: 0:01:27)
**Running local queue job opt_a2955 using gaussian for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (fine opt)**
  Ending job opt_a2953 for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (run time: 0:01:27)
**Running local queue job opt_a2957 using gaussian for rmg_rxn_1216_p1_sbr-O--sbrsbr-Np-sbr=O (fine opt)**
  Ending job conf_opt_4 for TS0 (run time: 0:13:12)
Warning: Conformer 4 for TS0 did not converge.

kfir4444 added a commit that referenced this pull request Aug 24, 2025
This is a large PR that fundamentally adds the Molecule class internally
in ARC. Now ARC is compatible with Py 3.12
This PR follows the work done in #754 where ARC were given capabilities
to work directly with the RMG-database without using the RMG API. Now,
finally, ARC does not depend on Julia.

The major change made in this PR required additional modifications.
Although we appreciate small and smart PR's it is very hard to decouple
these changes. The main modifications are as follows:
1. Naturally, the interface to Arkane had to be modified since now RMG
is not a direct dependency. We now use Arkane only as a subprocess for
statmech.
2. ESS paersing was previously somewhat facilitated through Arkane, now
there's a new `parser` module in ARC with adapters for each ESS.
3. Bugs were discovered in our two perception algorithms (we used to
have `species/xyz_to_2d` and `species/xyz_to_smiles`, falling back to a
single bond version of the molecule if it cannot be perceived). Now we
have a new `species/perceive` algorithm, with a fallback to
`species/xyz_to_smiles` if needed. Success rates are higher, and we
always return a molecule with bond orders. This might be the end of the
`allow_nonisomorphic_2d` flag in ARC. We'll keep it around for a while,
but may deprecate it in the future.
4. QCElemental was removed as a dependency. Combined with the removal of
Arkane's API, this means that now we provide translations from atomic
numbers to atomic mass. this is done in common.py with data stored under
`data/elements.yml`.
5. The removal of QCElemental also impacted our atom mapping algorithm.
It turns our that we used this as a fall back quite often for
isomerization. The atom mapping engine and driver were updated, which is
another positive outcome of this PR.
6. Better and automated installation scripts were added under `devtools`
for all the external dependencies, and the CI was updated as well, along
with the Makefile. A big thanks to @calvinp0 for the endless hours he
invested in this.
7. ZMatrices and the H Abstraction heuristics modules were updated as
well.
8. The TS NMD checks have been updated, incorporating #768 into this PR.


Tests were of course added. We still need to updated the docs,
specifically for the installation instructions, and check the
installation scripts again, they were mainly tested in the context of
the CI.

With this merged, we should soon tag a new version of ARC.
@alongd
Copy link
Copy Markdown
Member Author

alongd commented Aug 25, 2025

implemented by #789

@alongd alongd closed this Aug 25, 2025
@alongd alongd deleted the nmd branch August 25, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants