Skip to content

Commit

Permalink
Merge branch 'main' into ph-initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
bastonero authored Jan 13, 2025
2 parents c73a9dd + 5d911e4 commit eb539eb
Show file tree
Hide file tree
Showing 13 changed files with 4,027 additions and 58 deletions.
25 changes: 25 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
## v4.7.0

### ✨ New features

* Add `nbands_factor` logic into PdosWorkChain [[1020b02](https://github.com/aiidateam/aiida-quantumespresso/commit/1020b02c76bd3ae9783087bdf5f796380a7fdf3b)]
*`PwParser`: Add the XML schema for Quantum ESPRESSO v7.3.1 [[57e7463](https://github.com/aiidateam/aiida-quantumespresso/commit/57e7463c5727775d6a0470a41d1aca0ec4083b9a)]
* `XspectraCrystalWorkChain`: Enable Symmetry Data Inputs [[b79189d](https://github.com/aiidateam/aiida-quantumespresso/commit/b79189d7ce4756e846ab39c567ba4681474741ed)]
* Add calcjob, parser and base workchain plugin for `bands.x` [[651fd01](https://github.com/aiidateam/aiida-quantumespresso/commit/651fd0142a965ca1b03cc52f0f2f8d960936a1cd)]

### 👌 Improvements

* `PpCalculation`: Make parsing of output files optional [[bc0d815](https://github.com/aiidateam/aiida-quantumespresso/commit/bc0d8156f3f206b76e15f0f0c0742d8b579b4722)]

### 🐛 Bug fixes

* CLI: Fix bug in `aiida-quantumespresso workflow launc pw-base` [[ea76d9b](https://github.com/aiidateam/aiida-quantumespresso/commit/ea76d9b37f78315bbf93f93fa56460c7dfe0652a)]

### 📚 Documentation

* Docs: Fix build by pinning `sphinx-autoapi~=3.0.0` [[91c3e1d](https://github.com/aiidateam/aiida-quantumespresso/commit/91c3e1d35939491663a697d201dcccdf90c076c6)]

### ♻️ Refactor

* `get_xspectra_structures`: Refactor and Improve Code [[210c40b](https://github.com/aiidateam/aiida-quantumespresso/commit/210c40bbc3445f55155bbb855d320afa00fa347e)]

## v4.6.0

This minor release provides several improvements and bug fixes, mostly related to the `HubbardStructureData` and XPS/XAS calculations.
Expand Down
2 changes: 1 addition & 1 deletion src/aiida_quantumespresso/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# -*- coding: utf-8 -*-
"""The official AiiDA plugin for Quantum ESPRESSO."""
__version__ = '4.6.0'
__version__ = '4.7.0'
18 changes: 14 additions & 4 deletions src/aiida_quantumespresso/calculations/pp.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# -*- coding: utf-8 -*-
"""`CalcJob` implementation for the pp.x code of Quantum ESPRESSO."""
import os
import warnings

from aiida import orm
from aiida.common import datastructures, exceptions
from aiida.common.warnings import AiidaDeprecationWarning

from aiida_quantumespresso.calculations import _lowercase_dict, _uppercase_dict
from aiida_quantumespresso.utils.convert import convert_input_to_namelist_entry
Expand Down Expand Up @@ -82,7 +84,9 @@ def define(cls, spec):
spec.input('metadata.options.output_filename', valid_type=str, default=cls._DEFAULT_OUTPUT_FILE)
spec.input('metadata.options.parser_name', valid_type=str, default='quantumespresso.pp')
spec.input('metadata.options.withmpi', valid_type=bool, default=True)
spec.input('metadata.options.keep_plot_file', valid_type=bool, default=False)
spec.input('metadata.options.keep_plot_file', valid_type=bool, required=False)
spec.input('metadata.options.keep_data_files', valid_type=bool, default=False)
spec.input('metadata.options.parse_data_files', valid_type=bool, default=True)

spec.output('output_parameters', valid_type=orm.Dict)
spec.output('output_data', valid_type=orm.ArrayData)
Expand Down Expand Up @@ -218,10 +222,16 @@ def prepare_for_submission(self, folder): # pylint: disable=too-many-branches,t
# distinguish them from one another. The `fileout` filename will be the full data filename with the `fileout`
# value as a suffix.
retrieve_tuples = [self._FILEOUT, (f'{self._FILPLOT}_*{self._FILEOUT}', '.', 0)]

if self.inputs.metadata.options.keep_plot_file:
if 'keep_plot_file' in self.inputs.metadata.options:
self.inputs.metadata.options.keep_data_files = self.inputs.metadata.options.keep_plot_file
warnings.warn(
"The input parameter 'keep_plot_file' is deprecated and will be removed in version 5.0.0. "
"Please use 'keep_data_files' instead.", AiidaDeprecationWarning
)
if self.inputs.metadata.options.keep_data_files:
calcinfo.retrieve_list.extend(retrieve_tuples)
else:
# If we do not want to parse the retrieved files, temporary retrieval is meaningless
elif self.inputs.metadata.options.parse_data_files:
calcinfo.retrieve_temporary_list.extend(retrieve_tuples)

return calcinfo
4 changes: 3 additions & 1 deletion src/aiida_quantumespresso/parsers/parse_xml/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,9 @@ def parse_xml_post_6_2(xml):

num_k_points = band_structure['nks']
num_electrons = band_structure['nelec']
num_atomic_wfc = band_structure['num_of_atomic_wfc']

# In schema v240411 (QE v7.3.1), the `number_of_atomic_wfc` is moved to the `atomic_structure` tag as an attribute
num_atomic_wfc = band_structure.get('num_of_atomic_wfc', None) or outputs['atomic_structure']['@num_of_atomic_wfc']
num_bands = band_structure.get('nbnd', None)
num_bands_up = band_structure.get('nbnd_up', None)
num_bands_down = band_structure.get('nbnd_dw', None)
Expand Down
Loading

0 comments on commit eb539eb

Please sign in to comment.