Commit c6fe788d authored by Markus Scheidgen's avatar Markus Scheidgen
Browse files

Added metainfo python code.

parent ae1f7175
import sys
from nomad.metainfo import Environment
from nomad.metainfo.legacy import LegacyMetainfoEnvironment
import phonopyparser.metainfo.phonopy
import nomad.datamodel.metainfo.common
import nomad.datamodel.metainfo.public
import nomad.datamodel.metainfo.general
m_env = LegacyMetainfoEnvironment()
m_env.m_add_sub_section(Environment.packages, sys.modules['phonopyparser.metainfo.phonopy'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.common'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.public'].m_package) # type: ignore
m_env.m_add_sub_section(Environment.packages, sys.modules['nomad.datamodel.metainfo.general'].m_package) # type: ignore
import numpy as np # pylint: disable=unused-import
import typing # pylint: disable=unused-import
from nomad.metainfo import ( # pylint: disable=unused-import
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)
from nomad.metainfo.legacy import LegacyDefinition
from nomad.datamodel.metainfo import public
m_package = Package(
name='phonopy_nomadmetainfo_json',
description='None',
a_legacy=LegacyDefinition(name='phonopy.nomadmetainfo.json'))
class x_phonopy_input(MCategory):
'''
Information about properties that concern phonopy calculations.
'''
m_def = Category(
a_legacy=LegacyDefinition(name='x_phonopy_input'))
class section_method(public.section_method):
m_def = Section(validate=False, extends_base_section=True, a_legacy=LegacyDefinition(name='section_method'))
x_phonopy_displacement = Quantity(
type=np.dtype(np.float64),
shape=[],
unit='meter',
description='''
Amplitude of the atom diplacement for the phonopy supercell
''',
categories=[x_phonopy_input],
a_legacy=LegacyDefinition(name='x_phonopy_displacement'))
x_phonopy_symprec = Quantity(
type=np.dtype(np.float64),
shape=[],
unit='meter',
description='''
Symmetry threshold for the space group identification of the crystal for which the
vibrational properties are to be calculated
''',
categories=[x_phonopy_input],
a_legacy=LegacyDefinition(name='x_phonopy_symprec'))
class section_system(public.section_system):
m_def = Section(validate=False, extends_base_section=True, a_legacy=LegacyDefinition(name='section_system'))
x_phonopy_original_system_ref = Quantity(
type=public.section_system,
shape=[],
description='''
Original cell from which the supercell for the DFT calculations was constructed
''',
a_legacy=LegacyDefinition(name='x_phonopy_original_system_ref'))
m_package.__init_metainfo__()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment