# CONFIDENTIAL. (C) 2022 Cadence Design Systems, Inc. (Cadence)
# All rights reserved.
# ALL SOFTWARE BELOW IS PROPRIETARY AND CONFIDENTIAL TO CADENCE
# AND IS SUBJECT TO THE FULL PROTECTION OF COPYRIGHT AND TRADE SECRET LAW.
# Copying or modifying this software is strictly prohibited and illegal.
# Using this software without a valid license from Cadence is strictly
# prohibited and illegal.  De-obfuscating, de-minimizing, or any other
# attempt to reverse engineer or discover the workings of this software,
# is strictly prohibited. Even if software is exposed or visible, it is
# still proprietary and confidential and the above prohibitions apply.
# This software is NOT "Sample Code". For purposes of customization or
# interoperation with other software you must use Sample Code
# specifically labeled as such.
# Please contact Cadence at eyesopen.com/legal if you have any questions
# about this warning.


# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info < (2, 7, 0):
    raise RuntimeError("Python 2.7 or later required")


def swig_import_helper():
    from os.path import dirname
    import importlib.util
    import importlib.abc

    spec = importlib.machinery.PathFinder().find_spec("_oechem", [dirname(__file__)])

    if spec is None:
        # OpenEye Import Statements
        spec = importlib.machinery.PathFinder().find_spec("libs",[dirname(__file__)])
    libs = importlib.util.module_from_spec(spec)

    import sys
    sys.modules[spec.name] = libs
    spec.loader.exec_module(libs)

    assert not sys.platform.startswith('win')

    _oemolprop = libs.OEGetModule('_oemolprop2621')
    return _oemolprop

_oemolprop = swig_import_helper()
del swig_import_helper

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


import weakref

import openeye.oechem as oechem
OEFilterType_Unknown = _oemolprop.OEFilterType_Unknown

OEFilterType_Lead = _oemolprop.OEFilterType_Lead

OEFilterType_Drug = _oemolprop.OEFilterType_Drug

OEFilterType_BlockBuster = _oemolprop.OEFilterType_BlockBuster

OEFilterType_Fragment = _oemolprop.OEFilterType_Fragment

OEFilterType_PAINS = _oemolprop.OEFilterType_PAINS

OEFilterType_Custom = _oemolprop.OEFilterType_Custom

OEFilterType_BlockBusterPAINS = _oemolprop.OEFilterType_BlockBusterPAINS


OEFilterType_Default = OEFilterType_BlockBuster

OEFilterType_Max = _oemolprop.OEFilterType_Max

OEFilterParamSetup_Type = _oemolprop.OEFilterParamSetup_Type

OEFilterParamSetup_All = _oemolprop.OEFilterParamSetup_All

OEFilterParamName_Type = _oemolprop.OEFilterParamName_Type

class OEXLogPResult(object):
    r"""Proxy of C++ OEMolProp::OEXLogPResult class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        __init__(OEXLogPResult self, bool valid, float value) -> OEXLogPResult
        __init__(OEXLogPResult self, OEXLogPResult rhs) -> OEXLogPResult
        """
        _oemolprop.OEXLogPResult_swiginit(self, _oemolprop.new_OEXLogPResult(*args))

    def IsValid(self) -> "bool":
        r"""IsValid(OEXLogPResult self) -> bool"""
        return _oemolprop.OEXLogPResult_IsValid(self)

    def GetValue(self) -> "float":
        r"""GetValue(OEXLogPResult self) -> float"""
        return _oemolprop.OEXLogPResult_GetValue(self)
    __swig_destroy__ = _oemolprop.delete_OEXLogPResult

# Register OEXLogPResult in _oemolprop:
_oemolprop.OEXLogPResult_swigregister(OEXLogPResult)


def OEGetXLogPVersion() -> "std::string":
    r"""OEGetXLogPVersion() -> std::string"""
    return _oemolprop.OEGetXLogPVersion()

def OEGetXLogP(mol: "OEMolBase", atomxlogps: "float *"=None) -> "float &":
    r"""OEGetXLogP(OEMolBase mol, float * atomxlogps=None) -> bool"""
    return _oemolprop.OEGetXLogP(mol, atomxlogps)

def OEGetXLogPResult(mol: "OEMolBase", atomxlogps: "float *"=None) -> "OEMolProp::OEXLogPResult":
    r"""OEGetXLogPResult(OEMolBase mol, float * atomxlogps=None) -> OEXLogPResult"""
    return _oemolprop.OEGetXLogPResult(mol, atomxlogps)

def OEGet2dPSAVersion() -> "std::string":
    r"""OEGet2dPSAVersion() -> std::string"""
    return _oemolprop.OEGet2dPSAVersion()

def OEGet2dPSA(mol: "OEMolBase", atomPSA: "float *"=None, SandP: "bool"=False) -> "float &":
    r"""OEGet2dPSA(OEMolBase mol, float * atomPSA=None, bool SandP=False) -> bool"""
    return _oemolprop.OEGet2dPSA(mol, atomPSA, SandP)

def OEGetFractionCsp3(mol: "OEMolBase") -> "float":
    r"""OEGetFractionCsp3(OEMolBase mol) -> float"""
    return _oemolprop.OEGetFractionCsp3(mol)

def OEGetAromaticRingCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetAromaticRingCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetAromaticRingCount(mol)

def OEGetRotatableBondCount(mol: "OEMolBase", adjust: "bool"=False) -> "unsigned int":
    r"""OEGetRotatableBondCount(OEMolBase mol, bool adjust=False) -> unsigned int"""
    return _oemolprop.OEGetRotatableBondCount(mol, adjust)

def OECheckXLogXType(atom: "OEAtomBase") -> "bool":
    r"""OECheckXLogXType(OEAtomBase atom) -> bool"""
    return _oemolprop.OECheckXLogXType(atom)

def OECheckXLogXTypes(mol: "OEMolBase") -> "bool":
    r"""OECheckXLogXTypes(OEMolBase mol) -> bool"""
    return _oemolprop.OECheckXLogXTypes(mol)
class OEFilter(object):
    r"""Proxy of C++ OEMolProp::OEFilter class."""

    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        r"""
        __init__(OEFilter self, unsigned int type=) -> OEFilter
        __init__(OEFilter self, oeistream filterstr) -> OEFilter
        __init__(OEFilter self, OEFilter filter) -> OEFilter
        """
        _oemolprop.OEFilter_swiginit(self, _oemolprop.new_OEFilter(*args))
    __swig_destroy__ = _oemolprop.delete_OEFilter

    def GetImpl(self, *args) -> "OEMolProp::OEFilterImpl const *":
        r"""
        GetImpl(OEFilter self) -> OEMolProp::OEFilterImpl
        GetImpl(OEFilter self) -> OEMolProp::OEFilterImpl const *
        """
        return _oemolprop.OEFilter_GetImpl(self, *args)

    def PrintConfig(self, log: "oeostream") -> "void":
        r"""PrintConfig(OEFilter self, oeostream log)"""
        return _oemolprop.OEFilter_PrintConfig(self, log)

    def GetFilterType(self) -> "unsigned int":
        r"""GetFilterType(OEFilter self) -> unsigned int"""
        return _oemolprop.OEFilter_GetFilterType(self)

    def __call__(self, *args) -> "bool":
        r"""
        __call__(OEFilter self, OEMolBase arg2) -> bool
        __call__(OEFilter self, OEMCMolBase arg2) -> bool
        """
        return _oemolprop.OEFilter___call__(self, *args)

    def GetMessage(self, *args) -> "std::string":
        r"""
        GetMessage(OEFilter self, OEMolBase arg2) -> std::string
        GetMessage(OEFilter self, OEMCMolBase arg2) -> std::string
        """
        return _oemolprop.OEFilter_GetMessage(self, *args)

    def IsValid(self):
      return _oemolprop.OEFilter___nonzero__(self)



    def SetTable(self, table: "oeostream", owned: "bool") -> "void":
        r"""SetTable(OEFilter self, oeostream table, bool owned)"""
        return _oemolprop.OEFilter_SetTable(self, table, owned)

    def GetTable(self) -> "OEPlatform::oeostream *":
        r"""GetTable(OEFilter self) -> oeostream"""
        return _oemolprop.OEFilter_GetTable(self)

    def SetFlagTableFailures(self, b: "bool") -> "void":
        r"""SetFlagTableFailures(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetFlagTableFailures(self, b)

    def GetFlagTableFailures(self) -> "bool":
        r"""GetFlagTableFailures(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetFlagTableFailures(self)

    def SetCanonOrder(self, b: "bool") -> "void":
        r"""SetCanonOrder(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetCanonOrder(self, b)

    def GetCanonOrder(self) -> "bool":
        r"""GetCanonOrder(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetCanonOrder(self)

    def SetpKaNormalize(self, b: "bool") -> "void":
        r"""SetpKaNormalize(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetpKaNormalize(self, b)

    def GetpKaNormalize(self) -> "bool":
        r"""GetpKaNormalize(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetpKaNormalize(self)

    def AddNormalizationRule(self, rxn: "OEUniMolecularRxn") -> "bool":
        r"""AddNormalizationRule(OEFilter self, OEUniMolecularRxn rxn) -> bool"""
        return _oemolprop.OEFilter_AddNormalizationRule(self, rxn)

    def ClearNormalizationRules(self) -> "void":
        r"""ClearNormalizationRules(OEFilter self)"""
        return _oemolprop.OEFilter_ClearNormalizationRules(self)

    def ParseNewRules(self, rulefile: "oeistream") -> "bool":
        r"""ParseNewRules(OEFilter self, oeistream rulefile) -> bool"""
        return _oemolprop.OEFilter_ParseNewRules(self, rulefile)

    def SetTypeCheck(self, b: "bool") -> "void":
        r"""SetTypeCheck(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetTypeCheck(self, b)

    def GetTypeCheck(self) -> "bool":
        r"""GetTypeCheck(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetTypeCheck(self)

    def SetMMFFTypeCheck(self, b: "bool") -> "void":
        r"""SetMMFFTypeCheck(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetMMFFTypeCheck(self, b)

    def GetMMFFTypeCheck(self) -> "bool":
        r"""GetMMFFTypeCheck(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetMMFFTypeCheck(self)

    def SetSDTag(self, b: "bool") -> "void":
        r"""SetSDTag(OEFilter self, bool b)"""
        return _oemolprop.OEFilter_SetSDTag(self, b)

    def GetSDTag(self) -> "bool":
        r"""GetSDTag(OEFilter self) -> bool"""
        return _oemolprop.OEFilter_GetSDTag(self)

    def SetErrorLevel(self, level: "unsigned int") -> "void":
        r"""SetErrorLevel(OEFilter self, unsigned int level)"""
        return _oemolprop.OEFilter_SetErrorLevel(self, level)

    def GetErrorLevel(self) -> "unsigned int":
        r"""GetErrorLevel(OEFilter self) -> unsigned int"""
        return _oemolprop.OEFilter_GetErrorLevel(self)

# Register OEFilter in _oemolprop:
_oemolprop.OEFilter_swigregister(OEFilter)

OE_OEMOLPROP_VERSION = _oemolprop.OE_OEMOLPROP_VERSION


def OEMolPropGetRelease() -> "char const *":
    r"""OEMolPropGetRelease() -> char const *"""
    return _oemolprop.OEMolPropGetRelease()

def OEMolPropGetVersion() -> "unsigned int":
    r"""OEMolPropGetVersion() -> unsigned int"""
    return _oemolprop.OEMolPropGetVersion()

def OEMolPropGetArch() -> "char const *":
    r"""OEMolPropGetArch() -> char const *"""
    return _oemolprop.OEMolPropGetArch()

def OEMolPropGetPlatform() -> "char const *":
    r"""OEMolPropGetPlatform() -> char const *"""
    return _oemolprop.OEMolPropGetPlatform()

def OEMolPropIsLicensed(feature: "char const *"=None, expdate: "unsigned int *"=None) -> "bool":
    r"""OEMolPropIsLicensed(char const * feature=None, unsigned int * expdate=None) -> bool"""
    return _oemolprop.OEMolPropIsLicensed(feature, expdate)

def OEMolPropGetLicensee(*args) -> "std::string":
    r"""
    OEMolPropGetLicensee(std::string & licensee) -> bool
    OEMolPropGetLicensee() -> std::string
    """
    return _oemolprop.OEMolPropGetLicensee(*args)

def OEMolPropGetSite(*args) -> "std::string":
    r"""
    OEMolPropGetSite(std::string & site) -> bool
    OEMolPropGetSite() -> std::string
    """
    return _oemolprop.OEMolPropGetSite(*args)

def OEConfigureFilterParams(*args) -> "bool":
    r"""OEConfigureFilterParams(OEInterface itf, unsigned int config=) -> bool"""
    return _oemolprop.OEConfigureFilterParams(*args)

def OEGetFilterType(*args) -> "unsigned int":
    r"""OEGetFilterType(OEInterface itf, std::string name=) -> unsigned int"""
    return _oemolprop.OEGetFilterType(*args)

def OEConfigureFilterType(*args) -> "bool":
    r"""OEConfigureFilterType(OEInterface itf, std::string name=, std::string alias="-ftype") -> bool"""
    return _oemolprop.OEConfigureFilterType(*args)

def OEGetHalideFraction(mol: "OEMolBase", isotopic: "bool"=False) -> "double":
    r"""OEGetHalideFraction(OEMolBase mol, bool isotopic=False) -> double"""
    return _oemolprop.OEGetHalideFraction(mol, isotopic)

def OEGetHBondDonorCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetHBondDonorCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetHBondDonorCount(mol)

def OEGetHBondAcceptorCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetHBondAcceptorCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetHBondAcceptorCount(mol)

def OEGetLipinskiDonorCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetLipinskiDonorCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetLipinskiDonorCount(mol)

def OEGetLipinskiAcceptorCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetLipinskiAcceptorCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetLipinskiAcceptorCount(mol)

def OEWritePropertyDataToCSV(*args) -> "bool":
    r"""
    OEWritePropertyDataToCSV(std::string const & fname, oemolistream ifs, OEFilter filter) -> bool
    OEWritePropertyDataToCSV(oemolostream ofs, oemolistream ifs, OEFilter filter) -> bool
    """
    return _oemolprop.OEWritePropertyDataToCSV(*args)

def OEGetLongestUnbranchedHeavyAtomsChain(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetLongestUnbranchedHeavyAtomsChain(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetLongestUnbranchedHeavyAtomsChain(mol)

def OEGetLongestUnbranchedCarbonsChain(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetLongestUnbranchedCarbonsChain(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetLongestUnbranchedCarbonsChain(mol)

def OEGetAnionicCarbonCount(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetAnionicCarbonCount(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetAnionicCarbonCount(mol)

def OEGetNumUnspecifiedAtomStereos(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetNumUnspecifiedAtomStereos(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetNumUnspecifiedAtomStereos(mol)

def OEGetNumUnspecifiedBondStereos(mol: "OEMolBase") -> "unsigned int":
    r"""OEGetNumUnspecifiedBondStereos(OEMolBase mol) -> unsigned int"""
    return _oemolprop.OEGetNumUnspecifiedBondStereos(mol)


