Skip to content
Snippets Groups Projects
Commit f371b80c authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Added a bunch of method related processing.

parent 6abd956d
No related branches found
No related tags found
4 merge requests!115V0.8.0 beta,!113V0.8.0,!103Merging Encyclopedia functionality with v0.8.0,!102First version of EncyclopediaNormalizer
......@@ -243,6 +243,12 @@ class Calculation(MSection):
Version of the code used for the calculation.
"""
)
functional_long_name = Quantity(
type=str,
description="""
Full identified for the used exchange-correlation functional.
"""
)
lattice_parameters = Quantity(
type=np.dtype('f8'),
shape=[6],
......@@ -307,6 +313,18 @@ class Calculation(MSection):
Defines the type of run identified for this entry.
"""
)
smearing_kind = Quantity(
type=MEnum("gaussian", "fermi", "marzari-vanderbilt", "methfessel-paxton", "tetrahedra"),
description="""
Smearing function used for the electronic structure calculation.
"""
)
smearing_parameter = Quantity(
type=float,
description="""
Parameter for smearing, usually the width.
"""
)
class Encyclopedia(MSection):
......
This diff is collapsed.
......@@ -19,10 +19,12 @@ from nomad.parsing import AbstractParserBackend
from nomad.utils import get_logger
s_system = 'section_system'
s_method = 'section_method'
s_scc = 'section_single_configuration_calculation'
s_frame_sequence = 'section_frame_sequence'
s_sampling_method = "section_sampling_method"
r_scc_to_system = 'single_configuration_calculation_to_system_ref'
r_scc_to_method = 'single_configuration_to_calculation_method_ref'
r_frame_sequence_local_frames = 'frame_sequence_local_frames_ref'
r_frame_sequence_to_sampling = "frame_sequence_to_sampling_ref"
......@@ -96,6 +98,7 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
entry. The selection depends on the type of calculation.
"""
system_idx = None
scc_idx = None
# Try to find a frame sequence, only first found is considered
try:
......@@ -118,7 +121,8 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
if len(frame_seqs) == 0:
try:
sccs = self._backend[s_scc]
scc = sccs[-1]
scc_idx = -1
scc = sccs[scc_idx]
system_idx = scc["single_configuration_calculation_to_system_ref"]
except Exception:
sccs = []
......@@ -138,6 +142,8 @@ class SystemBasedNormalizer(Normalizer, metaclass=ABCMeta):
'chose "representative" system for normalization',
)
self._backend.add_tmp_value("section_run", "representative_scc_idx", scc_idx)
self._backend.add_tmp_value("section_run", "representative_system_idx", system_idx)
return system_idx
def __normalize_system(self, g_index, representative, logger=None) -> bool:
......
......@@ -182,7 +182,7 @@ def test_2d_material_identification():
)]
space_group_number = 191
norm_hash_string = structure.get_symmetry_string(space_group_number, wyckoff_sets)
graphene_material_hash = hash(norm_hash_string, length=128)
graphene_material_hash = hash(norm_hash_string)
# Graphene orthogonal cell
graphene = Atoms(
......@@ -274,7 +274,7 @@ def test_2d_material_identification():
]
space_group_number = 11
norm_hash_string = structure.get_symmetry_string(space_group_number, wyckoff_sets)
mos2_material_hash = hash(norm_hash_string, length=128)
mos2_material_hash = hash(norm_hash_string)
# MoS2 orthogonal cell
atoms = Atoms(
......@@ -437,3 +437,4 @@ def test_method_metainfo(single_point):
assert enc.calculation.code_name == "FHI-aims"
assert enc.calculation.code_version == "010314"
assert enc.calculation.mainfile_uri == "nmd://Rtest_upload_id/data/test/mainfile.txt"
assert enc.calculation.functional_long_name == "GGA_C_PBE+GGA_X_PBE"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment