Commit 567d9c8b authored by Mohamed, Fawzi Roberto (fawzi)'s avatar Mohamed, Fawzi Roberto (fawzi)
Browse files

meta 2.0 changes

parent 82e03a5b
Pipeline #42739 failed with stage
in 9 seconds
......@@ -77,6 +77,4 @@ class InputHandler(xml.sax.handler.ContentHandler):
def parseInput(inF, backend):
handler = InputHandler(backend)
logging.error("will parse")
xml.sax.parse(inF, handler)
logging.error("did parse")
......@@ -97,7 +97,7 @@ def buildStructureMatchers():
sections = ["section_run", "section_system"],
subMatchers = [
SM(name = 'systemName',
startReStr = r"(?P<x_elastic_wien2k_system_nameIn>.*)"),
startReStr = r"(?P<x_elastic_wien2k_system_namein>.*)"),
SM(r"\w+\s*LATTICE,NONEQUIV\.ATOMS.\s*(?P<x_elastic_wien2k_nonequiv_atoms>[0-9]+)"),
SM(r"(?P<x_elastic_wien2k_calc_mode>.*)"),
# SM(r"\s*(?P<x_wien2k_unit_cell_param_a>[-+0-9.eEdD]+)\s*(?P<x_wien2k_unit_cell_param_b>[-+0-9.eEdD]+)\s*(?P<x_wien2k_unit_cell_param_c>[-+0-9.eEdD]+)\s*(?P<x_wien2k_angle_between_unit_axis_alfa>[-+0-9.eEdD]{9})\s*(?P<x_wien2k_angle_between_unit_axis_beta>[-+0-9.eEdD]{9})\s*(?P<x_wien2k_angle_between_unit_axis_gamma>[-+0-9.eEdD]+)"),
......@@ -110,7 +110,7 @@ def buildStructureMatchers():
repeats=True
),
# SM(r"\s*(?P<atom>.{10})\s*NPT=\s*(?P<NPT>[0-9]+)\s*R0=(?P<r0>[0-9.]+)\s*RMT=\s*(?P<rmt>[0-9.]+)\s*Z:\s*(?P<z>[0-9.]+)",)
SM(r"\s*(?P<x_elastic_wien2k_atom_name>^.+)\s*NPT=\s*(?P<x_elastic_wien2k_NPT>[0-9]+)\s*R0=(?P<x_elastic_wien2k_R0>[0-9.]+)\s*RMT=\s*(?P<x_elastic_wien2k_RMT>[0-9.]+)\s*Z:\s*(?P<x_elastic_wien2k_atomic_number_Z>[0-9.]+)",)
SM(r"\s*(?P<x_elastic_wien2k_atom_name>^.+)\s*NPT=\s*(?P<x_elastic_wien2k_npt>[0-9]+)\s*R0=(?P<x_elastic_wien2k_r0>[0-9.]+)\s*RMT=\s*(?P<x_elastic_wien2k_rmt>[0-9.]+)\s*Z:\s*(?P<x_elastic_wien2k_atomic_number_z>[0-9.]+)",)
]
)
])
......@@ -131,7 +131,7 @@ def get_cachingLevelForMetaName(metaInfoEnv, CachingLvl):
'section_run': CachingLvl,
'section_system': CachingLvl
}
cachingLevelForMetaName["x_elastic_wien2k_system_nameIn"] = CachingLevel.ForwardAndCache
cachingLevelForMetaName["x_elastic_wien2k_system_namein"] = CachingLevel.ForwardAndCache
cachingLevelForMetaName["x_elastic_wien2k_section_equiv_atoms"] = CachingLevel.ForwardAndCache
cachingLevelForMetaName["atom_labels"] = CachingLevel.ForwardAndCache
return cachingLevelForMetaName
......
......@@ -788,7 +788,7 @@ class SampleContext(object):
for i in range(0,6):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "Lagrangian-stress")
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_number_of_eta", len(eta[0]))
backend.addValue("x_elastic_strain_diagram_eta_values", eta)
backend.addValue("x_elastic_strain_diagram_values", LagrStress[i])
......@@ -796,7 +796,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "Physical-stress")
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_number_of_eta", len(eta[0]))
backend.addValue("x_elastic_strain_diagram_eta_values", eta)
backend.addValue("x_elastic_strain_diagram_values", physStress[i])
......@@ -804,7 +804,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "cross-validation")
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 1)
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit1Cross)
backend.addValue("x_elastic_strain_diagram_eta_values", CrossVal1_eta[i])
......@@ -813,7 +813,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "cross-validation")
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 3)
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit3Cross)
backend.addValue("x_elastic_strain_diagram_eta_values", CrossVal3_eta[i])
......@@ -822,7 +822,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "cross-validation")
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 5)
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit5Cross)
backend.addValue("x_elastic_strain_diagram_eta_values", CrossVal5_eta[i])
......@@ -832,7 +832,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "dtn")
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 1)
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit1)
backend.addValue("x_elastic_strain_diagram_eta_values", dS1_eta[i])
backend.addValue("x_elastic_strain_diagram_values", dS1_val[i])
......@@ -841,7 +841,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "dtn")
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 3)
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit3)
backend.addValue("x_elastic_strain_diagram_eta_values", dS3_eta[i])
backend.addValue("x_elastic_strain_diagram_values", dS3_val[i])
......@@ -850,7 +850,7 @@ class SampleContext(object):
elasticSIndex = backend.openSection("x_elastic_section_strain_diagrams")
backend.addValue("x_elastic_strain_diagram_type", "dtn")
backend.addValue("x_elastic_strain_diagram_polynomial_fit_order", 5)
backend.addValue("x_elastic_strain_diagram_stress_Voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_stress_voigt_component", int(i+1))
backend.addValue("x_elastic_strain_diagram_number_of_eta", polFit5)
backend.addValue("x_elastic_strain_diagram_eta_values", dS5_eta[i])
backend.addValue("x_elastic_strain_diagram_values", dS5_val[i])
......@@ -862,18 +862,18 @@ class SampleContext(object):
backend.addValue('x_elastic_2nd_order_constants_notation_matrix',voigtMat)
backend.addValue('x_elastic_2nd_order_constants_matrix',ECMat)
backend.addValue('x_elastic_2nd_order_constants_compliance_matrix',complMat)
backend.addValue('x_elastic_Voigt_bulk_modulus',B_V)
backend.addValue('x_elastic_Voigt_shear_modulus',G_V)
backend.addValue('x_elastic_Reuss_bulk_modulus',B_R)
backend.addValue('x_elastic_Reuss_shear_modulus',G_R)
backend.addValue('x_elastic_Hill_bulk_modulus',B_H)
backend.addValue('x_elastic_Hill_shear_modulus',G_H)
backend.addValue('x_elastic_Voigt_Young_modulus',E_V)
backend.addValue('x_elastic_Voigt_Poisson_ratio',nu_V)
backend.addValue('x_elastic_Reuss_Young_modulus',E_R)
backend.addValue('x_elastic_Reuss_Poisson_ratio',nu_R)
backend.addValue('x_elastic_Hill_Young_modulus',E_H)
backend.addValue('x_elastic_Hill_Poisson_ratio',nu_H)
backend.addValue('x_elastic_voigt_bulk_modulus',B_V)
backend.addValue('x_elastic_voigt_shear_modulus',G_V)
backend.addValue('x_elastic_reuss_bulk_modulus',B_R)
backend.addValue('x_elastic_reuss_shear_modulus',G_R)
backend.addValue('x_elastic_hill_bulk_modulus',B_H)
backend.addValue('x_elastic_hill_shear_modulus',G_H)
backend.addValue('x_elastic_voigt_young_modulus',E_V)
backend.addValue('x_elastic_voigt_poisson_ratio',nu_V)
backend.addValue('x_elastic_reuss_young_modulus',E_R)
backend.addValue('x_elastic_reuss_poisson_ratio',nu_R)
backend.addValue('x_elastic_hill_young_modulus',E_H)
backend.addValue('x_elastic_hill_poisson_ratio',nu_H)
backend.addValue('x_elastic_eigenvalues',EC_eigen)
backend.closeSection("section_single_configuration_calculation", elasticGIndex)
backend.addValue("x_elastic_deformation_types", defTyp)
......@@ -1396,7 +1396,7 @@ class SampleContext(object):
def onClose_section_single_configuration_calculation(self, backend, gIndex, section):
# logging.error("BASE onClose_section_single_configuration_calculation")
backend.addValue('single_configuration_to_calculation_method_ref', self.secMethodIndex)
backend.addValue('single_configuration_calculation_to_method_ref', self.secMethodIndex)
backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex)
mainFileDescription = \
......
......@@ -47,7 +47,7 @@ object ElasticParser extends SimpleExternalParserGenerator(
"parser-elastic/elastic_parser_input_exciting.py",
"nomad_meta_info/public.nomadmetainfo.json",
"nomad_meta_info/common.nomadmetainfo.json",
"nomad_meta_info/meta_types.nomadmetainfo.json",
"nomad_meta_info/meta.nomadmetainfo.json",
"nomad_meta_info/elastic.nomadmetainfo.json"
) ++ DefaultPythonInterpreter.commonFiles(),
dirMap = Map(
......
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