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

New Gaussian plugin #325

Merged
merged 3 commits into from
Apr 3, 2024
Merged

New Gaussian plugin #325

merged 3 commits into from
Apr 3, 2024

Conversation

rashatwi
Copy link
Contributor

Add new job and handler modules for various Gaussian errors along with their unittests. Examples of handled errors include:

  • Convergence failure in optimization and SCF jobs
  • Linear bend formation around some angle in geometry
  • Error in internal coordinate system
  • Insufficient memory
  • Wall time error

Among others

Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

thanks so much @rashatwi! this looks like a lot of great work!

left some comments regarding large test files

Copy link
Member

Choose a reason for hiding this comment

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

it would be great if the tests could be refactored to not need large test files. 16MB files increase the git clone for future contributors

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just replaced the files that are > 8 MB with mock ones

Copy link
Member

Choose a reason for hiding this comment

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

for large text files, it's best to gzip or lzma compress them

@janosh janosh added enhancement gaussian Gaussian package handler Error handler labels Mar 27, 2024
Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

Thank you very much! final suggestion: Can you gzip the remaining output files? Doesn't have to be all of them, but at least the ones that have a few hundred lines or more.

@janosh
Copy link
Member

janosh commented Mar 30, 2024

thanks @rashatwi. i made a few more changes but don't have permission to push to this PR. could you check the box saying "allow edits from maintainers"?

@rashatwi
Copy link
Contributor Author

thanks @rashatwi. i made a few more changes but don't have permission to push to this PR. could you check the box saying "allow edits from maintainers"?

Looks like I cannot "allow edits from maintainers" if I'm doing the PR from an organization account Please check this

@janosh
Copy link
Member

janosh commented Mar 31, 2024

i see. i didn't know about this restriction for org forks.

i just pushed a new gaussian branch with all your changes and my two commits on top

1f8e2a6 move matplotlib import into _monitor_convergence
180990b add type annotations to GaussianJob

could you have a look at those changes and see if they make sense, esp. in 180990b? if so, would be great if you could change your target branch on this PR from master to gaussian, pull my changes into your branch and then add similar type annotations to custodian/gaussian/handlers.py. thanks!

@rashatwi rashatwi changed the base branch from master to gaussian March 31, 2024 07:17
@rashatwi
Copy link
Contributor Author

rashatwi commented Apr 3, 2024

Done

Copy link
Member

@janosh janosh left a comment

Choose a reason for hiding this comment

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

perfect! thank you very much. 🙏 this is great work 👍

@janosh janosh merged commit c3dcf12 into materialsproject:gaussian Apr 3, 2024
1 check passed
janosh added a commit that referenced this pull request Apr 24, 2024
* Add the start of the Gaussian handler

* Add the start of the Gaussian job

* Add the start of the Gaussian custodian

* Add matplotlib to requirements

* Define better_scf_guess job

* Correct scf cycles error handling

* Add an option to check convergence as a function of iterations

* Implement opt_steps error handling

* Implement solute_solvent_surface error handling

* Change integration grid

* Update Gaussian integration grids

* Generate a better geom guess at a lower LOT

* Update better_guess job to be used with OPT and SCF job types

* Add more error definitions

* Add integral keyword to route_parameters

* Remove empty spaces in route_params dict

* Plot convergence only if data is available

* Restart opt calc if it appears to be converging

* Correct torsion error handler

* Cleanups

* Handle more errors

* Cleanups

* Correct how the integration grid is read

* Correct the conversion of convergence data to floats

* Correct the error of internal coords by performing opt using cart coords and disabling symmetry

* Handle insufficient memory

* Fix bug in reading scf parameters

* Add wall time handler

* Postprocess job

* Add the start of the Gaussian handler

* Add the start of the Gaussian job

* Add the start of the Gaussian custodian

* Define better_scf_guess job

* Correct scf cycles error handling

* Add an option to check convergence as a function of iterations

* Implement opt_steps error handling

* Implement solute_solvent_surface error handling

* Change integration grid

* Update Gaussian integration grids

* Generate a better geom guess at a lower LOT

* Update better_guess job to be used with OPT and SCF job types

* Add more error definitions

* Add integral keyword to route_parameters

* Remove empty spaces in route_params dict

* Plot convergence only if data is available

* Restart opt calc if it appears to be converging

* Correct torsion error handler

* Cleanups

* Handle more errors

* Cleanups

* Correct how the integration grid is read

* Correct the conversion of convergence data to floats

* Correct the error of internal coords by performing opt using cart coords and disabling symmetry

* Handle insufficient memory

* Fix bug in reading scf parameters

* Add wall time handler

* Postprocess job

* Add gaussian dependencies

* Add docstrings and use directory as input arg

* Add terminate function to kill Gaussian job

* Update Gaussian custodian version

* Use directory as input

* Bug fixes

* Linting

* Linting

* Update Gaussian custodian version

* Cleanups

* Remove old backup_gaussian_files function

* Add Gaussian handler docstrings

* Update docstrings

* Update docstrings

* Fix typo in WallTimeErrorHandler

* Add Gaussian tests

* Add Gaussian test files

* Deactivate better guess after running test

* Remove duplicate tearDown func

* Correct class name

* Change rwf assertion statement

* Linting

* Bug fix in matching error type

* Replace actual Gaussian checkpoint files with mock ones

* Gzip Gaussian output files

* move matplotlib import into _monitor_convergence

* add type annotations to GaussianJob

* Change better_guess func name in tests

* Add type annotations to GaussianErrorHandler

* `float` instead of `int | float` for mem

* New Gaussian plugin  (#325)

* Change better_guess func name in tests

* Add type annotations to GaussianErrorHandler

* `float` instead of `int | float` for mem

* ruff str format fixes, date assert refactor, rename test jobs

* Fix issue with gaussian .gz files

---------

Co-authored-by: Rasha <atwi.r@husky.neu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gaussian Gaussian package handler Error handler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants