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

Migrating code we don't want to merge with QE into a utilities folder #128

Merged
merged 42 commits into from
Mar 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
51cac68
Create utils folder containing merge_evc.x, epsilon.x, and wann2kcp.x…
elinscott Mar 4, 2022
6eaeb59
Removed erroneously included executables
elinscott Mar 4, 2022
7923a20
Updated koopmans makefile to compile the contents of quantum_espresso…
elinscott Mar 4, 2022
94473fb
utils Makefile: Added check for dependency on pw an pp libs
Mar 7, 2022
45b7cb2
wrong path to FFTXlibs in make.depend
nscolonna Mar 7, 2022
cfb7626
Remove unused variable here and there
Mar 7, 2022
f5dda83
Merge branch 'moving_wan2odd_out_of_qe7' of github.com:epfl-theos/koo…
Mar 7, 2022
3fbdf76
Merge branch 'master' into moving_wan2odd_out_of_qe7
degennar Mar 9, 2022
6669be8
adding latest modifications from qe_koopmans
degennar Mar 13, 2022
e281ad3
reorganizing utils dir and Makefile
degennar Mar 13, 2022
ee34c27
updating links to merge_evc and wann2kcp
degennar Mar 14, 2022
5092444
cleaning up wann2kcp from all pw2wannier90's stuff
degennar Mar 14, 2022
78eda37
Merge branch 'master' into moving_wan2odd_out_of_qe7
degennar Mar 14, 2022
12fe8e9
turning wannier2odd and ks2odd into wannier2kcp and ks2kcp
degennar Mar 14, 2022
bf1e010
creating wann2kcp classes
degennar Mar 14, 2022
4d10c40
Mock calculator for wann2kcp
degennar Mar 14, 2022
7b1c3b8
Merge branch 'master' into moving_wan2odd_out_of_qe7
degennar Mar 14, 2022
157b272
adding ase and qe_koopmans develop commits
degennar Mar 14, 2022
f6b9ea9
minor changes
degennar Mar 14, 2022
a2ffd9a
minor bug fix
degennar Mar 14, 2022
039cbf1
changing bin dirs and updating benchmark
degennar Mar 14, 2022
415f7fc
updating imports of ase.io.espresso
degennar Mar 15, 2022
98795ed
small bug fix in ase
degennar Mar 15, 2022
07d65ec
making merge_evc.x totally independent
degennar Mar 15, 2022
6dc8a2c
updating links to executables in utils
degennar Mar 15, 2022
4f00285
updating Makefile in utils
degennar Mar 15, 2022
40b2e2c
path to executables is now stored in the unique var bin_directory
degennar Mar 15, 2022
88a408f
minor changes in ase
degennar Mar 15, 2022
85e379f
Correct pw dependence in Makefile for utils
nscolonna Mar 16, 2022
3913c9d
Update Makefiles (the general one refer to espresso_7 now) and the on…
nscolonna Mar 16, 2022
897c269
Fix to avoid bug where we didn't know how many empty bands we had dur…
elinscott Mar 16, 2022
235d897
mypy compliance
elinscott Mar 16, 2022
11412a7
Make sure quantum_espresso/utils clean works even if qe_koopmans/make…
elinscott Mar 16, 2022
900649c
HUGE bug in find_mp_grid from pw2wannier90
degennar Mar 16, 2022
1ba9c7e
updating physical constants to be consistent with QE v7.0
degennar Mar 16, 2022
33fb0c1
aligning with updated ase and qe_koopmans
degennar Mar 16, 2022
6c8edaf
Updated benchmark
elinscott Mar 17, 2022
fceb796
Merge branch 'moving_wan2odd_out_of_qe7' of github.com:epfl-theos/koo…
elinscott Mar 17, 2022
0cfb347
Updated benchmark
elinscott Mar 17, 2022
19806f5
Sanity checks for projections
elinscott Mar 17, 2022
ad35063
pep8 compliance
elinscott Mar 17, 2022
52dd0c1
pep8 compliance
elinscott Mar 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# List of available tasks
.PHONY: help install submodules configure_4 configure_6 configure espresso_4 espresso_6 espresso workflow tests mock_tests clean clean_espresso clean_tests
.PHONY: help install submodules configure_4 configure_7 configure espresso_4 espresso_7 espresso_utils espresso workflow tests mock_tests clean clean_espresso clean_tests

MPIF90 = "mpif90"

Expand Down Expand Up @@ -37,18 +37,21 @@ submodules:
configure_4:
cd quantum_espresso/cp_koopmans; ./configure MPIF90=$(MPIF90);

configure_6:
configure_7:
cd quantum_espresso/qe_koopmans; ./configure MPIF90=$(MPIF90);

configure: configure_4 configure_6
configure: configure_4 configure_7

espresso_4:
@(cd quantum_espresso/cp_koopmans; $(MAKE) kcp)

espresso_6:
@(cd quantum_espresso/qe_koopmans; $(MAKE) kc)
espresso_7:
@(cd quantum_espresso/qe_koopmans; $(MAKE) kcw)

espresso: configure_4 espresso_4 configure_6 espresso_6
espresso_utils:
@(cd quantum_espresso/utils; $(MAKE) all)

espresso: configure_4 espresso_4 configure_7 espresso_7 espresso_utils

workflow:
python3 -m pip install --upgrade pip
Expand All @@ -59,6 +62,7 @@ clean: clean_espresso clean_tests
clean_espresso:
@(cd quantum_espresso/cp_koopmans; $(MAKE) veryclean)
@(cd quantum_espresso/qe_koopmans; $(MAKE) veryclean)
@(cd quantum_espresso/utils; $(MAKE) clean)

tests:
python3 -m pytest -m "standard" tests/
Expand Down
2 changes: 1 addition & 1 deletion bin/merge_evc.x
1 change: 1 addition & 0 deletions bin/wann2kcp.x
3 changes: 2 additions & 1 deletion koopmans/calculators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
from ._koopmans_screen import KoopmansScreenCalculator
from ._pw import PWCalculator
from ._pw2wannier import PW2WannierCalculator
from ._wann2kcp import Wann2KCPCalculator
from ._wannier90 import Wannier90Calculator
from ._wann2kc import Wann2KCCalculator
from ._ui import UnfoldAndInterpolateCalculator
from ._utils import CalculatorExt, qe_bin_directory, CalculatorCanEnforceSpinSym, ReturnsBandStructure
from ._utils import CalculatorExt, bin_directory, CalculatorCanEnforceSpinSym, ReturnsBandStructure
4 changes: 2 additions & 2 deletions koopmans/calculators/_koopmans_cp.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from ase.calculators.espresso import Espresso_kcp
from koopmans import utils, settings, pseudopotentials, bands
from koopmans.commands import ParallelCommand
from ._utils import CalculatorExt, CalculatorABC, kcp_bin_directory, CalculatorCanEnforceSpinSym
from ._utils import CalculatorExt, CalculatorABC, bin_directory, CalculatorCanEnforceSpinSym


