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

Parser for waves.sxb files from SPHInX #1224

Merged
merged 38 commits into from
Jan 25, 2024
Merged

Conversation

skatnagallu
Copy link
Contributor

Adding a parser for wavefunction files generated by SPHInX

@samwaseda samwaseda added enhancement New feature or request format_black reformat the code using the black standard labels Nov 29, 2023
@skatnagallu skatnagallu self-assigned this Nov 29, 2023
@skatnagallu skatnagallu changed the title Parser for waves.sxb files from Sphimnx Parser for waves.sxb files from SPHInX Nov 29, 2023
Copy link
Member

@samwaseda samwaseda left a comment

Choose a reason for hiding this comment

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

Is there a particular reason that the class should not require a file when created? I think it's easier to force the user to set it and remove _check_loaded

pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
skatnagallu and others added 2 commits November 29, 2023 09:31
Co-authored-by: Sam Dareska <37879103+samwaseda@users.noreply.github.com>
@skatnagallu
Copy link
Contributor Author

Is there a particular reason that the class should not require a file when created? I think it's easier to force the user to set it and remove _check_loaded

I made changes according to your comment. Have a look.

removed netCDF4 import

Co-authored-by: Marvin Poul <poul@mpie.de>
pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
pyiron_atomistics/sphinx/output_parser.py Outdated Show resolved Hide resolved
skatnagallu and others added 2 commits December 7, 2023 14:40
reordered get_psi_rec()

Co-authored-by: freyso <63301887+freyso@users.noreply.github.com>
@skatnagallu
Copy link
Contributor Author

I want to add tests for this.

@skatnagallu
Copy link
Contributor Author

Added a test for SphinxWavesReader class. I created a 'fake.sxb' which is a fake wavefunction file. As the real wavefunction files even for small molecule and a single k point was already around 50 mb.

@niklassiemer
Copy link
Member

Couldn't you get a 'real' wavefunction for a single k point and (well I am not sure how sphinx does it - pure plane waves?) a very low energy cutoff? However, if the fake file has the same structure it should also be fine.

@freyso
Copy link
Contributor

freyso commented Dec 15, 2023

an Al bulk cell (primitive fcc, 1 atom) with a single k should do.

@skatnagallu
Copy link
Contributor Author

I have added now a proper waves.sxb file and the tests work. I would suggest that we merge this into the main for now. I will be going on vacation now, and the wavefunction reader would be useful to others.

@skatnagallu
Copy link
Contributor Author

Can I merge this?

@jan-janssen jan-janssen added format_black reformat the code using the black standard and removed format_black reformat the code using the black standard labels Jan 23, 2024
@jan-janssen
Copy link
Member

======================================================================
FAIL: test_waves (sphinx.test_parsers.TestSphinx)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/pyiron_atomistics/pyiron_atomistics/tests/sphinx/test_parsers.py", line 47, in test_waves
    self.assertTrue(np.mean(waves.get_psi_rec(0,0,0))>0)
AssertionError: False is not true

----------------------------------------------------------------------

@skatnagallu skatnagallu merged commit 8078bb4 into main Jan 25, 2024
21 of 24 checks passed
@skatnagallu skatnagallu deleted the spx_output_parser_wavefunction branch January 25, 2024 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request format_black reformat the code using the black standard
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants