diff --git a/pyproject.toml b/pyproject.toml index 74fbc6c..bb03ab4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" [project] name = "nomad-material-processing" -version = "0.0.1" +version = "0.0.2" description = "A plugin for NOMAD containing base sections for material processing." readme = "README.md" authors = [ @@ -21,9 +21,8 @@ classifiers = [ "Programming Language :: Python :: 3.9", ] dependencies = [ - "nomad-lab==1.2.0", + "nomad-lab>=1.2.1.dev,<1.2.2", "pytest", - "typing-extensions==4.4.0", "structlog==22.3.0", ] diff --git a/src/nomad_material_processing/__init__.py b/src/nomad_material_processing/__init__.py index 7c2b5b9..6b384b0 100644 --- a/src/nomad_material_processing/__init__.py +++ b/src/nomad_material_processing/__init__.py @@ -24,42 +24,15 @@ Quantity, Section, ) -from nomad.datamodel.data import ( - ArchiveSection, -) -from nomad.datamodel.metainfo.eln import ( - Process, - Ensemble, +from nomad.datamodel.metainfo.basesections import ( + SynthesisMethod, + CompositeSystem, ) m_package = Package(name='Material Processing') -class ActivityStep(ArchiveSection): - ''' - A step in an activity. - ''' - m_def = Section() - name = Quantity( - type=str, - description=''' - A short and descriptive name for this step. - ''' - ) - - def normalize(self, archive, logger: BoundLogger) -> None: - ''' - The normalizer for the `ActivityStep` class. - - Args: - archive (EntryArchive): The archive containing the section that is being - normalized. - logger (BoundLogger): A structlog logger. - ''' - super(ActivityStep, self).normalize(archive, logger) - - -class Substrate(Ensemble, ArchiveSection): +class Substrate(CompositeSystem): ''' 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. @@ -89,7 +62,7 @@ def normalize(self, archive, logger: BoundLogger) -> None: super(Substrate, self).normalize(archive, logger) -class ThinFilm(Ensemble, ArchiveSection): +class ThinFilm(CompositeSystem): ''' A thin film of material which exists as part of a stack. ''' @@ -118,7 +91,7 @@ def normalize(self, archive, logger: BoundLogger) -> None: super(ThinFilm, self).normalize(archive, logger) -class ThinFilmStack(Ensemble, ArchiveSection): +class ThinFilmStack(CompositeSystem): ''' A stack of `ThinFilm`(s). Typically deposited on a `Substrate`. ''' @@ -157,7 +130,7 @@ def normalize(self, archive, logger: BoundLogger) -> None: super(ThinFilmStack, self).normalize(archive, logger) -class SampleDeposition(Process, ArchiveSection): +class SampleDeposition(SynthesisMethod): ''' The process of the settling of particles (atoms or molecules) from a solution, suspension or vapour onto a pre-existing surface, resulting in the growth of a diff --git a/src/nomad_material_processing/physical_vapor_deposition.py b/src/nomad_material_processing/physical_vapor_deposition.py index 33b3765..4d94f2d 100644 --- a/src/nomad_material_processing/physical_vapor_deposition.py +++ b/src/nomad_material_processing/physical_vapor_deposition.py @@ -32,13 +32,13 @@ from nomad.datamodel.metainfo.annotations import ( ELNAnnotation, ) -from nomad.datamodel.metainfo.eln import ( - Ensemble, - SampleID, - Substance, +from nomad.datamodel.metainfo.basesections import ( + ActivityStep, + CompositeSystem, + PureSubstance, + ReadableIdentifiers, ) from nomad_material_processing import ( - ActivityStep, SampleDeposition, ThinFilmStack, ) @@ -89,7 +89,7 @@ class PVDMaterialSource(ArchiveSection): description=''' The material that is being evaporated. ''', - type=Ensemble, + type=CompositeSystem, ) rate = SubSection( section_def=PVDMaterialEvaporationRate, @@ -255,7 +255,7 @@ class PVDPressure(ArchiveSection): class PVDGasFlow(ArchiveSection): gas = Quantity( - type=Substance, + type=PureSubstance, ) flow = Quantity( type=float, @@ -374,9 +374,9 @@ def normalize(self, archive, logger: BoundLogger) -> None: super(PhysicalVaporDeposition, self).normalize(archive, logger) -class PLDTarget(Ensemble): +class PLDTarget(CompositeSystem): target_id = SubSection( - section_def = SampleID, + section_def = ReadableIdentifiers, )