Readd aims magnetism test
Summary
The aims magnetism test should now work.
Checklist
Before a pull request can be merged, the following items must be checked:
- [x] Code is in the standard Python style.
The easiest way to handle this is to run the following in the correct sequence on
your local machine. Start with running
ruffandruff formaton your new code. This will automatically reformat your code to PEP8 conventions and fix many linting issues. - [x] Doc strings have been added in the Numpy docstring format. Run ruff on your code.
- [x] Type annotations are highly encouraged. Run mypy to type check your code.
- [x] 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. It is highly
recommended that you use the pre-commit hook provided in the repository. Simply run
pre-commit install and a check will be run prior to allowing commits.
This can merge in once the pymatgen update is possible
Yeah. Should hopefully be possible soon. OpenMM tests behave weird again. Will try to fix them and then see....
No rush, I was just checking to see if that was the fail point on here since the test pass locally.
@tpurcell90 I'm seeing that some of the magnetic moments are None when running the AIMS magnetism test - any ideas if this is an issue on pymatgen's side for the AIMS input set?
Let me check what is going on here later today
This looks to be on the pymatgen side. I will fix this once: https://github.com/materialsproject/pymatgen/pull/4260 gets merged in
Great thanks!
This should now work if the latest pymatgen and pymatgen-io-aims are installed. Should I add the new aims extra to strict as well?
Good question - given the precedent with abinit and amset, I don't think you need to put them in strict unless there's a conflict with the most recent version of another package like pymatgen
At this point I think it works with the master version of pymatgen with the aims plug in locally, so I can confirm once that is pip accessible
Great thanks! I'll bump the pymatgen dependence once it's released and merge if all the tests pass
@tpurcell90 : after the latest pymatgen release + migrating an import to pyfhiaims, some of the tests are failing. Locally, I see:
FAILED tests/aims/test_makers/test_gw.py::test_gw_maker_molecule - assert -4092.12667244759 == -4092.0702534 ± 0.00409207 FAILED tests/aims/test_flows/test_elastic.py::test_elastic[False] - AssertionError: FAILED tests/aims/test_flows/test_elastic.py::test_elastic[True] - AssertionError: FAILED tests/aims/test_flows/test_anharmonic_quantification.py::test_site_resolved_anharmonic_quantification - AssertionError: assert ('a', 0.076) in [('a', 13.668), ('b', 5.813)] FAILED tests/aims/test_flows/test_anharmonic_quantification.py::test_element_resolved_anharmonic_quantification - AssertionError: assert ('Na', 0.076) in [('Na', 13.668), ('Cl', 5.813)]
Any idea about how best to fix these?
I'll fix these either later today or tomorrow and update you. Thanks for the heads up on it!
All of the tests pass on my machine will check here as well
FAILED tests/aims/test_flows/test_anharmonic_quantification.py::test_site_resolved_anharmonic_quantification - AssertionError: assert ('a', 0.076) in [('a', 13.668), ('b', 5.813)]
FAILED tests/aims/test_flows/test_anharmonic_quantification.py::test_element_resolved_anharmonic_quantification - AssertionError: assert ('Na', 0.076) in [('Na', 13.668), ('Cl', 5.813)]
This is likely a mapping issue what is your environment?
They seem to be failing because of this conflict
╰─▶ Because atomate2==0.0.1 depends on pymatgen>=2024.11.13,<2025.10.7 and
What blocks the use of 2025.10.7?
What blocks the use of 2025.10.7?
You can and should unpin it here - I had to temporarily pin to ensure the CI tests were passing before this PR gets merged
@esoteric-ephemera Can you confirm that the anharmonicity quantification tests also pass for you locally?
If they don't would it be possible for you to send me the super cells you are getting so I can work out what the supercell mapping error is?
@tpurcell90 sorry I missed this! Tests look to be passing on my side and CI now, many thanks for your work on this!!