def read_ham_file(filename: Path) -> np.ndarray:
Expand Down Expand Up @@ -69,7 +69,7 @@ def __init__(self, atoms: Atoms, skip_qc: bool = False, alphas: Optional[List[Li

if not isinstance(self.command, ParallelCommand):
self.command = ParallelCommand(os.environ.get(
'ASE_ESPRESSO_KCP_COMMAND', str(kcp_bin_directory) + os.path.sep + self.command))
'ASE_ESPRESSO_KCP_COMMAND', str(bin_directory) + os.path.sep + self.command))

if alphas is not None:
self.alphas = alphas
Expand Down
4 changes: 2 additions & 2 deletions koopmans/calculators/_koopmans_ham.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ase.calculators.espresso import KoopmansHam
from ase.dft.kpoints import BandPath
from koopmans import utils, settings
from ._utils import KCWannCalculator, CalculatorABC, qe_bin_directory, ReturnsBandStructure
from ._utils import KCWannCalculator, CalculatorABC, bin_directory, ReturnsBandStructure
from koopmans.commands import ParallelCommand


Expand All @@ -31,7 +31,7 @@ def __init__(self, atoms: Atoms, alphas: Optional[List[int]] = None, *args, **kw
KCWannCalculator.__init__(self, *args, **kwargs)

self.command = ParallelCommand(
f'{qe_bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')
f'{bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')

self.results_for_qc = ['ki_eigenvalues_on_grid', 'band structure']

Expand Down
4 changes: 2 additions & 2 deletions koopmans/calculators/_koopmans_screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ase import Atoms
from ase.calculators.espresso import KoopmansScreen
from koopmans import utils, settings
from ._utils import KCWannCalculator, CalculatorABC, qe_bin_directory
from ._utils import KCWannCalculator, CalculatorABC, bin_directory
from koopmans.commands import ParallelCommandWithPostfix


Expand All @@ -30,7 +30,7 @@ def __init__(self, atoms: Atoms, *args, **kwargs):
super().__init__(*args, **kwargs)

self.command = ParallelCommandWithPostfix(
f'{qe_bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')
f'{bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')

self.results_for_qc = ['alphas']

Expand Down
4 changes: 2 additions & 2 deletions koopmans/calculators/_pw.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from ase.calculators.espresso import Espresso
from ase.dft.kpoints import BandPath
from koopmans.settings import PWSettingsDict
from ._utils import CalculatorExt, CalculatorABC, qe_bin_directory, ReturnsBandStructure
from ._utils import CalculatorExt, CalculatorABC, bin_directory, ReturnsBandStructure
from koopmans.commands import ParallelCommandWithPostfix, Command


Expand All @@ -32,7 +32,7 @@ def __init__(self, atoms: Atoms, *args, **kwargs):
self.results_for_qc = ['energy']
if not isinstance(self.command, Command):
self.command = ParallelCommandWithPostfix(os.environ.get(
'ASE_ESPRESSO_COMMAND', str(qe_bin_directory) + os.path.sep + self.command))
'ASE_ESPRESSO_COMMAND', str(bin_directory) + os.path.sep + self.command))

self.results_for_qc = ['energy']

Expand Down
4 changes: 2 additions & 2 deletions koopmans/calculators/_pw2wannier.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ase.calculators.espresso import PW2Wannier
from koopmans.settings import PW2WannierSettingsDict
from koopmans.commands import ParallelCommand
from ._utils import CalculatorExt, CalculatorABC, qe_bin_directory
from ._utils import CalculatorExt, CalculatorABC, bin_directory


class PW2WannierCalculator(CalculatorExt, PW2Wannier, CalculatorABC):
Expand All @@ -27,7 +27,7 @@ def __init__(self, atoms: Atoms, *args, **kwargs):
CalculatorExt.__init__(self, *args, **kwargs)

self.command = ParallelCommand(os.environ.get('ASE_PW2WANNIER_COMMAND',
str(qe_bin_directory) + os.path.sep + self.command))
str(bin_directory) + os.path.sep + self.command))

def is_converged(self):
return True
Expand Down
4 changes: 1 addition & 3 deletions koopmans/calculators/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ class ExtendedCalc(CalculatorExt, ASECalc, CalculatorABC):
from koopmans import utils, settings

# Directories of the various QE calculators
qe_parent_directory = Path(__file__).parents[2] / 'quantum_espresso'
qe_bin_directory = qe_parent_directory / 'qe_koopmans/bin/'
kcp_bin_directory = qe_parent_directory / 'cp_koopmans/bin/'
degennar marked this conversation as resolved.
Show resolved Hide resolved
bin_directory = Path(__file__).parents[2] / 'bin'


