Commit fe15759f authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Allow to have multiple section runs when a log contains data of multiple runs.

parent 558e3d3f
......@@ -143,7 +143,6 @@ class ParserQuantumEspresso():
name='root',
weak=True,
startReStr="",
sections=['section_run'],
subMatchers=[
SM(name='ktab_cIgn', coverageIgnore=True,
# early output seen in benchmark.out.v5.3.0.inp\=vdw1.in.1452257026
......@@ -161,10 +160,10 @@ class ParserQuantumEspresso():
# older espresso has just "..." and date on new line
r"(?:\s*\.\.\.)\s*$)"
),
startReAction = lambda backend, groups: self.on_starts_job(backend),
adHoc = self.adHoc_suicide_qe_program_name,
fixedStartValues={'program_name': 'Quantum Espresso',
'program_basis_set_type': 'plane waves'},
sections=['section_run'],
subMatchers=([
# older espresso versions have start date on separate line
SM(name='run_date',
......
......@@ -656,21 +656,9 @@ class QuantumEspressoParserPWSCF(QeC.ParserQuantumEspresso):
self.sectionIdx['section_system'] = gIndex
self.section['section_system'] = section
def on_starts_job(
self, backend):
def onOpen_section_run(self, backend, gIndex, section):
"""trigger called when section_single_configuration_calculation
is closed"""
frames = self.tmp.get('frames', None)
if frames:
sampling_method_gIndex = backend.openSection('section_sampling_method')
backend.addValue('sampling_method', QE_MD_RELAX_SAMPLING_METHOD[self.tmp['md_relax']])
backend.closeSection('section_sampling_method', sampling_method_gIndex)
frame_sequence_gIndex = backend.openSection('section_frame_sequence')
backend.addValue('frame_sequence_to_sampling_ref', sampling_method_gIndex)
backend.addArrayValues('frame_sequence_local_frames_ref', np.array(self.tmp['frames']))
backend.closeSection('section_frame_sequence', frame_sequence_gIndex)
self.initialize_values()
self.tmp.pop('x_qe_t_profile_caller', None)
......
Supports Markdown
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