From 3ad832d0b9c3f2c209474c5ec3c2d46203dac874 Mon Sep 17 00:00:00 2001 From: JosePizarro3 Date: Thu, 10 Oct 2024 10:40:34 +0200 Subject: [PATCH] New workflow schema --- pyproject.toml | 4 ++-- src/nomad_parser_wannier90/parsers/parser.py | 1 + src/nomad_parser_wannier90/parsers/utils/utils.py | 11 ++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7b5fce9..603277b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,8 +26,8 @@ maintainers = [ ] license = { file = "LICENSE" } dependencies = [ - "nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git@ea0e5cbc632a514ea4d7e0bca1fab105d452f94c", - "nomad-simulations@git+https://github.com/nomad-coe/nomad-simulations.git@6a7668bcda0c074f8696eddccf326973acff41ac", + "nomad-lab@git+https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git@6b7149a71b2999abbb2225fcb67a5acafc811806", + "nomad-simulations@git+https://github.com/nomad-coe/nomad-simulations.git@0732ea7c9d4c5afcc8b01e3dbfd9235cfc7ffe4c", ] [project.urls] diff --git a/src/nomad_parser_wannier90/parsers/parser.py b/src/nomad_parser_wannier90/parsers/parser.py index d905033..eb8bbb5 100644 --- a/src/nomad_parser_wannier90/parsers/parser.py +++ b/src/nomad_parser_wannier90/parsers/parser.py @@ -574,6 +574,7 @@ def parse( dft_plus_tb_archive = self._child_archives.get( 'DFTPlusTB_workflow' ) + print(dft_archive, self.archive) dft_plus_tb = parse_dft_plus_tb_workflow( dft_archive=dft_archive, tb_archive=self.archive ) diff --git a/src/nomad_parser_wannier90/parsers/utils/utils.py b/src/nomad_parser_wannier90/parsers/utils/utils.py index 70b216e..0c37879 100644 --- a/src/nomad_parser_wannier90/parsers/utils/utils.py +++ b/src/nomad_parser_wannier90/parsers/utils/utils.py @@ -6,7 +6,7 @@ import os from glob import glob -from nomad.datamodel.metainfo.workflow import TaskReference +from nomad.datamodel.metainfo.workflow_new import TaskReference from nomad_simulations.schema_packages.workflow import DFTPlusTB @@ -57,6 +57,7 @@ def parse_dft_plus_tb_workflow( if not dft_archive.workflow2 or not tb_archive.workflow2: return + print(dft_archive.workflow2, tb_archive.workflow2) dft_task = dft_archive.workflow2 tb_task = tb_archive.workflow2 @@ -66,9 +67,9 @@ def parse_dft_plus_tb_workflow( ] # Check if main input and output of the `DFTPlusTB` workflow exist - if not dft_task.m_xpath('inputs[0]') or not tb_task.m_xpath('outputs[-1]'): - return dft_plus_tb - dft_plus_tb.inputs = [dft_task.inputs[0]] - dft_plus_tb.outputs = [tb_task.outputs[-1]] + # if not dft_task.m_xpath('inputs[0]') or not tb_task.m_xpath('outputs[-1]'): + # return dft_plus_tb + # dft_plus_tb.inputs = [dft_task.inputs[0]] + # dft_plus_tb.outputs = [tb_task.outputs[-1]] return dft_plus_tb