Skip to content

Commit

Permalink
Update compat bound, and new psp format
Browse files Browse the repository at this point in the history
  • Loading branch information
Technici4n committed Dec 20, 2024
1 parent a607715 commit 9edbde2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/aiida_dftk/calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from pymatgen.core import units


_AIIDA_DFTK_VERSION_SPEC = "0.1.9"
_AIIDA_DFTK_VERSION_SPEC = "0.2.0"


class DftkCalculation(CalcJob):
Expand Down Expand Up @@ -156,16 +156,23 @@ def _generate_inputdata(

local_copy_pseudo_list = []

data = {'periodic_system': {}, 'model_kwargs': {}, 'basis_kwargs': {}, 'scf': {}, 'postscf': []}
data = {
'periodic_system': {},
'pseudopotentials': {},
'model_kwargs': {},
'basis_kwargs': {},
'scf': {},
'postscf': [],
}
data['periodic_system']['bounding_box'] = [[x * units.ang_to_bohr for x in vec] for vec in structure.cell]
data['periodic_system']['atoms'] = []
for site in structure.sites:
data['periodic_system']['atoms'].append({
'symbol': site.kind_name,
'position': [X * units.ang_to_bohr for X in list(site.position)],
'pseudopotential': f'{self._PSEUDO_SUBFOLDER}{pseudos[site.kind_name].filename}'
})
pseudo = pseudos[site.kind_name]
for symbol, pseudo in pseudos.items():
data['pseudopotentials'][symbol] = f'{self._PSEUDO_SUBFOLDER}{pseudo.filename}'
local_copy_pseudo_list.append((pseudo.uuid, pseudo.filename, f'{self._PSEUDO_SUBFOLDER}{pseudo.filename}'))
data['basis_kwargs']['kgrid'], data['basis_kwargs']['kshift'] = kpoints.get_kpoints_mesh()

Expand Down

0 comments on commit 9edbde2

Please sign in to comment.