Commit f3c7a327 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Updated phonopy processing so that the smaller subsystem is used as...

Updated phonopy processing so that the smaller subsystem is used as representative one and that calculation references are specified relative to the upload root.
parent 7645b295
Pipeline #74315 failed with stages
in 36 minutes and 29 seconds
Subproject commit 09bc61058470381a9d590e70cf9ee0c76fb120f2
Subproject commit 1ab5a1eee99b58451b9d818d1b0704b0005dc5c9
......@@ -141,6 +141,18 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
'chose "representative" system for normalization',
# If the found system is referencing a subsystem, then we choose it as
# the representative one. These smaller subsystems are much easier to
# analyze. Currently used in phonon calculations.
if system is not None:
system_ref = system.section_system_to_system_refs[0]
ref_kind = system_ref.system_to_system_kind
if ref_kind == "subsystem":
system = system_ref.system_to_system_ref
except Exception:
if scc is not None:
self.section_run.m_cache["representative_scc_idx"] = scc.m_parent_index
if system is not None:
......@@ -417,8 +417,7 @@ class Calc(Proc):
# an absolute path which needs to be converted into a path that is
# relative to upload root.
scc = backend.entry_archive.section_run[0].section_single_configuration_calculation[0]
ref = scc.section_calculation_to_calculation_refs[0].calculation_to_calculation_external_url
relative_ref = ref.split("/", 6)[-1]
relative_ref = scc.section_calculation_to_calculation_refs[0].calculation_to_calculation_external_url
ref_id = upload_files.calc_id(relative_ref)
with upload_files.read_archive(ref_id) as archive:
arch = query_archive(archive, {ref_id: ref_id})[ref_id]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment