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 on reading multiple route in Gaussian input file #2939

Merged
merged 4 commits into from
Apr 17, 2023

Conversation

Ameyanagi
Copy link
Contributor

@Ameyanagi Ameyanagi commented Apr 12, 2023

Summary

This fixes the issue that the Gaussian input file fails to read multiple lines.

  • When the route input has multiple lines as below, GaussianInput.from_string() fails around the parsing of the route. This was due to inappropriate line counting when the route is separated in multiple lines.
  • few lines of code were added to parse the route and route_index.
  • test files for routes with multiple lines.

Example of Gaussian input (header only) with multiple lines of the route that failed.

%nprocshared=28
%mem=60GB
%chk=test.chk
# opt freq wb97xd/gen nosymm scf=(qc,maxcycle=1024) geom=connectivity
pseudo=read

Todo (if any)

Checklist

Before a pull request can be merged, the following items must be checked:

  • Doc strings have been added in the Google docstring format. Run pydocstyle on your code.
  • Type annotations are highly encouraged. Run mypy path/to/file.py to type check your code. Should I also rewrite the other part of the codes?
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

Note that the CI system will run all the above checks. But it will be much more efficient if you already fix most errors prior to submitting the PR. We highly recommended installing pre-commit hooks. Simply Run

pip install -U pre-commit
pre-commit install

in the repo's root directory. Afterwards linters will run before every commit and abort if any issues pop up.

@janosh
Copy link
Member

janosh commented Apr 17, 2023

Thanks! 👍

@janosh janosh merged commit 81bf5c8 into materialsproject:master Apr 17, 2023
@Ameyanagi
Copy link
Contributor Author

Thanks for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants