File: surface_properties.py

package info (click to toggle)
python-emmet-core 0.84.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 77,220 kB
  • sloc: python: 16,355; makefile: 30
file content (111 lines) | stat: -rw-r--r-- 2,662 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
from typing import List, Optional
from pymatgen.core.structure import Structure

from pydantic import BaseModel, Field


class SurfaceEntry(BaseModel):
    """
    Surface energies, miller indicies, ...
    """

    miller_index: Optional[List[int]] = Field(
        None,
        description="Miller index of surface.",
    )

    surface_energy_EV_PER_ANG2: Optional[float] = Field(
        None,
        description="Surface energy in eV/Ų.",
    )

    surface_energy: Optional[float] = Field(
        None,
        description="Surface energy in J/m².",
    )

    is_reconstructed: Optional[bool] = Field(
        None,
        description="Whether it is a reconstructed surface.",
    )

    structure: Optional[str] = Field(
        None,
        description="CIF of slab structure.",
    )

    work_function: Optional[float] = Field(
        None,
        description="Work function in eV.",
    )

    efermi: Optional[float] = Field(
        None,
        description="Fermi energy in eV.",
    )

    area_fraction: Optional[float] = Field(
        None,
        description="Area fraction.",
    )

    has_wulff: Optional[bool] = Field(
        None,
        description="Whether the surface has wulff entry.",
    )


class SurfacePropDoc(BaseModel):
    """
    Model for a document containing surface properties data
    """

    surfaces: Optional[List[SurfaceEntry]] = Field(
        None,
        description="List of individual surface data.",
    )

    weighted_surface_energy_EV_PER_ANG2: Optional[float] = Field(
        None,
        description="Weighted surface energy in eV/Ų",
    )

    weighted_surface_energy: Optional[float] = Field(
        None,
        description="Weighted surface energy in J/m²",
    )

    surface_anisotropy: Optional[float] = Field(
        None,
        description="Surface energy anisotropy.",
    )

    pretty_formula: Optional[str] = Field(
        None,
        description="Reduced Formula of the material.",
    )

    shape_factor: Optional[float] = Field(
        None,
        description="Shape factor.",
    )

    weighted_work_function: Optional[float] = Field(
        None,
        description="Weighted work function in eV.",
    )

    has_reconstructed: Optional[bool] = Field(
        None,
        description="Whether the entry has any reconstructed surfaces.",
    )

    material_id: Optional[str] = Field(
        None,
        description="The Materials Project ID of the material. This comes in the form: mp-******.",
    )

    structure: Optional[Structure] = Field(
        None,
        description="The conventional crystal structure of the material.",
    )