def sanitise_filenames(filenames: Union[str, Path, List[str], List[Path]], ext_in: str, ext_out: str) -> List[Path]:
Expand Down
4 changes: 2 additions & 2 deletions koopmans/calculators/_wann2kc.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import os
from ase import Atoms
from ase.calculators.espresso import Wann2KC
from ._utils import KCWannCalculator, qe_bin_directory, CalculatorABC
from ._utils import KCWannCalculator, bin_directory, CalculatorABC
from koopmans.settings import Wann2KCSettingsDict
from koopmans.commands import ParallelCommandWithPostfix

Expand All @@ -28,7 +28,7 @@ def __init__(self, atoms: Atoms, *args, **kwargs):
KCWannCalculator.__init__(self, *args, **kwargs)

self.command = ParallelCommandWithPostfix(
f'{qe_bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')
f'{bin_directory}{os.path.sep}kcw.x -in PREFIX{self.ext_in} > PREFIX{self.ext_out}')

def is_converged(self):
return True
Expand Down
36 changes: 36 additions & 0 deletions koopmans/calculators/_wann2kcp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"""

wann2kcp calculator module for koopmans

Written by Riccardo De Gennaro Mar 2022

"""

import os
from ase import Atoms
from ase.calculators.espresso import Wann2KCP
from koopmans.settings import Wann2KCPSettingsDict
from koopmans.commands import ParallelCommand
from ._utils import CalculatorExt, CalculatorABC, bin_directory


class Wann2KCPCalculator(CalculatorExt, Wann2KCP, CalculatorABC):

ext_in = '.wki'
ext_out = '.wko'

def __init__(self, atoms: Atoms, *args, **kwargs):
self.parameters = Wann2KCPSettingsDict()

# Initialise first using the ASE parent and then CalculatorExt
Wann2KCP.__init__(self, atoms=atoms)
CalculatorExt.__init__(self, *args, **kwargs)

self.command = ParallelCommand(os.environ.get('ASE_WANN2KCP_COMMAND',
str(bin_directory) + os.path.sep + self.command))

def is_converged(self):
return True

def is_complete(self):
return self.results['job done']
4 changes: 2 additions & 2 deletions koopmans/calculators/_wannier90.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from koopmans.utils import warn
from koopmans.settings import Wannier90SettingsDict
from koopmans.commands import Command
from ._utils import CalculatorExt, CalculatorABC, qe_bin_directory
from ._utils import CalculatorExt, CalculatorABC, bin_directory


class Wannier90Calculator(CalculatorExt, Wannier90, CalculatorABC):
Expand All @@ -31,7 +31,7 @@ def __init__(self, atoms: Atoms, *args, **kwargs):

# Set up the command for running this calculator
self.command = Command(os.environ.get('ASE_WANNIER90_COMMAND',
str(qe_bin_directory) + os.path.sep + self.command))
str(bin_directory) + os.path.sep + self.command))

self.results_for_qc = ['centers', 'spreads']

Expand Down
16 changes: 9 additions & 7 deletions koopmans/io/_calculators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,28 @@
from typing import Union, List, Type
from pathlib import Path
from koopmans.calculators import KoopmansCPCalculator, PWCalculator, Wannier90Calculator, \
PW2WannierCalculator, UnfoldAndInterpolateCalculator, Wann2KCCalculator, KoopmansScreenCalculator, \
KoopmansHamCalculator
PW2WannierCalculator, Wann2KCPCalculator, UnfoldAndInterpolateCalculator, Wann2KCCalculator, \
KoopmansScreenCalculator, KoopmansHamCalculator


def read_calculator(filenames: Union[Path, List[Path]]) -> Union[KoopmansCPCalculator, PWCalculator,
Wannier90Calculator, PW2WannierCalculator,
UnfoldAndInterpolateCalculator,
Wann2KCPCalculator, UnfoldAndInterpolateCalculator,
Wann2KCCalculator, KoopmansScreenCalculator,
KoopmansHamCalculator]:

# Interpreting the filenames argument
if not isinstance(filenames, list):
filenames = [filenames]
valid_extensions = ['.cpi', '.cpo', '.pwi', '.pwo', '.win', '.wout', '.p2wi',
'.p2wo', '.uii', '.uio', '.w2ki', '.w2ko', '.ksi', '.kso', '.khi', '.kho']
valid_extensions = ['.cpi', '.cpo', '.pwi', '.pwo', '.win', '.wout', '.p2wi', '.p2wo',
'.wki', '.wko', '.uii', '.uio', '.w2ki', '.w2ko', '.ksi', '.kso', '.khi', '.kho']
if not all([f.is_file() for f in filenames]):
filenames = [Path(f) for prefix in filenames for f in glob(f'{prefix}.*') if Path(f).suffix in valid_extensions]
extensions = set([f.suffix for f in filenames])

calc_class: Union[Type[KoopmansCPCalculator], Type[PWCalculator], Type[Wannier90Calculator],
Type[PW2WannierCalculator], Type[UnfoldAndInterpolateCalculator], Type[Wann2KCCalculator],
Type[KoopmansScreenCalculator], Type[KoopmansHamCalculator]]
Type[PW2WannierCalculator], Type[Wann2KCPCalculator], Type[UnfoldAndInterpolateCalculator],
Type[Wann2KCCalculator], Type[KoopmansScreenCalculator], Type[KoopmansHamCalculator]]

if extensions.issubset(set(['.cpi', '.cpo'])):
calc_class = KoopmansCPCalculator
Expand All @@ -33,6 +33,8 @@ def read_calculator(filenames: Union[Path, List[Path]]) -> Union[KoopmansCPCalcu
calc_class = Wannier90Calculator
elif extensions.issubset(set(['.p2wi', '.p2wo'])):
calc_class = PW2WannierCalculator
elif extensions.issubset(set(['.wki', '.wko'])):
calc_class = Wann2KCPCalculator
elif extensions.issubset(set(['.uii', '.uio'])):
calc_class = UnfoldAndInterpolateCalculator
elif extensions.issubset(set(['.w2ki', '.w2ko'])):
Expand Down
2 changes: 2 additions & 0 deletions koopmans/settings/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ._koopmans_screen import KoopmansScreenSettingsDict
from ._pw import PWSettingsDict
from ._pw2wannier import PW2WannierSettingsDict
from ._wann2kcp import Wann2KCPSettingsDict
from ._ui import UnfoldAndInterpolateSettingsDict
from ._utils import Setting, SettingsDict, SettingsDictWithChecks
from ._wann2kc import Wann2KCSettingsDict
Expand All @@ -23,6 +24,7 @@
'kc_screen': KoopmansScreenSettingsDict(),
'pw': PWSettingsDict(),
'pw2wannier': PW2WannierSettingsDict(),
'wann2kcp': Wann2KCPSettingsDict(),
'ui': UnfoldAndInterpolateSettingsDict(),
'ui_occ': UnfoldAndInterpolateSettingsDict(),
'ui_emp': UnfoldAndInterpolateSettingsDict(),
Expand Down
4 changes: 2 additions & 2 deletions koopmans/settings/_koopmans_cp.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Dict, Any
from ase.io.espresso import koopmans_cp as kcp_io
from ase.io.espresso import kcp_keys
from pathlib import Path
from ._utils import SettingsDict

Expand Down Expand Up @@ -42,7 +42,7 @@ def __init__(self, **kwargs) -> None:
else:
flattened_kwargs[k] = v

super().__init__(valid=[k for sublist in kcp_io.KEYS.values() for k in sublist],
super().__init__(valid=[k for sublist in kcp_keys.values() for k in sublist],
defaults=defaults,
are_paths=['outdir', 'pseudo_dir'],
to_not_parse=['assume_isolated'],
Expand Down
4 changes: 2 additions & 2 deletions koopmans/settings/_koopmans_ham.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from typing import Any
from ase.dft.kpoints import BandPath
from ase.io.espresso import koopmans_ham as kch_io
from ase.io.espresso import kch_keys
from ._utils import SettingsDict, kc_wann_defaults


class KoopmansHamSettingsDict(SettingsDict):
def __init__(self, **kwargs) -> None:
super().__init__(valid=[k for block in kch_io.KEYS.values() for k in block],
super().__init__(valid=[k for block in kch_keys.values() for k in block],
defaults={'calculation': 'ham', 'do_bands': True, 'use_ws_distance': True, 'write_hr': True,
'l_alpha_corr': False, **kc_wann_defaults},
are_paths=['outdir', 'pseudo_dir'],
Expand Down
4 changes: 2 additions & 2 deletions koopmans/settings/_koopmans_screen.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from typing import Any
from ase.io.espresso import koopmans_screen as kcs_io
from ase.io.espresso import kcs_keys
from ._utils import SettingsDict, kc_wann_defaults


class KoopmansScreenSettingsDict(SettingsDict):
def __init__(self, **kwargs) -> None:
super().__init__(valid=[k for block in kcs_io.KEYS.values() for k in block],
super().__init__(valid=[k for block in kcs_keys.values() for k in block],
defaults={'calculation': 'screen', 'tr2': 1.0e-18, 'nmix': 4, 'niter': 33,
'check_spread': True, **kc_wann_defaults},
are_paths=['outdir', 'pseudo_dir'],
Expand Down
4 changes: 2 additions & 2 deletions koopmans/settings/_pw.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Any, Dict
from ase.io.espresso import pw as pw_io
from ase.io.espresso import pw_keys
from ase.dft.kpoints import BandPath
from ._utils import SettingsDict

Expand All @@ -14,7 +14,7 @@ def __init__(self, **kwargs) -> None:
else:
flattened_kwargs[k] = v

super().__init__(valid=[k for block in pw_io.KEYS.values() for k in block],
super().__init__(valid=[k for block in pw_keys.values() for k in block],
defaults={'calculation': 'scf', 'outdir': './TMP/', 'prefix': 'kc',
'conv_thr': '2.0e-9*nelec', 'verbosity': 'high'},
are_paths=['outdir', 'pseudo_dir'],
Expand Down
4 changes: 1 addition & 3 deletions koopmans/settings/_pw2wannier.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ class PW2WannierSettingsDict(SettingsDict):
def __init__(self, **kwargs) -> None:
super().__init__(valid=['outdir', 'prefix', 'seedname', 'write_mmn',
'write_amn', 'write_uHu', 'uHu_formatted',
'write_unk', 'reduce_unk', 'wan_mode', 'wannier_plot',
'wannier_plot_list', 'gamma_trick', 'spin_component',
'print_rho'],
'write_unk', 'reduce_unk', 'wan_mode', 'spin_component'],
defaults={'outdir': 'TMP', 'prefix': 'kc', 'seedname': 'wann',
'wan_mode': 'standalone'},
are_paths=['outdir'],
Expand Down
4 changes: 2 additions & 2 deletions koopmans/settings/_wann2kc.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import Dict, Any, List
from ase.io.espresso import wann2kc as w2k_io
from ase.io.espresso import w2kcw_keys
from ._utils import SettingsDict, kc_wann_defaults


Expand All @@ -14,7 +14,7 @@ def __init__(self, **kwargs) -> None:
else:
flattened_kwargs[k] = v

super().__init__(valid=[k for block in w2k_io.KEYS.values() for k in block],
super().__init__(valid=[k for block in w2kcw_keys.values() for k in block],
defaults={'calculation': 'wann2kcw', **kc_wann_defaults},
are_paths=['outdir', 'pseudo_dir'],
to_not_parse=['assume_isolated'],
Expand Down
Loading