Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions src/nomad_material_processing/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,20 @@
SectionProperties,
)
from nomad.datamodel.metainfo.basesections import (
CompositeSystem,
CompositeSystemReference,
ElementalComposition,
Process,
ProcessStep,
SynthesisMethod,
SystemComponent,
)
from nomad.datamodel.metainfo.basesections2 import (
System,
SystemReference,
Process,
ProcessStep,
SynthesisMethod,
NestedSubSystem,
ReferencedSubSystem,
GeometricalSpace,
)
from nomad.datamodel.metainfo.workflow import (
Link,
Expand All @@ -47,7 +54,7 @@
configuration = config.get_plugin_entry_point('nomad_material_processing:schema')


class Geometry(ArchiveSection):
class Geometry(GeometricalSpace):
"""
Geometrical shape attributes of a system.
Sections derived from `Geometry` represent concrete geometrical shapes.
Expand Down Expand Up @@ -797,7 +804,7 @@ class ElectronicProperties(ArchiveSection):
)


class Substrate(CompositeSystem):
class Substrate(System):
"""
A thin free standing sheet of material. Not to be confused with the substrate role
during a deposition, which can be a `Substrate` with `ThinFilm`(s) on it.
Expand Down Expand Up @@ -874,7 +881,7 @@ class CrystallineSubstrate(Substrate):
)


class ThinFilm(CompositeSystem):
class ThinFilm(System):
"""
A thin film of material which exists as part of a stack.
"""
Expand All @@ -887,7 +894,7 @@ class ThinFilm(CompositeSystem):
)


class ThinFilmReference(CompositeSystemReference):
class ThinFilmReference(SystemReference):
"""
Class autogenerated from yaml schema.
"""
Expand All @@ -908,7 +915,7 @@ class ThinFilmReference(CompositeSystemReference):
)


class SubstrateReference(CompositeSystemReference):
class SubstrateReference(SystemReference):
"""
A section for describing a system component and its role in a composite system.
"""
Expand All @@ -929,7 +936,7 @@ class SubstrateReference(CompositeSystemReference):
)


class ThinFilmStack(CompositeSystem):
class ThinFilmStack(System):
"""
A stack of `ThinFilm`(s). Typically deposited on a `Substrate`.
"""
Expand Down Expand Up @@ -968,17 +975,19 @@ def normalize(self, archive: 'EntryArchive', logger: 'BoundLogger') -> None:
"""
self.components = []
if self.layers:
self.components = [
SystemComponent(system=layer.reference)
self.sub_systems = [
SubSystem(referenced_system=layer.reference)
for layer in self.layers
if layer.reference
]
if self.substrate.reference:
self.components.append(SystemComponent(system=self.substrate.reference))
self.sub_systems.append(
SubSystem(referenced_system=self.substrate.reference)
)
super().normalize(archive, logger)


class ThinFilmStackReference(CompositeSystemReference):
class ThinFilmStackReference(SystemReference):
"""
Class autogenerated from yaml schema.
"""
Expand Down Expand Up @@ -1168,7 +1177,7 @@ class EtchingStep(ProcessStep):
component=ELNComponentEnum.EnumEditQuantity,
),
)
etching_reagents = SubSection(section_def=CompositeSystem, repeats=True)
etching_reagents = SubSection(section_def=System, repeats=True)


class Etching(Process, EntryData):
Expand Down Expand Up @@ -1367,7 +1376,7 @@ class CleaningStep(ProcessStep):
),
)
cleaning_reagents = SubSection(
section_def=CompositeSystemReference,
section_def=SystemReference,
)


Expand Down
Loading