Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add solutions category and resolve bug in combine_components #106

Merged
merged 1 commit into from
Oct 1, 2024
Merged
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
15 changes: 15 additions & 0 deletions src/nomad_material_processing/solution/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from nomad.datamodel.data import (
ArchiveSection,
EntryData,
EntryDataCategory,
)
from nomad.datamodel.metainfo.annotations import (
ELNAnnotation,
Expand All @@ -21,6 +22,7 @@
SystemComponent,
)
from nomad.metainfo import (
Category,
Datetime,
MEnum,
Quantity,
Expand Down Expand Up @@ -52,6 +54,17 @@
)


class SolutionCategory(EntryDataCategory):
"""
Category for entry schemas related to solutions.
"""

m_def = Category(
label='Solutions',
categories=[EntryDataCategory],
)


class MolarConcentration(ArchiveSection):
"""
The molar concentration of a component in a solution.
Expand Down Expand Up @@ -298,6 +311,7 @@ class Solution(CompositeSystem, EntryData):

# TODO make the solvents, solutes, and elemental_composition subsection noneditable.
m_def = Section(
categories=[SolutionCategory],
description='A homogeneous liquid mixture composed of two or more substances.',
a_eln=ELNAnnotation(
properties=SectionProperties(
Expand Down Expand Up @@ -827,6 +841,7 @@ class SolutionPreparation(Process, EntryData):

# TODO populate the instruments section based on the steps.methodology.instrument
m_def = Section(
categories=[SolutionCategory],
description='Section for describing steps of solution preparation.',
a_eln=ELNAnnotation(
properties=SectionProperties(
Expand Down