File: elasticity_legacy.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 (84 lines) | stat: -rw-r--r-- 2,078 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
from typing import List, Optional
from pydantic import BaseModel, Field


class ElasticityData(BaseModel):
    """
    Elastic tensors and associated information.
    """

    k_voigt: Optional[float] = Field(
        None,
        description="Voigt average of the bulk modulus in GPa.",
    )

    k_reuss: Optional[float] = Field(
        None,
        description="Reuss average of the bulk modulus in GPa.",
    )

    k_vrh: Optional[float] = Field(
        None,
        description="Voigt-Reuss-Hill average of the bulk modulus in GPa.",
    )

    g_voigt: Optional[float] = Field(
        None,
        description="Voigt average of the shear modulus in GPa.",
    )

    g_reuss: Optional[float] = Field(
        None,
        description="Reuss average of the shear modulus in GPa.",
    )

    g_vrh: Optional[float] = Field(
        None,
        description="Voigt-Reuss-Hill average of the shear modulus in GPa.",
    )

    universal_anisotropy: Optional[float] = Field(
        None,
        description="Elastic anisotropy.",
    )

    homogeneous_poisson: Optional[float] = Field(
        None,
        description="Poisson's ratio.",
    )

    elastic_tensor: Optional[List[List[float]]] = Field(
        None,
        description="Stiffness tensor in GPa.",
    )

    compliance_tensor: Optional[List[List[float]]] = Field(
        None,
        description="Compliance tensor in 10^(-12)/Pa.",
    )


class ElasticityDoc(BaseModel):
    """
    Model for a document containing elasticity data
    """

    pretty_formula: Optional[str] = Field(
        None,
        description="Cleaned representation of the material formula",
    )

    chemsys: Optional[str] = Field(
        None,
        description="Dash-delimited string of elements in the material.",
    )

    elasticity: Optional[ElasticityData] = Field(
        None,
        description="Elasticity data for the material.",
    )

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