chemprop.data.datapoints
========================

.. py:module:: chemprop.data.datapoints


Attributes
----------

.. autoapisummary::

   chemprop.data.datapoints.MoleculeFeaturizer


Classes
-------

.. autoapisummary::

   chemprop.data.datapoints.MoleculeDatapoint
   chemprop.data.datapoints.LazyMoleculeDatapoint
   chemprop.data.datapoints.MolAtomBondDatapoint
   chemprop.data.datapoints.ReactionDatapoint


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

.. py:data:: MoleculeFeaturizer

.. py:class:: MoleculeDatapoint

   Bases: :py:obj:`_DatapointMixin`, :py:obj:`_MoleculeDatapointMixin`


   A :class:`MoleculeDatapoint` contains a single molecule and its associated features and targets.


   .. py:attribute:: V_f
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``V x d_vf``, where ``V`` is the number of atoms in the molecule, and
      ``d_vf`` is the number of additional features that will be concatenated to atom-level features
      *before* message passing


   .. py:attribute:: E_f
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``E x d_ef``, where ``E`` is the number of bonds in the molecule, and
      ``d_ef`` is the number of additional features  containing additional features that will be
      concatenated to bond-level features *before* message passing


   .. py:attribute:: V_d
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``V x d_vd``, where ``V`` is the number of atoms in the molecule, and
      ``d_vd`` is the number of additional descriptors that will be concatenated to atom-level
      descriptors *after* message passing


   .. py:method:: __post_init__()


   .. py:method:: __len__()


.. py:class:: LazyMoleculeDatapoint

   Bases: :py:obj:`_DatapointMixin`, :py:obj:`_LazyMoleculeDatapointMixin`


   A :class:`LazyMoleculeDatapoint` contains a single SMILES string, and all attributes need to
   form a `rdkit.Chem.Mol` object. The molecule is computed lazily when the attribute `mol` is accessed.


   .. py:attribute:: V_f
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``V x d_vf``, where ``V`` is the number of atoms in the molecule, and
      ``d_vf`` is the number of additional features that will be concatenated to atom-level features
      *before* message passing


   .. py:attribute:: E_f
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``E x d_ef``, where ``E`` is the number of bonds in the molecule, and
      ``d_ef`` is the number of additional features  containing additional features that will be
      concatenated to bond-level features *before* message passing


   .. py:attribute:: V_d
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``V x d_vd``, where ``V`` is the number of atoms in the molecule, and
      ``d_vd`` is the number of additional descriptors that will be concatenated to atom-level
      descriptors *after* message passing


   .. py:method:: __post_init__()


   .. py:method:: __len__()


.. py:class:: MolAtomBondDatapoint

   Bases: :py:obj:`MoleculeDatapoint`


   A :class:`MoleculeDatapoint` contains a single molecule and its associated features and targets.


   .. py:attribute:: E_d
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``E x d_ed``, where ``E`` is the number of bonds in the molecule, and
      ``d_ed`` is the number of additional descriptors that will be concatenated to edge-level
      descriptors *after* message passing


   .. py:attribute:: atom_y
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``V x v_t``, where ``V`` is the number of atoms in the molecule, and
      ``v_t`` is the number of atom targets. The order of atoms in the array should match the order of
      atoms in the mol. Unknown targets are indicated by `nan`s.


   .. py:attribute:: atom_gt_mask
      :type:  numpy.ndarray | None
      :value: None


      Indicates whether the atom targets are an inequality regression target of the form `<x`


   .. py:attribute:: atom_lt_mask
      :type:  numpy.ndarray | None
      :value: None


      Indicates whether the atom targets are an inequality regression target of the form `>x`


   .. py:attribute:: bond_y
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``E x e_t``, where ``V`` is the number of bonds in the molecule, and
      ``e_t`` is the number of bond targets. The order of bonds in the array should match the order of
      bonds in the mol. Unknown targets are indicated by `nan`s.


   .. py:attribute:: bond_gt_mask
      :type:  numpy.ndarray | None
      :value: None


      Indicates whether the bond targets are an inequality regression target of the form `<x`


   .. py:attribute:: bond_lt_mask
      :type:  numpy.ndarray | None
      :value: None


      Indicates whether the bond targets are an inequality regression target of the form `>x`


   .. py:attribute:: atom_constraint
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``1 x v_t`` containing the values that the atom property predictions
      should be constrained to sum to, with np.nan indicating no constraint for that property


   .. py:attribute:: bond_constraint
      :type:  numpy.ndarray | None
      :value: None


      A numpy array of shape ``1 x e_t`` containing the values that the bond property predictions
      should be constrained to sum to, with np.nan indicating no constraint for that property


   .. py:method:: __post_init__()


   .. py:method:: from_smi(smi, *args, keep_h = False, add_h = False, ignore_stereo = False, reorder_atoms = True, **kwargs)
      :classmethod:



.. py:class:: ReactionDatapoint

   Bases: :py:obj:`_DatapointMixin`, :py:obj:`_ReactionDatapointMixin`


   A :class:`ReactionDatapoint` contains a single reaction and its associated features and targets.


   .. py:method:: __post_init__()


   .. py:method:: __len__()


