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

Adding Abinit magmoms from netCDF files to Structure.site_properties #3936

Merged
merged 13 commits into from
Jul 26, 2024

Conversation

gbrunin
Copy link
Contributor

@gbrunin gbrunin commented Jul 18, 2024

Summary

In recent developments in Abinit, the variables intgden and ratsph have been added in the netCDF output files. These correspond to the computed integrated density around atoms and the integration radii. The former can be interpreted as the local magnetic moment on each atom. Since this is a useful quantity for, e.g., CHGNet model training, I have added them as site_properties of the Structure that is extracted from the netCDF file. If intgden is not found in the .nc file, nothing is added.

While testing with abipy, I also found that recent commits in io.abinit.pseudos were backward incompatible for PAW pseudopotentials. I reverted the changes and added a test.

Tagging @gmatteo to check this.

@gbrunin gbrunin changed the title Adding Abinit magmoms from netCDF files to Structure.site_properties [WIP] Adding Abinit magmoms from netCDF files to Structure.site_properties Jul 18, 2024
@gbrunin gbrunin changed the title [WIP] Adding Abinit magmoms from netCDF files to Structure.site_properties Adding Abinit magmoms from netCDF files to Structure.site_properties Jul 19, 2024
@gbrunin
Copy link
Contributor Author

gbrunin commented Jul 19, 2024

This is ready to be reviewed. I don't know why ruff is failing, I did not make changes in io.vasp, io.aims and analysis.

@gbrunin
Copy link
Contributor Author

gbrunin commented Jul 24, 2024

Hi @janosh, @shyuep, @mkhorton, whenever you have some time, this is ready to be reviewed. It would be great for us if these changes could be included in the next release, to facilitate developments in abipy (since this PR is fixing breaking changes). Thanks!

@gbrunin gbrunin requested a review from janosh July 26, 2024 06:58
Copy link
Member

Choose a reason for hiding this comment

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

wow, the GSR files compressed to much smaller than expected. can we compress this file as well? sorry, should have mentioned this file in the first review

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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.

thanks for this contribution @gbrunin! 👍

@janosh janosh merged commit 98c5788 into materialsproject:master Jul 26, 2024
33 checks passed
@janosh janosh added enhancement A new feature or improvement to an existing one io Input/output functionality labels Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A new feature or improvement to an existing one io Input/output functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants