"""
This type stub file was generated by pyright.
"""

import pandas as pd

""" Pandas extension for chemical analysis """
def read_csv(*args, **kwargs): # -> TextFileReader:
    """ TODO: Support Chunks """
    ...

def read_sdf(filepath_or_buffer=..., usecols=..., molecule_column=..., molecule_name_column=..., smiles_column=..., skip_bad_mols=..., chunksize=..., **kwargs): # -> Generator[ChemDataFrame, None, None] | ChemDataFrame:
    """Read SDF/MDL multi molecular file to ChemDataFrame

    .. versionadded:: 0.3

    Parameters
    ----------
    filepath_or_buffer : string or None
        File path

    usecols : list or None, optional (default=None)
        A list of columns to read from file. If None then all available
        fields are read.

    molecule_column : string or None, optional (default='mol')
        Name of molecule column. If None the molecules will be skipped and
        the reading will be speed up significantly.

    molecule_name_column : string or None, optional (default='mol_name')
        Column name which will contain molecules' title/name. Column is
        skipped when set to None.

    smiles_column  : string or None, optional (default=None)
        Column name containg molecules' SMILES, by default it is disabled.

    skip_bad_mols : bool, optional (default=False)
        Switch to skip empty (bad) molecules. Useful for RDKit, which Returns
        None if molecule can not sanitize.

    chunksize : int or None, optional (default=None)
        Size of chunk to return. If set to None whole set is returned.

    Returns
    -------
    result :
        A `ChemDataFrame` containg all molecules if `chunksize` is None
        or genrerator of `ChemDataFrame` with `chunksize` molecules.

    """
    ...

def read_mol2(filepath_or_buffer=..., usecols=..., molecule_column=..., molecule_name_column=..., smiles_column=..., skip_bad_mols=..., chunksize=..., **kwargs): # -> Generator[ChemDataFrame, None, None] | ChemDataFrame:
    """Read Mol2 multi molecular file to ChemDataFrame. UCSF Dock 6 comments
    style is supported, i.e. `#### var_name: value` before molecular block.

    .. versionadded:: 0.3

    Parameters
    ----------
    filepath_or_buffer : string or None
        File path

    usecols : list or None, optional (default=None)
        A list of columns to read from file. If None then all available
        fields are read.

    molecule_column : string or None, optional (default='mol')
        Name of molecule column. If None the molecules will be skipped and
        the reading will be speed up significantly.

    molecule_name_column : string or None, optional (default='mol_name')
        Column name which will contain molecules' title/name. Column is
        skipped when set to None.

    smiles_column  : string or None, optional (default=None)
        Column name containg molecules' SMILES, by default it is disabled.

    skip_bad_mols : bool, optional (default=False)
        Switch to skip empty (bad) molecules. Useful for RDKit, which Returns
        None if molecule can not sanitize.

    chunksize : int or None, optional (default=None)
        Size of chunk to return. If set to None whole set is returned.

    Returns
    -------
    result :
        A `ChemDataFrame` containg all molecules if `chunksize` is None
        or genrerator of `ChemDataFrame` with `chunksize` molecules.

    """
    ...

class ChemSeries(pd.Series):
    """Pandas Series modified to adapt `oddt.toolkit.Molecule` objects and apply
    molecular methods easily.

    .. versionadded:: 0.3
    """
    def __le__(self, other) -> bool:
        """ Substructure searching.
        `chemseries < mol`: are molecules in series substructures of a `mol`
        """
        ...
    
    def __ge__(self, other) -> bool:
        """ Substructure searching.
        `chemseries > mol`: is `mol` a substructure of molecules in series
        """
        ...
    
    def __or__(self, other): # -> Series[Unknown] | Series[_bool]:
        """ Tanimoto coefficient """
        ...
    
    def calcfp(self, *args, **kwargs): # -> Series[Unknown]:
        """Helper function to map FP calculation throuugh the series"""
        ...
    
    def to_smiles(self, filepath_or_buffer=...): # -> str | None:
        ...
    
    def to_sdf(self, filepath_or_buffer=...): # -> str | None:
        ...
    
    def to_mol2(self, filepath_or_buffer=...): # -> str | None:
        ...
    


class ChemDataFrame(pd.DataFrame):
    """Chemical DataFrame object, which contains molecules column of
    `oddt.toolkit.Molecule` objects. Rich display of moleucles (2D) is available
    in iPython Notebook. Additional `to_sdf` and `to_mol2` methods make writing
    to molecular formats easy.

    .. versionadded:: 0.3

    Notes
    -----
    Thanks to: http://blog.snapdragon.cc/2015/05/05/subclass-pandas-dataframe-to-save-custom-attributes/
    """
    _metadata = ...
    _molecule_column = ...
    def to_sdf(self, filepath_or_buffer=..., update_properties=..., molecule_column=..., columns=...): # -> str | None:
        """Write DataFrame to SDF file.

        .. versionadded:: 0.3

        Parameters
        ----------
        filepath_or_buffer : string or None
            File path

        update_properties : bool, optional (default=True)
            Switch to update properties from the DataFrames to the molecules
            while writting.

        molecule_column : string or None, optional (default='mol')
            Name of molecule column. If None the molecules will be skipped.

        columns : list or None, optional (default=None)
            A list of columns to write to file. If None then all available
            fields are written.
        """
        ...
    
    def to_mol2(self, filepath_or_buffer=..., update_properties=..., molecule_column=..., columns=...): # -> str | None:
        """Write DataFrame to Mol2 file.

        .. versionadded:: 0.3

        Parameters
        ----------
        filepath_or_buffer : string or None
            File path

        update_properties : bool, optional (default=True)
            Switch to update properties from the DataFrames to the molecules
            while writting.

        molecule_column : string or None, optional (default='mol')
            Name of molecule column. If None the molecules will be skipped.

        columns : list or None, optional (default=None)
            A list of columns to write to file. If None then all available
            fields are written.
        """
        ...
    
    def to_html(self, *args, **kwargs): # -> None:
        """Patched rendering in HTML - don't escape HTML inside the cells.
        Docs are copied from parent
        """
        ...
    
    def to_csv(self, *args, **kwargs): # -> None:
        """ Docs are copied from parent """
        ...
    
    def to_excel(self, *args, **kwargs): # -> None:
        """ Docs are copied from parent """
        ...
    


class ChemPanel(pd.Panel):
    """Modified `pandas.Panel` to adopt higher dimension data than
    `ChemDataFrame`. Main purpose is to store molecular fingerprints in one
    column and keep 2D numpy array underneath.

    .. versionadded:: 0.3
    """
    _metadata = ...
    _molecule_column = ...


