def __init__(self, structure, data, distance_matrix=None, data_aug=None):
        """
        Typically, this constructor is not used directly and the static
        from_file constructor is used. This constructor is designed to allow
        summation and other operations between VolumetricData objects.

        Args:
            structure: Structure associated with the volumetric data
            data: Actual volumetric data.
            data_aug: Any extra information associated with volumetric data
                (typically augmentation charges)
            distance_matrix: A pre-computed distance matrix if available.
                Useful so pass distance_matrices between sums,
                shortcircuiting an otherwise expensive operation.
        """
        self.structure = structure
        self.is_spin_polarized = len(data) >= 2
        self.is_soc = len(data) >= 4
        self.dim = data["total"].shape
        self.data = data
        self.data_aug = data_aug if data_aug else {}
        self.ngridpts = self.dim[0] * self.dim[1] * self.dim[2]
        # lazy init the spin data since this is not always needed.
        self._spin_data = {}
        self._distance_matrix = {} if not distance_matrix else distance_matrix
def __init__ ( self , structure , data , distance_matrix = None , data_aug = None ) : self . structure = structure self . is_spin_polarized = len ( data ) >= 2 self . is_soc = len ( data ) >= 4 self . dim = data [ "total" ] . shape self . data = data self . data_aug = data_aug if data_aug else { } self . ngridpts = self . dim [ 0 ] * self . dim [ 1 ] * self . dim [ 2 ] self . _spin_data = { } self . _distance_matrix = { } if not distance_matrix else distance_matrix
Typically, this constructor is not used directly and the static
        from_file constructor is used. This constructor is designed to allow
        summation and other operations between VolumetricData objects.

        Args:
            structure: Structure associated with the volumetric data
            data: Actual volumetric data.
            data_aug: Any extra information associated with volumetric data
                (typically augmentation charges)
            distance_matrix: A pre-computed distance matrix if available.
                Useful so pass distance_matrices between sums,
                shortcircuiting an otherwise expensive operation.