aiida_pseudo.data.pseudo.psf
============================

.. py:module:: aiida_pseudo.data.pseudo.psf

.. autoapi-nested-parse::

   Module for data plugin to represent a pseudo potential in PSF format.



Classes
-------

.. autoapisummary::

   aiida_pseudo.data.pseudo.psf.PsfData


Module Contents
---------------

.. py:class:: PsfData

   Bases: :py:obj:`aiida_pseudo.data.pseudo.pseudo.PseudoPotentialData`


   Data plugin to represent a pseudo potential in PSF format.


   .. py:method:: set_file(source: Union[str, pathlib.Path, BinaryIO], filename: Optional[str] = None, **kwargs)

      Set the file content and parse other optional attributes from the content.

      .. note:: this method will first analyse the type of the ``source`` and if it is a filepath will convert it
          to a binary stream of the content located at that filepath, which is then passed on to the superclass. This
          needs to be done first, because it will properly set the file and filename attributes that are expected by
          other methods. Straight after the superclass call, the source seeker needs to be reset to zero if it needs
          to be read again, because the superclass most likely will have read the stream to the end. Finally it is
          important that the ``prepare_source`` is called here before the superclass invocation, because this way the
          conversion from filepath to byte stream will be performed only once. Otherwise, each subclass would perform
          the conversion over and over again.

      :param source: the source pseudopotential content, either a binary stream, or a ``str`` or ``Path`` to the path
          of the file on disk, which can be relative or absolute.
      :param filename: optional explicit filename to give to the file stored in the repository.
      :raises TypeError: if the source is not a ``str``, ``pathlib.Path`` instance or binary stream.
      :raises FileNotFoundError: if the source is a filepath but does not exist.
      :raises ValueError: if the element symbol is invalid.



