chemprop.featurizers.molgraph.molecule
======================================

.. py:module:: chemprop.featurizers.molgraph.molecule


Classes
-------

.. autoapisummary::

   chemprop.featurizers.molgraph.molecule.SimpleMoleculeMolGraphFeaturizer
   chemprop.featurizers.molgraph.molecule.BatchCuikMolGraph
   chemprop.featurizers.molgraph.molecule.CuikmolmakerMolGraphFeaturizer


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

.. py:class:: SimpleMoleculeMolGraphFeaturizer

   Bases: :py:obj:`chemprop.featurizers.molgraph.mixins._MolGraphFeaturizerMixin`, :py:obj:`chemprop.featurizers.base.GraphFeaturizer`\ [\ :py:obj:`rdkit.Chem.Mol`\ ]


   A :class:`SimpleMoleculeMolGraphFeaturizer` is the default implementation of a
   :class:`MoleculeMolGraphFeaturizer`

   :param atom_featurizer: the featurizer with which to calculate feature representations of the atoms in a given
                           molecule
   :type atom_featurizer: AtomFeaturizer, default=MultiHotAtomFeaturizer()
   :param bond_featurizer: the featurizer with which to calculate feature representations of the bonds in a given
                           molecule
   :type bond_featurizer: BondFeaturizer, default=MultiHotBondFeaturizer()
   :param extra_atom_fdim: the dimension of the additional features that will be concatenated onto the calculated
                           features of each atom
   :type extra_atom_fdim: int, default=0
   :param extra_bond_fdim: the dimension of the additional features that will be concatenated onto the calculated
                           features of each bond
   :type extra_bond_fdim: int, default=0


   .. py:attribute:: extra_atom_fdim
      :type:  int
      :value: 0



   .. py:attribute:: extra_bond_fdim
      :type:  int
      :value: 0



   .. py:method:: __post_init__()


   .. py:method:: __call__(mol, atom_features_extra = None, bond_features_extra = None)


.. py:class:: BatchCuikMolGraph

   .. py:attribute:: V
      :type:  torch.Tensor

      the atom feature matrix


   .. py:attribute:: E
      :type:  torch.Tensor

      the bond feature matrix


   .. py:attribute:: edge_index
      :type:  torch.Tensor

      an tensor of shape ``2 x E`` containing the edges of the graph in COO format


   .. py:attribute:: rev_edge_index
      :type:  torch.Tensor

      A tensor of shape ``E`` that maps from an edge index to the index of the source of the
      reverse edge in the ``edge_index`` attribute.


   .. py:attribute:: batch
      :type:  torch.Tensor

      the index of the parent :class:`MolGraph` in the batched graph


   .. py:method:: __post_init__()


   .. py:method:: __len__()

      the number of individual :class:`MolGraph`\s in this batch



   .. py:method:: to(device)


.. py:class:: CuikmolmakerMolGraphFeaturizer

   Bases: :py:obj:`chemprop.featurizers.base.Featurizer`\ [\ :py:obj:`list`\ [\ :py:obj:`str`\ ]\ , :py:obj:`BatchCuikMolGraph`\ ]


   A :class:`CuikmolmakerMolGraphFeaturizer` featurizes a list of molecules at once instead of
   one molecule at a time for efficiency.

   :param atom_featurizer_mode: The mode of the atom featurizer (V1, V2, ORGANIC, RIGR) to use.
   :type atom_featurizer_mode: str, default="V2"
   :param extra_atom_fdim: the dimension of the additional features that will be concatenated onto the calculated
                           features of each atom
   :type extra_atom_fdim: int, default=0
   :param extra_bond_fdim: the dimension of the additional features that will be concatenated onto the calculated
                           features of each bond
   :type extra_bond_fdim: int, default=0
   :param add_h: whether to add hydrogens to the `Chem.Mol` objects created from the input SMILES strings
   :type add_h: bool, default=False


   .. py:attribute:: atom_featurizer_mode
      :type:  Literal['V1', 'V2', 'ORGANIC', 'RIGR']
      :value: 'V2'



   .. py:attribute:: extra_atom_fdim
      :type:  int
      :value: 0



   .. py:attribute:: extra_bond_fdim
      :type:  int
      :value: 0



   .. py:attribute:: add_h
      :type:  bool
      :value: False



   .. py:attribute:: atom_fdim
      :type:  int


   .. py:attribute:: bond_fdim
      :type:  int


   .. py:method:: __post_init__()


   .. py:method:: __call__(smiles_list, atom_features_extra = None, bond_features_extra = None)

      featurize an input



