def as_dict(self):
        """
        As in :Class: `pymatgen.core.Molecule` except
        with using `to_dict_of_dicts` from NetworkX
        to store graph information.
        """

        d = {"@module": self.__class__.__module__,
             "@class": self.__class__.__name__,
             "molecule": self.molecule.as_dict(),
             "graphs": json_graph.adjacency_data(self.graph)}

        return d
As in :Class: `pymatgen.core.Molecule` except
        with using `to_dict_of_dicts` from NetworkX
        to store graph information.