Skip to content

Parsing fixes for ORCA xTB (Fixes #43) - #44

Closed
avcopan wants to merge 2 commits into
atomsforhumanity:masterfrom
avcopan:drop-natoms-fixed
Closed

Parsing fixes for ORCA xTB (Fixes #43)#44
avcopan wants to merge 2 commits into
atomsforhumanity:masterfrom
avcopan:drop-natoms-fixed

Conversation

@avcopan

@avcopan avcopan commented May 25, 2026

Copy link
Copy Markdown
Contributor

@coltonbh @TroyNSmith This fixes the broken tests from PR #43.

The reason for dropping the natoms parser is that the number of atoms line is not always printed, for example when running xTB through Orca.

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coltonbh If you get a chance, could you review and release this? For testing purposes, it is useful to run Orca with xTB as the method. However, the log file output shows some slight variations in this case, so this fixes those parsing issues. In particular, we dropped the natoms parser because the number of atoms appears to be completely absent from the log file (unless you take the very dicey approach of working out the number of atoms from the input file data that gets printed, but I would rather just take it out and have one less thing that could break.)

@coltonbh

coltonbh commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

Yes! Happy to release today. Will making the parser not required per my suggestion work? Then we keep the data for cases when we have it but don't raise exceptions when missing? @avcopan

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coltonbh I didn't see your suggestion. Did you post it on this thread? That would probably work -- how do we do that?

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

(Apologies if it is somewhere obvious and I missed it.)

@coltonbh

coltonbh commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator

The pending review above!

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

I don't think pending reviews show to other users. My understanding is that only you can see them.

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

From the GitHub documentation here:

image

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coltonbh Once you submit the review, I should be able to see it.

@coltonbh coltonbh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So sorry! Didn't submit!

return match.group(1)


@register(filetype=OrcaFileType.STDOUT, target="calcinfo_natoms")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe just make the parser optional instead?

@register(filetype=OrcaFileType.STDOUT, target="calcinfo_natoms", required=False)

This will preserve it when the the data exists but not raise an exception if not present :)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ideally we add a test for the xTB output logs and ensure no exception is raised. This then covers the case currently causing the error.

Thanks for this!

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@avcopan here!

@avcopan

avcopan commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

@coltonbh Sounds good! Will do!

@coltonbh

Copy link
Copy Markdown
Collaborator

@avcopan are we OK to close this given #44 ?

@avcopan

avcopan commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

@avcopan are we OK to close this given #44 ?

@coltonbh Yes!

@coltonbh coltonbh closed this Jun 10, 2026
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.

3 participants