@@ -1220,7 +1220,7 @@ def __init__(
12201220 style : KpointsSupportedModes = supported_modes .Gamma ,
12211221 kpts : Sequence [Kpoint ] = ((1 , 1 , 1 ),),
12221222 kpts_shift : tuple [float , float , float ] = (0 , 0 , 0 ),
1223- kpts_weights : list [float ] | None = None ,
1223+ kpts_weights : Sequence [float ] | None = None ,
12241224 coord_type : Literal ["Reciprocal" , "Cartesian" ] | None = None ,
12251225 labels : list [str ] | None = None ,
12261226 tet_number : int = 0 ,
@@ -1246,12 +1246,12 @@ def __init__(
12461246 (or negative), VASP automatically generates the KPOINTS.
12471247 style: Style for generating KPOINTS. Use one of the
12481248 Kpoints.supported_modes enum types.
1249- kpts (2D array ): Array of kpoints. Even when only a single
1249+ kpts (2D sequence ): Sequence of kpoints. Even when only a single
12501250 specification is required, e.g. in the automatic scheme,
1251- the kpts should still be specified as a 2D array . e.g.
1251+ the kpts should still be specified as a 2D sequence . e.g.
12521252 [(20,),] or [(2, 2, 2),].
12531253 kpts_shift (3x1 array): Shift for kpoints.
1254- kpts_weights (list [float]): Optional weights for explicit kpoints.
1254+ kpts_weights (Sequence [float]): Optional weights for explicit kpoints.
12551255 coord_type: In line-mode, this variable specifies whether the
12561256 Kpoints were given in Cartesian or Reciprocal coordinates.
12571257 labels: In line-mode, this should provide a list of labels for
@@ -1266,15 +1266,15 @@ def __init__(
12661266 Format is a list of tuples, [ (sym_weight, [tet_vertices]),
12671267 ...]
12681268 """
1269- if num_kpts > 0 and not labels and not kpts_weights :
1269+ if num_kpts > 0 and not labels and kpts_weights is None :
12701270 raise ValueError ("For explicit or line-mode kpoints, either the labels or kpts_weights must be specified." )
12711271
12721272 self .comment = comment
12731273 self .num_kpts = num_kpts
12741274 self .kpts = kpts # type: ignore[assignment]
12751275 self .style = style
12761276 self .coord_type = coord_type
1277- self .kpts_weights = kpts_weights
1277+ self .kpts_weights = list ( kpts_weights ) if kpts_weights is not None else None
12781278 self .kpts_shift = tuple (kpts_shift )
12791279 self .labels = labels
12801280 self .tet_number = tet_number
0 commit comments