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

Development: Support QuantumESPRESSO v7.2 #32

Merged
merged 13 commits into from
May 4, 2023
Merged

Conversation

bastonero
Copy link
Collaborator

@bastonero bastonero commented Dec 2, 2022

The QuantumESPRESSO binaries used in this plugin (pw.x and hp.x) changed the IO interface in the new v7.1 release. The main improvement is provided by the introduction of the HubbardStructureData in the aiida-quantumespresso, which allows for an easy handling of the Hubbard parameters along with the structure information.

We want to provide full support for the new version, and release robust workflows.

Here a to do list for the merge:

  • Adapt HpCalculation and HpParser (requires review and tests)
  • Adapt `SelfConsistentHubbardWorkChain (requires review and tests)
  • Introduce the get_builder_from_protocol method - implemented, need discussion
  • Fix the parallelization over intersites parameters (partially solve, requires testing)
  • Write bomb tests and benchmarks using new aiida-core features (e.g. using the LiCoO, 4 atoms)

Discussion:

  • Topic protocols: shall we introduce the qpoints_distance in the HpBaseWorkChain? How to do it, since the structure could be absent? Maybe we can introduce it only for the HpMainWorkChain, which is handling the parallelization (meaning the hubbard_structure should be specified)?
  • Topic workflows: how to handle different walltimes, e.g. when only performing an hp.x initialization for parallelizing over atoms?

@bastonero bastonero changed the title Development: Support QuantumESPRESSO v7.1 Development: Support QuantumESPRESSO v7.2 Apr 4, 2023
@sphuber
Copy link
Contributor

sphuber commented Apr 28, 2023

@bastonero aiida-quantumespresso==4.3.0 is now released. Could you please clean up the branch, either squashing all commits into one, or create separate clean commits if that makes sense. Then the tests should rerun again and I can give this a review.

The calcfunction for relabelling the structure
data is adapted to keep track of the initial starting
magnetization and to relabel each chemical symbol
starting from 0. Capital letters are used when the
number is greater than 9.
Update the reorder function using the `HubbardUtils`
of aiida-quantumespresso.
The following changes are applied:
* New validation functions are added to support different case scenario
* The `HUBBARD.dat` file is now retrieved temporarely
* The `structure` input is replaced by `hubbard_structure`
* New exit code is added if the parsing failure of `HUBBARD.dat`
* Symlinking of `parent_scf` is added
* Other adaptations for post-processing options
The following changes are applied:
* Split the parse of stdout in a separate file
* Adapt the logic for parsing U and U+V cases
* Add  `HUBBARD.dat` parsing function
* Adapt logic for different post-processings, i.e. when parallelizing over
   atom or q points
* Add out of walltime exit message
Update dependencies, authors and entry points.
Update the conftest.py with useful fixtures,
and add pseudo potentials fixtures for future
protocols.
Add the following methods:
* `set_tot_magnetization`: useful for setting the
   total magnetization to an integer value, otherwise
   QE will complain
* `is_perturb_only_atom`: used to detect the "perturb_only_atom"
   key in the hp.parameters (used in different validations)
The following changes are applied:
* Introduce the `clean_workdir` input
* Introduce automatic setting of `max_seconds`
* Add the `get_builder_from_protocol` method
A work chain for parallelizing over q points on single
perturbed atom is introduced. The parallelization is simple
and it launches an `HpBaseWorkChain` for each
single independent q point that it finds.

This implementation works starting from Quantum ESPRESSO v7.2.
The following changes have been applied:
* Inspect methods are added to the outline to check
   status of completed sub processes
* Possibility of parallelizing over q points
* `clean_workdir` input is added
The following changes are applied:
* Introduction of `clean_workdir` input
* Introduction of `parallelize_qpoints` input
* The `qpoints_distance` input, along method in the outline
   is added in order to automatically assign the q point grid
   given a distance between points in reciprocal space
* The `get_builder_from_protocol` is added to fill automatically
   a builder ready to submit
The following changes are applied:
* Inputs adapted for handling both onsite and intersite
  cases (U and U+V)
* New inputs for skipping the first relaxation and for
   controlling the frequency of the call to the relax workflow
* Validation for magnetic inputs
* Outline change: always perform an scf with smearing,
   than recognize if it is a metal or insultaor; if insulator,
   than do scf with fixed occupation.
* The check on convergence over Hubbard parameters
   is performed separately on onsite (U) and intersite (V).
* Protocols through the `get_builder_from_protocol`
* `clean_workdir` input
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Thanks a lot @bastonero for all of this work! I have given most of the changes a look and it looks very reasonable. Since the changes are quite substantial and the original code was anyway very alpha, I propose we merge this as is, unless @mbercx still wants to have a look.

@mbercx
Copy link
Member

mbercx commented May 4, 2023

unless @mbercx still wants to have a look.

I'm sure it's great work. 😉 Also I won't have time for a proper code review anytime soon, so feel free to go ahead! Let's keep testing it in the field and see what we can improve (if anything).

@sphuber sphuber merged commit 39682ba into master May 4, 2023
@sphuber
Copy link
Contributor

sphuber commented May 4, 2023

Bombs away!

@sphuber sphuber deleted the new/scfhubbard-7.1 branch May 4, 2023 07:47
@bastonero
Copy link
Collaborator Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants