Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

berquist
Copy link
Member

@berquist berquist commented May 17, 2021

Closes #1040

Some things that need to be resolved:

  • ircstatus being separate from optstatus is more flexible in the event that a multi-step job is run, but the {converged,new,unknown,unconverged}_geometries methods only work with optstatus, and their docstrings imply that they could be used for IRC calculations. The best solution is only use optstatus and split multi-part jobs into multiple ccData instances. Using optstatus.
  • ircvalues is a grabbag. Most of the stuff probably isn't important.
  • The fix for printing an extra set of atomcoords (the input ones appear again at the very end) fails for when a job appears after the IRC one. I'm going to switch over to not removing the last printed atomcoords, just so there are no surprises. Getting coordinates via ircstatus/optstatus will make it so that these are easily avoided. My original thought process here was that IIRC the Gaussian BOMD parser doesn't keep rejected steps, so it's ok to leave stuff out of atomcoords, but by that logic I'd skip everything that isn't going to be marked OPT_DONE, which doesn't make sense.

@berquist berquist added this to the v1.7.1 milestone May 17, 2021
@codecov
Copy link

codecov bot commented May 17, 2021

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (d533158) 87.79% compared to head (7095749) 87.82%.
Report is 659 commits behind head on master.

❗ Current head 7095749 differs from pull request most recent head 5a4365e. Consider uploading reports for the commit 5a4365e to get more accurate results

Files Patch % Lines
cclib/parser/data.py 50.00% 3 Missing ⚠️
cclib/parser/qchemparser.py 97.67% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1042      +/-   ##
==========================================
+ Coverage   87.79%   87.82%   +0.03%     
==========================================
  Files          64       64              
  Lines       13435    13480      +45     
==========================================
+ Hits        11795    11839      +44     
- Misses       1640     1641       +1     

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

assert len(tokens) == 10
assert self.rpath_direction is not None
coord_idx = len(self.atomcoords) - 1
ircvalues_step = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some guarantee of what fields will be populated in this dict for different IRC calculations? It seems like we are creating another metadata situation where the fields of this are not well defined. This might be necessary though

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, I think the only thing that's important is some indication of which direction we're going (up or down the TS eigenmode). Other programs might only allow you to go in one direction, but I need a way of differentiating between the two since Q-Chem tries both.

@langner
Copy link
Member

langner commented Jul 28, 2021

Is this ready for v1.7.1?

@langner langner modified the milestones: v1.7.1, v1.7.2 Aug 11, 2021
@berquist
Copy link
Member Author

I think all that remains is to make sure the tests are good and add some docs.

@berquist
Copy link
Member Author

I'm a bit stuck conceptually for how this implementation is supposed to work.

For an IRC calculation, there are two levels of convergence:

  • Convergence of the whole reaction path down to the product or reactant state
  • Convergence of a single step along the reaction path

I think we want to set it so that OPT_DONE corresponds to each step along the reaction path. Is this how the other parsers use optstatus?

@ATenderholt
Copy link
Contributor

I think Gaussian was the initial implementation, so I've been refreshing my memory from there. Also looks like it's changed a bit since I last worked on it.

It does look like optstatus is set for every coordinate to indicate its state in a given optimization step (OPT_NEW), uncoverged (OPT_UNCONVERGED), or converged (OPT_DONE).

>>> from cclib.parser import ccopen
>>> parser = ccopen("data/Gaussian/basicGaussian16/dvb_scan_relaxed.log")
>>> data = parser.parse()
>>> len(data.optstatus)
61
>>> len(data.atomcoords)
61
>>> len(data.scfenergies)
61
>>> data.optdone
True
>>> data.optstatus
array([5, 1, 0, 0, 0, 4, 1, 0, 0, 0, 4, 1, 0, 0, 0, 0, 4, 1, 0, 0, 0, 0,
       0, 0, 4, 1, 0, 0, 0, 4, 1, 0, 0, 0, 4, 1, 0, 0, 4, 1, 0, 0, 4, 1,
       0, 0, 0, 4, 1, 0, 0, 0, 4, 1, 0, 0, 4, 1, 0, 0, 4], dtype=int32)

I'm a bit surprised the first value is 5 (OPT_DONE & OPT_NEW), but maybe it just started from an optimized structure.

@langner langner modified the milestones: v1.7.2, v1.8 May 17, 2022
@langner langner modified the milestones: v1.8, v1.8.1 May 17, 2023
@berquist berquist modified the milestones: v1.8.1, v2.0 Dec 18, 2023
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.

Parse intrinsic reaction coordinate calculations from Q-Chem

4 participants