Default encoder.

        :param o: Atom or Bond instance.
        :type o: :class:`~ctfile.ctfile.Atom` or :class:`~ctfile.ctfile.Bond`.
        :return: Dictionary that contains information required for atom and bond block of ``Ctab``.
        :rtype: :py:class:`collections.OrderedDict`

def default(self, o):
        """Default encoder.

        :param o: Atom or Bond instance.
        :type o: :class:`~ctfile.ctfile.Atom` or :class:`~ctfile.ctfile.Bond`.
        :return: Dictionary that contains information required for atom and bond block of ``Ctab``.
        :rtype: :py:class:`collections.OrderedDict`
        """
        if isinstance(o, Atom) or isinstance(o, Bond):
            return o._ctab_data
        else:
            return o.__dict__