@@ -386,18 +386,18 @@ def construct_array_lincomb(
386386 Array associated with the linear combinations of spherical Gaussians (LCAO's) associated
387387 with the second index.
388388 If None, then transformation is skipped.
389- coord_type_one : {"cartesian", "spherical", list/tuple of "cartesian" or "spherical}
389+ coord_type_one : list/tuple of string
390390 Types of the coordinate system for the contractions associated with the first index.
391- If "cartesian", then all of the contractions are treated as Cartesian contractions.
392- If "spherical", then all of the contractions are treated as spherical contractions.
393- If list/tuple, then each entry must be a "cartesian" or "spherical" to specify the
394- coordinate type of each `GeneralizedContractionShell` instance .
395- coord_type_two : {"cartesian", "spherical", list/tuple of "cartesian" or "spherical}
391+ Each entry must be one of "cartesian" or "spherical". If multiple
392+ instances of GeneralizedContractionShell are given but only one string
393+ ( "cartesian" or "spherical") is provided in the list/tuple, all of the
394+ contractions will be treated according to that string .
395+ coord_type_two : list/tuple of string
396396 Types of the coordinate system for the contractions associated with the second index.
397- If "cartesian", then all of the contractions are treated as Cartesian contractions.
398- If "spherical", then all of the contractions are treated as spherical contractions.
399- If list/tuple, then each entry must be a "cartesian" or "spherical" to specify the
400- coordinate type of each `GeneralizedContractionShell` instance .
397+ Each entry must be one of "cartesian" or "spherical". If multiple
398+ instances of GeneralizedContractionShell are given but only one string
399+ ( "cartesian" or "spherical") is provided in the list/tuple, all of the
400+ contractions will be treated according to that string .
401401 kwargs : dict
402402 Other keyword arguments that will be used to construct the array.
403403 These keyword arguments are passed directly to `construct_array_spherical`, which will
@@ -420,13 +420,16 @@ def construct_array_lincomb(
420420 Raises
421421 ------
422422 TypeError
423- If `coord_type_one` and `coord_type_two` are not one of "cartesian", "spherical", or a
424- list/tuple of these strings.
423+ If `coord_type` is not a list/tuple of the strings 'cartesian' or 'spherical'.
425424
426425 """
427- if coord_type_one == "cartesian" and coord_type_two == "cartesian" :
426+ if all (ct_one == "cartesian" for ct_one in coord_type_one ) and all (
427+ ct_two == "cartesian" for ct_two in coord_type_two
428+ ):
428429 array = self .construct_array_cartesian (** kwargs )
429- elif coord_type_one == "spherical" and coord_type_two == "spherical" :
430+ elif all (ct_one == "spherical" for ct_one in coord_type_one ) and all (
431+ ct_two == "spherical" for ct_two in coord_type_two
432+ ):
430433 array = self .construct_array_spherical (** kwargs )
431434 else :
432435 if coord_type_one in ["cartesian" , "spherical" ]:
@@ -438,8 +441,7 @@ def construct_array_lincomb(
438441 and isinstance (coord_type_two , (list , tuple ))
439442 ):
440443 raise TypeError (
441- "`coord_type` must be one of 'cartesian', 'spherical', or a list/tuple of these"
442- " strings."
444+ "`coord_type` must be a list/tuple of the strings 'cartesian' or 'spherical'"
443445 )
444446 array = self .construct_array_mix (coord_type_one , coord_type_two , ** kwargs )
445447 if transform_one is not None :
0 commit comments