Skip to content

Commit

Permalink
Add h5web annot to charge density
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Dec 11, 2024
1 parent 092c4fd commit 0650f48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion runschema/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@
def load_module():
from . import calculation, system, method, run # noqa


class RunSchemaEntryPoint(SchemaPackageEntryPoint):
def load(self):
from .run import m_package

return m_package


run_schema_entry_point = RunSchemaEntryPoint(
name="RunSchema", description="Schema for the nomad run section."
name='RunSchema', description='Schema for the nomad run section.'
)
6 changes: 5 additions & 1 deletion runschema/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
SubSection,
)
from nomad.datamodel.hdf5 import HDF5Dataset
from nomad.datamodel.metainfo.annotations import H5WebAnnotation

from .method import HoppingMatrix, Method
from .system import AtomsGroup, System
Expand Down Expand Up @@ -1693,7 +1694,10 @@ class Density(Volumetric):
Section containing the values of the density evaluated on a uniform real-space grid.
"""

m_def = Section(validate=False)
m_def = Section(
validate=False,
a_h5web=H5WebAnnotation(signal='value_hdf5', title='Charge density'),
)

value = Quantity(
type=np.dtype(np.float64),
Expand Down

0 comments on commit 0650f48

Please sign in to comment.