Skip to content

Commit a0e44bc

Browse files
pydoc / bump emmet-core for r2SCAN inp set
1 parent d363a1e commit a0e44bc

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

pymatgen/io/validation/common.py

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ class InvalidOperation(Exception):
2525
"""Define custom exception when checking valid operations."""
2626

2727
def __init__(self, operation: str) -> None:
28+
"""Define custom exception when checking valid operations.
29+
30+
Args:
31+
operation (str) : a symbolic string for an operation that is not valid.
32+
"""
2833
msg = f"Unknown operation type {operation}; valid values are: {VALID_OPERATIONS}"
2934
super().__init__(msg)
3035

pymatgen/io/validation/vasp_defaults.py

+26-25
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,7 @@ class InputCategory(Enum):
3838

3939

4040
class VaspParam:
41-
"""Define the default value of a VASP parameter.
42-
43-
Args:
44-
name (str) : the name of the INCAR keyword
45-
value (Any) : the default value of this parameter if
46-
statically assigned by VASP. If this parameter is dynamically assigned
47-
by VASP, set the default to None.
48-
tag (InputCategory, str) : the general category of input the tag belongs to.
49-
Used only to properly update INCAR fields in the same way VASP does.
50-
operation : str, Sequence of str, or None
51-
Mathematical operation used to determine if an input value is valid.
52-
See VALID_OPERATIONS for a list of possible operators.
53-
If a single str, this specifies one operation.
54-
Can be a list of valid operations.
55-
alias : str or None
56-
If a str, an alternate name for a parameter to use when reporting
57-
invalid values. A good example is ENCUT, which is set by the
58-
user, but is overwritten to ENMAX in the vasprun.xml parameters.
59-
In this case, `name = "ENMAX"` but `alias = "ENCUT"` to be informative.
60-
If None, it is set to `name`.
61-
tolerance : float, default = 1.e-4
62-
The tolerance used when evaluating approximate float equality.
63-
commment : str or None
64-
Additional information to pass to the user if a check fails.
65-
"""
41+
"""Define a schema for validating VASP parameters."""
6642

6743
__slots__: tuple[str, ...] = (
6844
"name",
@@ -88,7 +64,32 @@ def __init__(
8864
warning: str | None = None,
8965
severity: Literal["reason", "warning"] = "reason",
9066
) -> None:
67+
"""
68+
Define a schema for validating VASP parameters.
9169
70+
Args:
71+
name (str) : the name of the INCAR keyword
72+
value (Any) : the default value of this parameter if
73+
statically assigned by VASP. If this parameter is dynamically assigned
74+
by VASP, set the default to None.
75+
tag (InputCategory, str) : the general category of input the tag belongs to.
76+
Used only to properly update INCAR fields in the same way VASP does.
77+
operation : str, Sequence of str, or None
78+
Mathematical operation used to determine if an input value is valid.
79+
See VALID_OPERATIONS for a list of possible operators.
80+
If a single str, this specifies one operation.
81+
Can be a list of valid operations.
82+
alias : str or None
83+
If a str, an alternate name for a parameter to use when reporting
84+
invalid values. A good example is ENCUT, which is set by the
85+
user, but is overwritten to ENMAX in the vasprun.xml parameters.
86+
In this case, `name = "ENMAX"` but `alias = "ENCUT"` to be informative.
87+
If None, it is set to `name`.
88+
tolerance : float, default = 1.e-4
89+
The tolerance used when evaluating approximate float equality.
90+
commment : str or None
91+
Additional information to pass to the user if a check fails.
92+
"""
9293
self.name = name
9394
self.value = value
9495
if (isinstance(operation, str) and operation not in VALID_OPERATIONS) or (

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
pymatgen==2024.11.13
2-
emmet-core==0.83.6
2+
emmet-core==0.84.5
33
pydantic==2.4.2
44
pydantic-core==2.10.1
55
pydantic-settings==2.2.1

0 commit comments

Comments
 (0)