aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
52 stars 77 forks source link

`get_xspectra_structures`: Refactor and Improve Code #1026

Closed PNOGillespie closed 2 months ago

PNOGillespie commented 2 months ago

Overview

In this PR, we have re-factored various components of get_xspectra_structures as part of ongoing improvement work. These changes are the first of two improvements intended to enable users to set symmetry data manually instead of relying on automatic symmetry analysis - ultimately enabling the same feature for the XspectraCrystalWorkChain and any others which use the same structure preparation tools.

This PR will be followed by a second one in which the logic for the XSpectra WorkChains will be added in order to properly exploit the changes in this PR. The overall changes have been separated into 2 PRs due to the number of changes made here as part of the re-factoring process.

Changes

PNOGillespie commented 2 months ago

Hi @superstar54, Thanks for the feedback. I've added a simple test for manual symmetry data input and cleaned up a few things as you suggested doing in one of your comments.

I also added an example of how the equivalent_sites_data input needs to be formatted. Was that the part which was unclear in the docstring, or do you think there's more to do on that?

PNOGillespie commented 2 months ago

Hi @superstar54. I fixed the issue with the docstring by formatting the example to be in-line. I also added a sentence to better explain what needs to be in the equivalent_sites_data dictionary.

Let me know if anything else is needed.