Giter Site home page Giter Site logo

aiidateam / aiida-wannier90-workflows Goto Github PK

View Code? Open in Web Editor NEW
15.0 8.0 15.0 4.68 MB

A collection of advanced automated workflows to compute Wannier functions using AiiDA and the Wannier90 code

Home Page: http://aiida-wannier90-workflows.readthedocs.io/

License: Other

Python 100.00%

aiida-wannier90-workflows's Introduction

aiida-wannier90-workflows

Latest release PyPI version PyPI pyversions
Getting help Docs status Google Group
Build status Build Status Coverage Status
Activity PyPI-downloads Commit Activity

Advanced AiiDA workflows for automated Wannierisation.

The protocol for automating the construction of Wannier functions is discussed in the articles listed in the Support and citations.

Installation

  1. Install latest release by

    pip install aiida-wannier90-workflows
  2. Or install the development version by

    git clone https://github.com/aiidateam/aiida-wannier90-workflows.git
    cd aiida-wannier90-workflows/
    pip install -e .

Examples

See the examples folder on how to use the workflows.

Support and citations

If you find this package useful, please cite the following articles

aiida-wannier90-workflows's People

Contributors

aiida-cla-bot[bot] avatar chrisjsewell avatar giovannipizzi avatar hongyi-zhao avatar jiang-yuha0 avatar mbercx avatar npaulish avatar qiaojunfeng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aiida-wannier90-workflows's Issues

Unable to install pip install -e . inside aiida work flow

Dear Sir/Madam,

Inside the aiida workflow, pip install -e . command gives an error message of " ERROR: Package 'aiida-wannier90-workflows' requires a different Python: 3.7.13 not in '>=3.8'. I am not able understand what is the problem and how to get rid of this error.

Looking forward to any kind suggestions.

Thanking you.

Warm regards
Saransha Mohanty

ModuleNotFoundError: No module named 'aiida_wannier90_workflows'

Hi, I installed this workflow using pip but when running got the following error (using python 3.8.6):

(aiida) ➜  aiida_calcs ./run_automated_wannier.py GaAs.xsf
Structure AsGa read and stored with pk 375.
Running with conduction bands for AsGa
Wannier90BandsWorkChain<384> will be added to the group scdm_workflow_withconduction_mlwf that already contains 4 nodes
launched Wannier90BandsWorkChain pk 384 for structure AsGa

# To get a detailed state of the workflow, run:
verdi process report 384
(aiida) ➜  aiida_calcs verdi process report 384
2021-01-08 07:40:09 [11 | ERROR]: Traceback (most recent call last):
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/aiida/engine/persistence.py", line 42, in load_object
    module = importlib.import_module(module)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'aiida_wannier90_workflows'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/aiida/manage/external/rmq.py", line 201, in _continue
    result = yield super()._continue(communicator, pid, nowait, tag)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/tornado/gen.py", line 1055, in run
    value = future.result()
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/tornado/concurrent.py", line 238, in result
    raise_exc_info(self._exc_info)
  File "<string>", line 4, in raise_exc_info
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/tornado/gen.py", line 307, in wrapper
    yielded = next(result)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/plumpy/process_comms.py", line 541, in _continue
    proc = saved_state.unbundle(self._load_context)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/plumpy/persistence.py", line 51, in unbundle
    return Savable.load(self, load_context)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/plumpy/persistence.py", line 438, in load
    load_cls = load_context.loader.load_object(class_name)
  File "/Users/zeeshan/miniconda3/envs/aiida/lib/python3.8/site-packages/aiida/engine/persistence.py", line 44, in load_object
    raise ImportError(f"module '{module}' from identifier '{identifier}' could not be loaded")
ImportError: module 'aiida_wannier90_workflows.workflows.bands' from identifier 'aiida_wannier90_workflows.workflows.bands:Wannier90BandsWorkChain' could not be loaded

Do not rely on kpoints validation from aiida-quantumespresso

The code below relies on the PwBaseWorkChain input validation to catch that either kpoints or kpoint_distance needs to be set:

try:
inputs.kpoints
except AttributeError:
# then kpoints_distance must exists, since this is ensured by inputs check of this workchain
from aiida_quantumespresso.workflows.functions.create_kpoints_from_distance import create_kpoints_from_distance
force_parity = inputs.get('kpoints_force_parity', orm.Bool(False))
kmesh = create_kpoints_from_distance(
self.ctx.current_structure, inputs.kpoints_distance,
force_parity
)

However (maybe since a recent release?) aiida-quantumespresso doesn't do that, instead the k-points are checked after the workchain has started, and an error code is returned if they are invalid.

This means that this workchain will except when both kpoints and kpoint_distance or not set, instead of giving a "well-behaved" error.

workchain for spin-orbit-coupling

Now the Wannier90BandsWorkChain in the opengrid branch supports spin-orbit-coupling (SOC) calculations.

Some prerequisites for using the workchain:

  1. The aiida-quantumespresso should contain at least commit aiidateam/aiida-quantumespresso@031b92b
  2. I couldn't find any "standard" pseudo for SOC case (let me know if you know better pseudos), so I am just using pslibrary, as specified in this json. This json is generated by this function, essentially it downloads UPF from QE website, then you can import those UPF by verdi data upf uploadfamily. If you want to use other pseudos, just modify the json file.

How to submit the workchain:
just add one line like this

'spin_orbit_coupling': orm.Bool(True)

Let me know if you have comments, suggestions!

How to get the hamiltonian

I would like to get the Hamiltonian of the output, does this package support such function? Can someone give me some instruction?

Very generic error message

Here, the error says cannot find Fermi energy:

