@@ -38,31 +38,7 @@ class InputCategory(Enum):
3838
3939
4040class 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 (
0 commit comments