|
18 | 18 | from nomad_simulations.schema_packages.general import Simulation |
19 | 19 | from nomad_simulations.schema_packages.model_system import ModelSystem |
20 | 20 | from nomad_simulations.schema_packages import model_method |
21 | | -from nomad_simulations.schema_packages.workflow.general import ( |
22 | | - SimulationWorkflow, |
23 | | - SimulationWorkflowMethod, |
24 | | -) |
25 | | -from nomad_simulations.schema_packages.workflow.geometry_optimization import ( |
26 | | - GeometryOptimization, |
27 | | -) |
28 | | -from nomad_simulations.schema_packages.workflow.single_point import SinglePoint |
29 | 21 | from nomad_simulations.schema_packages.atoms_state import AtomsState |
30 | 22 | from nomad.units import ureg |
31 | 23 |
|
@@ -311,42 +303,6 @@ def parse( |
311 | 303 | reader.convert(meta) |
312 | 304 | archive.data = meta.data_object |
313 | 305 |
|
314 | | - # Replace/augment model_method with parsed DFT info |
315 | | - archive.data.model_method = reader.get_dft_method(reader.data) |
316 | | - |
317 | | - # Set representative system as last geometry if available |
318 | | - if archive.data.model_system: |
319 | | - archive.data.representative_system_index = len(archive.data.model_system) - 1 |
320 | | - |
321 | | - # Attach model_system references to outputs (aligned order) |
322 | | - if archive.data.outputs and archive.data.model_system: |
323 | | - for out, sys in zip(archive.data.outputs, archive.data.model_system): |
324 | | - try: |
325 | | - out.model_system_ref = sys |
326 | | - except Exception: |
327 | | - pass |
328 | | - |
329 | | - # Build workflow: geometry optimization if multiple steps, else single point |
330 | | - wf = None |
331 | | - n_steps = len(archive.data.outputs or []) |
332 | | - if n_steps > 1: |
333 | | - wf = SimulationWorkflow() |
334 | | - elif n_steps == 1: |
335 | | - wf = SinglePoint() |
336 | | - if wf: |
337 | | - wf.method = SimulationWorkflowMethod( |
338 | | - initial_system=archive.data.model_system[0] |
339 | | - if archive.data.model_system |
340 | | - else None, |
341 | | - initial_method=archive.data.model_method[0] |
342 | | - if archive.data.model_method |
343 | | - else None, |
344 | | - ) |
345 | | - wf.map_inputs(archive) |
346 | | - wf.map_outputs(archive) |
347 | | - wf.map_tasks(archive) |
348 | | - archive.workflow2 = wf |
349 | | - |
350 | 306 | meta.close() |
351 | 307 | reader.close() |
352 | 308 |
|
|
0 commit comments