Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the normal mode displacement TS check #768

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Fix the normal mode displacement TS check #768

wants to merge 27 commits into from

Conversation

alongd
Copy link
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.

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

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 94.43609% with 37 lines in your changes missing coverage. Please review.

Project coverage is 74.35%. Comparing base (66134b3) to head (0f27b38).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
arc/checks/nmd.py 89.11% 13 Missing and 8 partials ⚠️
arc/species/converter.py 82.75% 5 Missing ⚠️
arc/checks/ts.py 62.50% 1 Missing and 2 partials ⚠️
arc/species/species.py 75.00% 3 Missing ⚠️
arc/checks/nmd_test.py 99.25% 1 Missing and 1 partial ⚠️
arc/reaction.py 96.66% 0 Missing and 2 partials ⚠️
arc/scheduler.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #768      +/-   ##
==========================================
+ Coverage   74.03%   74.35%   +0.32%     
==========================================
  Files         101      103       +2     
  Lines       28030    28490     +460     
  Branches     5870     5945      +75     
==========================================
+ Hits        20752    21185     +433     
- Misses       5803     5826      +23     
- Partials     1475     1479       +4     
Flag Coverage Δ
unittests 74.35% <94.43%> (+0.32%) ⬆️

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.


🚨 Try these New Features:

@alongd alongd force-pushed the nmd branch 2 times, most recently from 3a55c4d to 06254f9 Compare October 28, 2024 11:54
@alongd alongd requested a review from calvinp0 October 28, 2024 19:01
@@ -9,7 +9,7 @@
from rmgpy.species import Species

import arc.rmgdb as rmgdb
from arc.common import get_logger
from arc.common import generate_resonance_structures, get_logger

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'generate_resonance_structures' may not be defined if module
arc.common
is imported before module
arc.reaction
, as the
definition
of generate_resonance_structures occurs after the cyclic
import
of arc.reaction.
@@ -9,7 +9,7 @@
from rmgpy.species import Species

import arc.rmgdb as rmgdb
from arc.common import get_logger
from arc.common import generate_resonance_structures, get_logger

Check failure

Code scanning / CodeQL

Module-level cyclic import Error

'get_logger' may not be defined if module
arc.common
is imported before module
arc.reaction
, as the
definition
of get_logger occurs after the cyclic
import
of arc.reaction.
@calvinp0
Copy link
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.

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.

2 participants