Given a structure, returns the predicted volume.

        Args:
            structure (Structure) : a crystal structure with an unknown volume.
            icsd_vol (bool) : True if the input structure's volume comes from
                ICSD.

        Returns:
            a float value of the predicted volume.

def predict(self, structure, icsd_vol=False):
        """
        Given a structure, returns the predicted volume.

        Args:
            structure (Structure) : a crystal structure with an unknown volume.
            icsd_vol (bool) : True if the input structure's volume comes from
                ICSD.

        Returns:
            a float value of the predicted volume.
        """

        # Get standard deviation of electronnegativity in the structure.
        std_x = np.std([site.specie.X for site in structure])
        # Sites that have atomic radii
        sub_sites = []
        # Record the "DLS estimated radius" from bond_params.
        bp_dict = {}

        for sp in list(structure.composition.keys()):
            if sp.atomic_radius:
                sub_sites.extend([site for site in structure
                                  if site.specie == sp])
            else:
                warnings.warn("VolumePredictor: no atomic radius data for "
                              "{}".format(sp))

            if sp.symbol not in bond_params:
                warnings.warn("VolumePredictor: bond parameters not found, "
                              "used atomic radii for {}".format(sp))
            else:
                r, k = bond_params[sp.symbol]["r"], bond_params[sp.symbol]["k"]
                bp_dict[sp] = float(r) + float(k) * std_x

        # Structure object that include only sites with known atomic radii.
        reduced_structure = Structure.from_sites(sub_sites)
        smallest_ratio = None

        for site1 in reduced_structure:
            sp1 = site1.specie
            neighbors = reduced_structure.get_neighbors(site1,
                                                        sp1.atomic_radius +
                                                        self.cutoff)

            for site2, dist in neighbors:
                sp2 = site2.specie

                if sp1 in bp_dict and sp2 in bp_dict:
                    expected_dist = bp_dict[sp1] + bp_dict[sp2]
                else:
                    expected_dist = sp1.atomic_radius + sp2.atomic_radius

                if not smallest_ratio or dist / expected_dist < smallest_ratio:
                    smallest_ratio = dist / expected_dist

        if not smallest_ratio:
            raise ValueError("Could not find any bonds within the given cutoff "
                             "in this structure.")

        volume_factor = (1 / smallest_ratio) ** 3

        # icsd volume fudge factor
        if icsd_vol:
            volume_factor *= 1.05

        if self.min_scaling:
            volume_factor = max(self.min_scaling, volume_factor)
        if self.max_scaling:
            volume_factor = min(self.max_scaling, volume_factor)

        return structure.volume * volume_factor