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

Gaussian log file parsing in local_force.py #53

Open
rlaplaza opened this issue Jan 9, 2023 · 0 comments · May be fixed by #61
Open

Gaussian log file parsing in local_force.py #53

rlaplaza opened this issue Jan 9, 2023 · 0 comments · May be fixed by #61
Assignees

Comments

@rlaplaza
Copy link

rlaplaza commented Jan 9, 2023

I think there is a small bug in local_force.py that raises an error due to an unforeseen parsing situation in def _parse_gaussian_log(self, file: str | PathLike) -> None: # noqa: C901.

The check in line 873 :

        if (
            not np.array_equal(input_coordinates, standard_coordinates)
            and standard_coordinates.size > 0
        ):

evaluates as True in some logfiles in which standard_coordinates are filled but input_coordinates are not, because the input coordinates are effectively standard coordinates and gaussian output skips the input coordinates block (as far as I understand). I can confirm that we have logfiles for which this happens. Thus, valid gaussian logfiles can be discarded even though there are coordinates available!

The issue is fixed by checking, also, whether input_coordinates is zero, i.e.:

        if (
            not np.array_equal(input_coordinates, standard_coordinates)
            and standard_coordinates.size > 0
            and input_coordinates.size > 0
        ):

but the issue may be present elsewhere. Notably, I suspect that input coordinates must be set to standard coordinates in such cases. Can set up a pull request, but I wanted to raise attention because the issue (if it is indeed an issue) might be apparent elsewhere.

P.d.: I attached an exemplary log file that is compressed because it was larger than 25 mb.

test.tar.gz

@kjelljorner kjelljorner self-assigned this Jun 18, 2023
@kjelljorner kjelljorner linked a pull request Jun 18, 2023 that will close this issue
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 a pull request may close this issue.

2 participants