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

Solve problems in arc's directed scans. #602

Merged
merged 15 commits into from
Mar 13, 2023
Merged

Solve problems in arc's directed scans. #602

merged 15 commits into from
Mar 13, 2023

Conversation

kfir4444
Copy link
Collaborator

A few functions returned a np.float64, which caused errors when dumped into yaml files, and several other small corrections.

@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Merging #602 (8343da8) into main (b081716) will increase coverage by 0.00%.
The diff coverage is 60.00%.

@@           Coverage Diff           @@
##             main     #602   +/-   ##
=======================================
  Coverage   72.16%   72.16%           
=======================================
  Files          97       97           
  Lines       25564    25608   +44     
  Branches     5392     5408   +16     
=======================================
+ Hits        18447    18479   +32     
- Misses       5758     5768   +10     
- Partials     1359     1361    +2     
Impacted Files Coverage Δ
arc/job/adapters/torch_ani.py 76.82% <0.00%> (-2.92%) ⬇️
arc/parser.py 84.15% <0.00%> (-0.48%) ⬇️
arc/plotter.py 27.45% <0.00%> (-0.17%) ⬇️
arc/scheduler.py 20.20% <0.00%> (-0.05%) ⬇️
arc/main.py 48.42% <75.00%> (+0.92%) ⬆️
arc/main_test.py 98.46% <100.00%> (+0.10%) ⬆️
arc/species/converter.py 75.43% <100.00%> (ø)
arc/species/converter_test.py 99.24% <100.00%> (+<0.01%) ⬆️
arc/species/zmat.py 75.35% <100.00%> (ø)

... and 2 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Looking good!
Please see a few comments
Also, it would significantly strengthen this PR if you can add a directed scan test using tani

arc/species/converter_test.py Show resolved Hide resolved
arc/species/zmat.py Show resolved Hide resolved
@@ -233,6 +233,8 @@ def parse_geometry(path: str) -> Optional[Dict[str, tuple]]:
content = read_yaml_file(path)
if isinstance(content, dict) and 'xyz' in content.keys():
return content['xyz']
if isinstance(content, dict) and 'opt_xyz' in content.keys():
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps change the tani script to store the xyz output in an xyz key instead of the opt_xyz key. We wouldn’t want additional future adapters to add their own custom keys for the geometry (unless there’s good reason to) and have to accommodate for them in this (and other?) functions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

There is an important distinction between xyz and opt_xyz, how would we differentiate them without using different keys?
I don't think it's just the torchani adapter that relates differently to these properties..

Copy link
Member

Choose a reason for hiding this comment

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

@kfir4444, let me know when this is resolved, and let's merge this in

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@alongd I will probably add more commits to this PR before

Copy link
Member

Choose a reason for hiding this comment

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

Was this addressed? Are we leaving it both 'xyz' and 'opt_xyz'?

arc/plotter.py Show resolved Hide resolved
arc/species/converter.py Show resolved Hide resolved
@kfir4444
Copy link
Collaborator Author

Looking good! Please see a few comments Also, it would significantly strengthen this PR if you can add a directed scan test using tani

Thanks for the commants @alongd!
I was planning to add a functional scans test in the future, for now this PR sets the ground for additional work that I need to do in order to get the directed scans in operational order, especially with the new openbabel and torchani adapters 😃
I will add an issue on the functional scans test and mention this PR.

Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Thanks, I added a few comments.
There are at least three cases where we use inconsistent types. It's an invitation for bugs down the road. Can you check?

arc/species/converter_test.py Outdated Show resolved Hide resolved
arc/main.py Outdated Show resolved Hide resolved
arc/scheduler.py Outdated Show resolved Hide resolved
arc/scheduler.py Outdated Show resolved Hide resolved
Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Thanks, I added two comments

arc/main.py Outdated Show resolved Hide resolved
@@ -233,6 +233,8 @@ def parse_geometry(path: str) -> Optional[Dict[str, tuple]]:
content = read_yaml_file(path)
if isinstance(content, dict) and 'xyz' in content.keys():
return content['xyz']
if isinstance(content, dict) and 'opt_xyz' in content.keys():
Copy link
Member

Choose a reason for hiding this comment

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

Was this addressed? Are we leaving it both 'xyz' and 'opt_xyz'?

alongd
alongd previously approved these changes Mar 13, 2023
Copy link
Member

@alongd alongd left a comment

Choose a reason for hiding this comment

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

Looking good! Let's wait for the tests and we can merge

This is engaged if the user  did not request an opt job.
Sometimes, a user may not request a certain job type, but still provide a `level` argument. This detaches the need verify if a job type is true before making the level of theory  to a ``Level`` object.
Copy link
Member

@calvinp0 calvinp0 left a comment

Choose a reason for hiding this comment

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

looks good to me

@kfir4444 kfir4444 merged commit 413ba6c into main Mar 13, 2023
@kfir4444 kfir4444 deleted the dubg_nd_scans branch March 13, 2023 13:34
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