if workchain0.process_class == PwBandsWorkChain:
fermi_energy = workchain0.outputs["scf_parameters"]["fermi_energy"]
else:
raise ValueError("Cannot find fermi energy")

In reality, it should say "The first parameter is not a PW Bands".
This will also help users debug (I had a user who swapped the two PKs and couldn't understand why)

consider renaming entry point prefix

The naming of entry points in

"aiida_wannier90_workflows.bands = aiida_wannier90_workflows.workflows.bands:Wannier90BandsWorkChain",
"aiida_wannier90_workflows.wannier90 = aiida_wannier90_workflows.workflows.wannier:Wannier90WorkChain"

is contrary to the convention used in other plugins.

Consider using wannier90_workflows instead of aiida_wannier90_workflows as a prefix.

E.g. this is the output of verdi plugin list on the Quantum Mobile:

verdi plugin list aiida.workflows
Registered entry points for aiida.workflows:
* aiida_wannier90_workflows.bands
* aiida_wannier90_workflows.wannier90
* castep.altrelax
* castep.base
* castep.relax
* codtools.cif_clean
* cp2k.base
* cp2k.multistage
* ddec.cp2k_ddec
* fleur.band
* fleur.base
* fleur.base_relax
* fleur.corehole
* fleur.create_magnetic
* fleur.dmi
* fleur.dos
* fleur.eos
* fleur.init_cls
* fleur.mae
* fleur.mae_conv
* fleur.relax
* fleur.scf
* fleur.ssdisp
* fleur.ssdisp_conv
* optimize.optimize
* optimize.wrappers.add_inputs
* optimize.wrappers.create_evaluate
* quantumespresso.matdyn.base
* quantumespresso.ph.base
* quantumespresso.pw.band_structure
* quantumespresso.pw.bands
* quantumespresso.pw.base
* quantumespresso.pw.relax
* quantumespresso.q2r.base
* raspa.base
* siesta.bands
* siesta.base
* siesta.stm
* vasp.base
* vasp.legacy.autowindows
* vasp.legacy.nscf
* vasp.legacy.projections
* vasp.legacy.scf
* vasp.legacy.wannier
* vasp.legacy.windows
* vasp.relax
* wannier90.minimal

Add full support for PseudoDojo 0.5

We had partial support for PseudoDojo/0.5/PBE/SR/standard/upf and PseudoDojo/0.5/PBE/SR/stringent/upf in #34, would be great if those two jsons can be extended to cover all pseudos in the future.

Provide support for PseudoDojo v0.5 (standard+stringent)

The get_pseudo_orbitals() method:

def get_pseudo_orbitals(pseudos: ty.Mapping[str, PseudoPotentialData]) -> dict:
"""Get the pseudo wavefunctions contained in the pseudopotential.
Currently only support the following pseudopotentials installed by `aiida-pseudo`:
1. SSSP/1.1/PBE/efficiency
2. SSSP/1.1/PBEsol/efficiency
"""

Currently only provides support for PseudoDojo v0.4 "standard" pseudopotentials. It would be useful to extend support to v0.5 as well, both the "standard" and "stringent" protocol.

Questions about 'update_nscf_num_bands'

Hi all! I'm trying to understand the details of the update_nscf_num_bands function here.

My understanding (based mostly on what I've been doing so far, could be wrong) is that its purpose is to extend the number of bands to cover all projections used by Wannier90. To make an example:

  • silicon has configuration 3s2 3p2
  • if we were to use only p projections in Wannier90, there would be 2 occupied and 4 unoccupied bands
  • if we use this pseudopotential with z_valence=4, we should use nbnd>=8 to cover all the valence states of the pseudo, as well as all the "unoccupied projections" for NSCF. In the SCF, we may get away with nbnd>=4 since unoccupied states don't contribute to density. (for both cases we may add some bands to make the "interesting" bands better converged)

However, the get_nprojs_from_upf function returns 4, where I would expect 8 (2s + 6p).

Even more confusing, for [this In pseudo]https://www.quantum-espresso.org/upf_files/In.rel-pbe-dn-kjpaw_psl.1.0.0.UPF), the result is 17 (I would expect 18). Am I misunderstanding the purpose of update_nscf_num_bands, or is there an edge case here that is not considered? I think this part of the PP_INFO may be relevant:

    Valence configuration:
    nl pn  l   occ       Rcut    Rcut US       E pseu
    5S  1  0  2.00      1.800      2.000    -0.594935
    5P  2  1  1.00      1.900      2.500    -0.194078
    5P  2  1  0.00      1.900      2.500    -0.172410
    4D  3  2  4.00      1.400      1.700    -1.394116
    4D  3  2  6.00      1.400      1.700    -1.330978
    Generation configuration:
    5S  1  0  2.00      1.800      2.000    -0.594932
    5S  1  0  0.00      1.800      2.000     3.000000
    5P  2  1  1.00      1.900      2.500    -0.194079
    5P  2  1  0.00      1.900      2.500    -0.172409
    5P  2  1  0.00      1.900      2.500     6.000000
    5P  2  1  0.00      1.900      2.500     6.000000
    4D  3  2  4.00      1.400      1.700    -1.394112
    4D  3  2  6.00      1.400      1.700    -1.330972
    4D  3  2  0.00      1.400      1.700     5.000000
    4D  3  2  0.00      1.400      1.700     5.000000

As a final question, what is the purpose of update_nscf_num_bands in the context of using the SCDM method? What is the logic behind how many unoccupied bands are needed then?

No load_profile in example run_automated_wannier.py

The example run_automated_wannier.py does not have a load_profile and gives the error with current aiida version.
aiida.common.exceptions.ConfigurationError: Could not determine the current profile. Consider loading a profile using aiida.load_profile().

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.