Skip to content

Commit

Permalink
Updated eos WF to be able to start from kpts.xml ... in current dir.
Browse files Browse the repository at this point in the history
  • Loading branch information
d-wortmann committed Apr 16, 2024
1 parent ee54ba3 commit 353e5f9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions aiida_fleur/cmdline/util/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ def convert(self, value, param, ctx):
# aiida allows also for shorten uuids
from aiida.orm import StructureData, QueryBuilder

if value == "inp.xml":
if value in ["inp.xml",".",'./']:
from aiida_fleur.data.fleurinp import FleurinpData
finp = FleurinpData(files=[value])
inp_files=["inp.xml"]
#check if there are included files in this dir
for file in ["kpts.xml","sym.xml","relax.xml"]:
import os.path
if os.path.isfile(file):
inp_files.append(file)
finp = FleurinpData(files=inp_files)
return finp.store()

try:
Expand Down
8 changes: 4 additions & 4 deletions aiida_fleur/workflows/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FleurEosWorkChain(WorkChain):
about general succeed, fit results and so on.
"""

_workflowversion = '0.5.1'
_workflowversion = '0.6.0'

_default_wf_para = {'points': 9, 'step': 0.005, 'guess': 1.00, 'enforce_same_para': True}
_default_options = FleurScfWorkChain._default_options
Expand Down Expand Up @@ -359,7 +359,7 @@ def return_results(self):
bulk_deriv = None

if "fleurinp" in self.inputs:
uuid=self.inputs.fleurinp.uuid
uuid=self.inputs.fleurinp.get_structuredata().uuid
else:
uuid=self.inputs.structure.uuid

Expand Down Expand Up @@ -452,9 +452,9 @@ def inpxml_structures(self,scalelist):
for scale in scalelist:
fm=FleurinpModifier(self.inputs.fleurinp)
if 'bulkLattice' in input_dict["cell"]:
fm.add_number_to_attrib("scale",scale,contains="bulkLattice",mode='rel') #rel means multiplaction here
fm.add_number_to_first_attrib("scale",scale,contains="/fleurInput/cell/bulkLattice/@scale",mode='rel') #rel means multiplaction here
if 'filmLattice' in input_dict["cell"]:
fm.set_attrib_value("scale",scale,contains="filmLattice",mode='rel')
fm.add_number_to_first_attrib("scale",scale,contains="/fleurInput/cell/filmLattice/@scale",not_contains="/a",mode='rel')
re_structures[scale]=fm.freeze()

# in AiiDA link labels are always strings, because of namespaces '.' are not allowed.
Expand Down

0 comments on commit 353e5f9

Please sign in to comment.