code stringlengths 114 1.05M | path stringlengths 3 312 | quality_prob float64 0.5 0.99 | learning_prob float64 0.2 1 | filename stringlengths 3 168 | kind stringclasses 1
value |
|---|---|---|---|---|---|
from typing import Iterable
from rdflib.store import Store
from rdflib_hdt.hdt_document import HDTDocument
from rdflib_hdt.types import Triple
class HDTStore(Store):
"""An implementation of a Store over a HDT document.
It is heavily inspired by the work from @FlorianLudwig (https://github.com/RDFLib/rdflib... | /rdflib_hdt-3.1.tar.gz/rdflib_hdt-3.1/rdflib_hdt/hdt_store.py | 0.941975 | 0.386763 | hdt_store.py | pypi |
from rdflib.query import ResultRow
from hdt import JoinIterator, TripleIterator
from rdflib_hdt.mapping import term_to_rdflib
from rdflib_hdt.types import Triple
class HDTIterator:
"""An iterator that converts HDT matching triples to the RDFlib data model.
Args:
- input: Input iterator that produces R... | /rdflib_hdt-3.1.tar.gz/rdflib_hdt-3.1/rdflib_hdt/iterators.py | 0.900635 | 0.447098 | iterators.py | pypi |
from typing import Optional, Tuple, Union
import hdt
from rdflib_hdt.iterators import HDTIterator, HDTJoinIterator
from rdflib_hdt.mapping import rdflib_to_hdt, term_to_rdflib
from rdflib_hdt.types import BGP, SearchQuery, Term
class TermKindError(NameError):
"""An error raised when an invalid Term position iden... | /rdflib_hdt-3.1.tar.gz/rdflib_hdt-3.1/rdflib_hdt/hdt_document.py | 0.963805 | 0.558146 | hdt_document.py | pypi |
# NOTE: This code reads the entire JSON object into memory before parsing, but
# we should consider streaming the input to deal with arbitrarily large graphs.
import warnings
from rdflib.graph import ConjunctiveGraph
from rdflib.parser import Parser, URLInputSource
from rdflib.namespace import RDF, XSD
from rdflib.ter... | /rdflib-jsonld-without-2to3-0.7.0.tar.gz/rdflib-jsonld-without-2to3-0.7.0/rdflib_jsonld/parser.py | 0.406626 | 0.273414 | parser.py | pypi |
from rdflib.store import Store
from rdflib import Literal, RDF, URIRef
from neo4j import GraphDatabase
from neo4j import WRITE_ACCESS
import logging
from decimal import Decimal
__all__ = ["CypherNeo4jStore"]
class CypherNeo4jStore(Store):
context_aware = True
formula_aware = True
transaction_aware = True... | /rdflib_neo4j-0.0.1b6-py3-none-any.whl/rdflib_neo4j/neo4jcypher.py | 0.524638 | 0.167934 | neo4jcypher.py | pypi |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import List, Tuple, Optional
from copy import deepcopy
from datetime import datetime, timezone
from rdflib import ConjunctiveGraph, Graph, URIRef
from rdflib_ocdm.counter_handler.counter_handler import CounterHan... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/ocdm_graph.py | 0.835618 | 0.154312 | ocdm_graph.py | pypi |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import Tuple
from rdflib.compare import IsomorphicGraph
from rdflib_ocdm.ocdm_graph import OCDMGraphCommons
from rdflib import ConjunctiveGraph, Graph, URIRef
from rdflib.compare import graph_diff, to_isomo... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/query_utils.py | 0.654674 | 0.25003 | query_utils.py | pypi |
from __future__ import annotations
from abc import ABC
from typing import TYPE_CHECKING
from rdflib import RDF, RDFS, Graph, Literal, URIRef
from rdflib_ocdm.support import create_literal, create_type
if TYPE_CHECKING:
from typing import ClassVar, Dict, Iterable, List, Optional
class AbstractEntity(ABC):
... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/abstract_entity.py | 0.932997 | 0.357792 | abstract_entity.py | pypi |
from __future__ import annotations
from typing import TYPE_CHECKING
from oc_ocdm.decorators import accepts_only
from rdflib import XSD
from rdflib_ocdm.prov.prov_entity import ProvEntity
if TYPE_CHECKING:
from typing import List, Optional
from rdflib import URIRef
class SnapshotEntity(ProvEntity):
""... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/prov/snapshot_entity.py | 0.891482 | 0.432902 | snapshot_entity.py | pypi |
from __future__ import annotations
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from typing import List, Dict
from rdflib_ocdm.counter_handler.counter_handler import CounterHandler
class InMemoryCounterHandler(CounterHandler):
"""A concrete implementation of the ``CounterHandler`` interface that tem... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/counter_handler/in_memory_counter_handler.py | 0.887229 | 0.297798 | in_memory_counter_handler.py | pypi |
import sqlite3
import urllib.parse
from rdflib_ocdm.counter_handler.counter_handler import CounterHandler
class SqliteCounterHandler(CounterHandler):
"""A concrete implementation of the ``CounterHandler`` interface that persistently stores
the counter values within a SQLite database."""
def __init__(se... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/counter_handler/sqlite_counter_handler.py | 0.750461 | 0.245514 | sqlite_counter_handler.py | pypi |
from __future__ import annotations
import json
import os
from rdflib_ocdm.counter_handler.counter_handler import CounterHandler
from rdflib_ocdm.support import is_string_empty
class FilesystemCounterHandler(CounterHandler):
"""A concrete implementation of the ``CounterHandler`` interface that persistently store... | /rdflib_ocdm-0.3.4-py3-none-any.whl/rdflib_ocdm/counter_handler/filesystem_counter_handler.py | 0.6973 | 0.22987 | filesystem_counter_handler.py | pypi |
from rdflib import Graph, URIRef, Literal, BNode
from pyld import jsonld
__version__ = '0.0.1'
def _rdflib_term_to_pyld_term(term):
"""Convert rdflib term to a PyLD term.
See:
<http://rdflib.readthedocs.io/en/stable/apidocs/rdflib.html#module-rdflib.term>
and
<https://github.com/digitalbazaar/p... | /rdflib_pyld_compat-0.1.0-py3-none-any.whl/rdflib_pyld_compat/convert.py | 0.730482 | 0.487124 | convert.py | pypi |
from rdflib import Graph, URIRef, Literal, BNode
from pyld import jsonld
__version__ = '0.0.1'
def _rdflib_term_to_pyld_term(term):
"""Convert rdflib term to a PyLD term.
See:
<http://rdflib.readthedocs.io/en/stable/apidocs/rdflib.html#module-rdflib.term>
and
<https://github.com/digitalbazaar/p... | /rdflib_pyldmod_compat-0.1.2-py3-none-any.whl/rdflib_pyld_compat/convert.py | 0.730482 | 0.487124 | convert.py | pypi |
from rdflib import BNode, Graph, Literal, URIRef, Variable
from rdflib.graph import QuotedGraph
from rdflib_sqlalchemy.constants import (
TERM_COMBINATIONS,
TERM_INSTANTIATION_DICT,
REVERSE_TERM_COMBINATIONS,
)
__all__ = ["extract_triple"]
SUBJECT = 0
PREDICATE = 1
OBJECT = 2
CONTEXT = 3
GRAPH_TERM_DIC... | /rdflib_sqlalchemy-0.5.4-py3-none-any.whl/rdflib_sqlalchemy/termutils.py | 0.741206 | 0.354545 | termutils.py | pypi |
from rdflib import Literal
from rdflib.graph import Graph, QuotedGraph
from rdflib.plugins.stores.regexmatching import REGEXTerm
from sqlalchemy.sql import expression
from rdflib_sqlalchemy.termutils import (
type_to_term_combination,
statement_to_term_combination,
)
class SQLGeneratorMixin(object):
"""S... | /rdflib_sqlalchemy-0.5.4-py3-none-any.whl/rdflib_sqlalchemy/base.py | 0.629319 | 0.305762 | base.py | pypi |
from sqlalchemy import Column, Table, Index, types
from rdflib_sqlalchemy.types import TermType
MYSQL_MAX_INDEX_LENGTH = 200
TABLE_NAME_TEMPLATES = [
"{interned_id}_asserted_statements",
"{interned_id}_literal_statements",
"{interned_id}_namespace_binds",
"{interned_id}_quoted_statements",
"{int... | /rdflib_sqlalchemy-0.5.4-py3-none-any.whl/rdflib_sqlalchemy/tables.py | 0.539711 | 0.273567 | tables.py | pypi |
from rdflib.namespace import RDF
from six import text_type
from sqlalchemy.sql import expression, functions
from rdflib_sqlalchemy.constants import (
ASSERTED_TYPE_PARTITION,
ASSERTED_NON_TYPE_PARTITION,
ASSERTED_LITERAL_PARTITION,
QUOTED_PARTITION,
CONTEXT_SELECT,
COUNT_SELECT,
FULL_TRIPLE... | /rdflib_sqlalchemy-0.5.4-py3-none-any.whl/rdflib_sqlalchemy/sql.py | 0.548915 | 0.370567 | sql.py | pypi |
import inspect
import logging
from pathlib import Path
from typing import Optional, TYPE_CHECKING, Union
from rdflib import Graph
from rdflib.plugins.stores.memory import Memory
from rdflib.store import NO_STORE, VALID_STORE
if TYPE_CHECKING:
from rdflib.term import Identifier
__all__ = ["TriGDumpStore"]
logger... | /rdflib_store_trigdump-1.0.0-py3-none-any.whl/rdflib_store_trigdump/__init__.py | 0.877994 | 0.191592 | __init__.py | pypi |
.. _type_hints: Type Hints
==========
Type Hints
==========
This document provides some details about the type hints for RDFLib. More information about type hints can be found `here <https://docs.python.org/3/library/typing.html>`_
Rationale for Type Hints
========================
Type hints are code annotations th... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/docs/type_hints.rst | 0.91603 | 0.789193 | type_hints.rst | pypi |
.. _persisting_n3_terms:
===========================
Persisting Notation 3 Terms
===========================
Using N3 Syntax for Persistence
-------------------------------
Blank Nodes, Literals, URI References, and Variables can be distinguished in persistence by relying on Notation 3 syntax convention.
All URI Re... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/docs/persisting_n3_terms.rst | 0.908491 | 0.65474 | persisting_n3_terms.rst | pypi |
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/docs/CODE_OF_CONDUCT.md | 0.580947 | 0.65597 | CODE_OF_CONDUCT.md | pypi |
.. _rdf_terms: RDF terms in rdflib
===================
RDF terms in rdflib
===================
Terms are the kinds of objects that can appear in a RDFLib's graph's triples.
Those that are part of core RDF concepts are: ``IRIs``, ``Blank Node``
and ``Literal``, the latter consisting of a literal value and either a ... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/docs/rdf_terms.rst | 0.871816 | 0.685759 | rdf_terms.rst | pypi |
import http.client
import logging
import os
import sys
from typing import Optional
from urllib.request import HTTPHandler, OpenerDirector, Request, install_opener
from rdflib import Graph
class SecuredHTTPHandler(HTTPHandler):
"""
A HTTP handler that blocks access to URLs that end with "blocked.jsonld".
... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/examples/secure_with_urlopen.py | 0.636353 | 0.165965 | secure_with_urlopen.py | pypi |
import os.path
from tempfile import TemporaryDirectory
from rdflib import RDF, BNode, Graph, Literal
from rdflib.namespace import DC, FOAF
if __name__ == "__main__":
store = Graph()
# Bind a few prefix, namespace pairs for pretty output
store.bind("dc", DC)
store.bind("foaf", FOAF)
# Create an i... | /rdflib-6.3.2.tar.gz/rdflib-6.3.2/examples/simple_example.py | 0.418935 | 0.206394 | simple_example.py | pypi |
import subprocess
import threading
import logging
from io import StringIO
import re
from pathlib import Path
from typing import List, Union, Optional, Mapping
from packaging.version import Version, parse as parse_version
from packaging.specifiers import SpecifierSet
StrPath = Union[str, Path]
from .rdfox_endpoint i... | /rdfox_runner-0.6.0-py3-none-any.whl/rdfox_runner/run_rdfox.py | 0.85223 | 0.156652 | run_rdfox.py | pypi |
# RDF Tools
This package consists of a set of command-line tools that do interesting things with RDF and SPARQL.
The functionality is provided by RDFLib, and while that provides a set of commands those provided here are somewhat more extensive and also based upon a common command framework that can be extended easily... | /rdftools-0.2.0a.tar.gz/rdftools-0.2.0/README.md | 0.463201 | 0.917154 | README.md | pypi |
from pyshacl import validate
from rdflib import Graph
import pygraphviz as pgv
import pandas as pd
import argparse, subprocess, json
def load_file(file_path, graph_format="json-ld"):
"""
This function is to load a file with a given format as a RDF Graph object supported by RDFLib
:param file_path: String.... | /rdfvr-0.1.0-py3-none-any.whl/rdfvr.py | 0.753104 | 0.356027 | rdfvr.py | pypi |

# rdfx
A small Python utility to convert, merge, and read/persist RDF data in different formats, across different "persistence
systems".
## How to Use
The command line utility covers merge and conversion functionality, and si... | /rdfx-0.4.11.tar.gz/rdfx-0.4.11/README.md | 0.434701 | 0.866641 | README.md | pypi |
"""Invoke rdiff utility to make signatures, deltas, or patch"""
from rdiff_backup import Globals, log, rpath, hash, librsync
def get_signature(rp, blocksize=None):
"""Take signature of rpin file and return in file object"""
if not blocksize:
blocksize = _find_blocksize(rp.getsize())
log.Log("Gett... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/Rdiff.py | 0.551091 | 0.442576 | Rdiff.py | pypi |
"""Catch various exceptions given system call"""
import errno
import signal
import zlib
from . import librsync, C, rpath, Globals, log, connection
# Those are the signals we want to catch because they relate to conditions
# impacting only a single file, especially on remote file systems.
# We list first only the POS... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/robust.py | 0.406626 | 0.266802 | robust.py | pypi |
"""Provide time related exceptions and functions"""
import calendar
import re
import time
from rdiff_backup import Globals
curtime = curtimestr = None # compat200
_interval_conv_dict = {
"s": 1,
"m": 60,
"h": 3600,
"D": 86400,
"W": 7 * 86400,
"M": 30 * 86400,
"Y": 365 * 86400
}
_integer_... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/Time.py | 0.565899 | 0.363703 | Time.py | pypi |
import os
from rdiff_backup import (
backup, Globals, Hardlink, hash, log, restore, robust, rorpiter, rpath
)
# @API(RepoSide, 200, 200)
class RepoSide(restore.MirrorStruct):
"""On the repository side, comparing is like restoring"""
# @API(RepoSide.init_and_get_iter, 200, 200)
@classmethod
def in... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/compare.py | 0.672762 | 0.224034 | compare.py | pypi |
"""Convert an iterator to a file object and vice-versa"""
import pickle
import array
from . import Globals, robust, rpath
class IterFileException(Exception):
pass
class UnwrapFile:
"""Contains some basic methods for parsing a file containing an iter"""
def __init__(self, file):
self.file = fil... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/iterfile.py | 0.741861 | 0.436262 | iterfile.py | pypi |
import getopt
import os
import re
import subprocess
import sys
from rdiff_backup import (
FilenameMapping,
Globals,
robust,
rpath,
Time,
)
from rdiffbackup.utils import safestr
begin_time = None # Parse statistics at or after this time...
end_time = None # ... and at or before this time (epoch ... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/run_stats.py | 0.441673 | 0.172904 | run_stats.py | pypi |
"""Contains a file wrapper that returns a hash on close"""
import hashlib
from . import Globals
class FileWrapper:
"""Wrapper around a file-like object
Only use this with files that will be read through in a single
pass and then closed. (There is no seek().) When you close it,
return value will be... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/hash.py | 0.70477 | 0.551453 | hash.py | pypi |
import re
import os
from rdiff_backup import Globals, restore, log, rorpiter, rpath, C, \
Time, robust, longname
from rdiffbackup import meta_mgr
# regress_time should be set to the time we want to regress back to
# (usually the time of the last successful backup)
regress_time = None
# This should be set to the l... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/regress.py | 0.53437 | 0.251372 | regress.py | pypi |
import collections
from rdiff_backup import log
class IndexedTuple(collections.UserList):
"""
Like a tuple, but has .index
This is used by CollateIterators, and can be passed to the
IterTreeReducer.
"""
def __init__(self, index, sequence):
self.index = index
self.data = tuple... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/rorpiter.py | 0.802091 | 0.40251 | rorpiter.py | pypi |
"""Provides functions and *ITR classes, for writing increment files"""
import os
from rdiff_backup import Globals, log, Rdiff, robust, rpath, statistics, Time
def Increment(new, mirror, incpref, inc_time=None):
"""
Main file incrementing function, returns inc file created
new is the file on the active p... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiff_backup/increment.py | 0.502441 | 0.397208 | increment.py | pypi |
import os
from rdiff_backup import log, Globals, rpath, Time, rorpiter
from rdiffbackup.utils import plugins
import rdiffbackup.meta
class CombinedWriter:
"""
Used for writing all kind of metadata available
"""
def __init__(self, writers):
self.writers = writers
def write_object(self, ro... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiffbackup/meta_mgr.py | 0.537041 | 0.19787 | meta_mgr.py | pypi |
import re
import binascii
from rdiff_backup import log, Globals, rpath
from rdiffbackup import meta
from rdiffbackup.utils import quoting
class AttrExtractor(meta.FlatExtractor):
"""Iterate rorps from metadata file"""
record_boundary_regexp = re.compile(b"(?:\\n|^)(File (.*?))\\n")
line_parsing_regexp = r... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiffbackup/meta/stdattr.py | 0.466116 | 0.302307 | stdattr.py | pypi |
import errno
import re
import os
try:
import posix1e
except ImportError:
pass
from rdiff_backup import C, Globals, log, rorpiter
from rdiffbackup import meta
from rdiffbackup.utils import usrgrp
from rdiffbackup.locations.map import owners as map_owners
from . import ea
# When an ACL gets dropped, put name in... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiffbackup/meta/acl_posix.py | 0.523908 | 0.276056 | acl_posix.py | pypi |
import argparse
try:
from argparse import BooleanOptionalAction
except ImportError: # pragma: no cover
# the class exists only since Python 3.9
class BooleanOptionalAction(argparse.Action):
"""
Copy of the standard implementation in argparse
Only introduced in Python 3.9, hence re... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiffbackup/utils/argopts.py | 0.579876 | 0.212497 | argopts.py | pypi |
import argparse
from rdiffbackup import actions, actions_mgr, arguments
from rdiffbackup.utils.argopts import BooleanOptionalAction
from rdiff_backup import Globals, log
class CompleteAction(actions.BaseAction):
"""
Output possible options given the current command line state
"""
name = "complete"
... | /rdiff_backup-2.2.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl/rdiffbackup/actions/complete.py | 0.653127 | 0.202996 | complete.py | pypi |
# AWS RDK
[](https://pepy.tech/project/rdk)

AWS Config Rules Development Kit
We greatly appreciate feedback and bug rep... | /rdk-0.16.0-py3-none-any.whl/README.md | 0.572125 | 0.77137 | README.md | pypi |
import re
from typing import Callable
class InferTypes:
def __init__(self, module_name: str) -> None:
self.module_name = module_name
# Initialize needed imports set
self.imports: set[str] = set()
# Initialize replacement counter and dict
self.repl_counter = 0
self... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/infer.py | 0.704567 | 0.405449 | infer.py | pypi |
from Bio.pairwise2 import align
class Align:
@staticmethod
def convert_to_chinese(
a: list[str], b: list[str]
) -> tuple[str, str, dict[str, str]]:
"""Converts two lists of strings to a list of Chinese characters where each unique string is represented by a unique character.
Retur... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/align.py | 0.915419 | 0.551936 | align.py | pypi |
import re
from .classes import *
from .infer import InferTypes
from .modules import BUILTIN_TYPES, MODULES
PARAM_PATTERN = re.compile(r"^(\((.*?)\))?(.*?)(=(.*))?$")
ATTRIBUTE_PATTERN = re.compile(
r"^(.*?)(?:\s?(?:=|\r\n|\r|\n)\s?(.*)((?:(?:(?:\r\n|\r|\n)?)(?:.*))*))?$"
)
FUNC_DEF_PATTERN = re.compile(r"(?:.*?\... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/parse.py | 0.625896 | 0.258031 | parse.py | pypi |
import os
import pickle
import requests
from bs4 import BeautifulSoup
from bs4.element import ResultSet, Tag
from tqdm import tqdm
# URL where the links of all RDKit modules are listed
BASE_URL = "https://www.rdkit.org/docs/api-docs.html"
# Base URL for the documentation of RDKit modules
BASE_SOURCE = "https://www.r... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/download.py | 0.424173 | 0.169097 | download.py | pypi |
import builtins
# List of modules which do not to have to be imported
BUILTIN_TYPES = ["None", "NoneType"] + [
k for k, v in builtins.__dict__.items() if isinstance(v, type)
]
## HARD CODED
# List of modules and their corresponding parent modules
MODULES = {
"_io": None,
"Boost.Python": None,
"sqlalch... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/modules.py | 0.52342 | 0.470676 | modules.py | pypi |
import re
from typing import Callable
from bs4 import BeautifulSoup, Tag
from .classes import *
DOCSTRING_PATTERN: Callable[[str], str] = (
lambda x: r"(" + x + r"\(.*\)(?:\s*->\s*(.*?))?\s*:(?!:))"
)
class Find:
"""Collection of functions to find elements in the HTML tree of the RDKit documentation"""
... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/find.py | 0.682785 | 0.310786 | find.py | pypi |
from .classes import *
from .utils import shift
# Indentation: 4 spaces
PAD = " "
def unparse_param(self: FoundParam):
# : type or ""
type = f": {self.type}" if self.type else ""
# = default or ""
default = f" = {self.default}" if self.default else ""
# name: type = default
return f... | /rdkit_doc_stubs-0.0.2-py3-none-any.whl/rdkit-stubs/install/unparse.py | 0.505615 | 0.205018 | unparse.py | pypi |
# Substructure filters for hit triaging
For hit finding or in the work-up of a hit list it is important to consider high-quality hits and prevent further exploration of false positives. One major source of false positive are frequent hitters which can be defined as compound samples, which show up repeatedly as “active... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Contrib/NIBRSubstructureFilters/README.md | 0.844922 | 0.838018 | README.md | pypi |
import os, re, gzip, json, requests, sys, optparse, csv
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import SDWriter
from rdkit.Chem import Descriptors
from rdkit.ML.Descriptors import MoleculeDescriptors
from scipy import interp
from scipy import stats
from sklearn import cross_validation
fro... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Contrib/pzc/p_con.py | 0.657538 | 0.352661 | p_con.py | pypi |
from rdkit import Chem
from rdkit.Chem import rdFMCS
import numpy as np
def CalcLigRMSD(lig1, lig2, rename_lig2 = True, output_filename="tmp.pdb"):
"""
Calculate the Root-mean-square deviation (RMSD) between two prealigned ligands,
even when atom names between the two ligands are not matching.
The sy... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Contrib/CalcLigRMSD/CalcLigRMSD.py | 0.766862 | 0.763307 | CalcLigRMSD.py | pypi |
import re
import numpy
class ReFile:
"""convenience class for dealing with files with comments
blank (all whitespace) lines, and lines beginning with comment
characters are skipped.
anything following a comment character on a line is stripped off
"""
def readline(self):
""" read the next line an... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/files.py | 0.460774 | 0.409162 | files.py | pypi |
from rdkit.DataStructs.TopNContainer import TopNContainer
class KNNModel(object):
""" This is a base class used by KNNClassificationModel
and KNNRegressionModel to represent a k-nearest neighbor predictor. In general
one of this child classes needs to be instantiated.
_KNNModel_s can save the following piece... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/KNN/KNNModel.py | 0.905744 | 0.645113 | KNNModel.py | pypi |
from rdkit.ML.Data import SplitData
from rdkit.ML.KNN import DistFunctions
from rdkit.ML.KNN.KNNClassificationModel import KNNClassificationModel
from rdkit.ML.KNN.KNNRegressionModel import KNNRegressionModel
def makeClassificationModel(numNeigh, attrs, distFunc):
return KNNClassificationModel(numNeigh, attrs, dist... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/KNN/CrossValidate.py | 0.843605 | 0.626324 | CrossValidate.py | pypi |
import numpy
from rdkit.ML.DecTree import DecTree
from rdkit.ML.InfoTheory import entropy
def CalcTotalEntropy(examples, nPossibleVals):
""" Calculates the total entropy of the data set (w.r.t. the results)
**Arguments**
- examples: a list (nInstances long) of lists of variable values + instance
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/ID3.py | 0.689828 | 0.769254 | ID3.py | pypi |
import numpy
from rdkit import RDRandom as random
from rdkit.ML.DecTree import QuantTree, ID3
from rdkit.ML.InfoTheory import entropy
from rdkit.ML.Data import Quantize
def FindBest(resCodes, examples, nBoundsPerVar, nPossibleRes, nPossibleVals, attrs, exIndices=None,
**kwargs):
bestGain = -1e6
b... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/BuildQuantTree.py | 0.416322 | 0.414543 | BuildQuantTree.py | pypi |
import numpy
from rdkit.ML.DecTree import CrossValidate, PruneTree
import pickle
class Forest(object):
"""a forest of unique decision trees.
adding an existing tree just results in its count field being incremented
and the errors being averaged.
typical usage:
1) grow the forest with AddTr... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/Forest.py | 0.618435 | 0.703696 | Forest.py | pypi |
import copy
import random
import numpy
from rdkit.DataStructs.VectCollection import VectCollection
from rdkit.ML import InfoTheory
from rdkit.ML.DecTree import SigTree
try:
from rdkit.ML.FeatureSelect import CMIM
except ImportError:
CMIM = None
def _GenerateRandomEnsemble(nToInclude, nBits):
""" Generates a... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/BuildSigTree.py | 0.619817 | 0.46308 | BuildSigTree.py | pypi |
from rdkit.ML.DecTree import Tree
class DecTreeNode(Tree.TreeNode):
""" This is used to represent decision trees
_DecTreeNode_s are simultaneously the roots and branches of decision trees.
Everything is nice and recursive.
_DecTreeNode_s can save the following pieces of internal state, accessible via
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/DecTree.py | 0.866979 | 0.76443 | DecTree.py | pypi |
from rdkit.ML.DecTree import DecTree, Tree
class QuantTreeNode(DecTree.DecTreeNode):
"""
"""
def __init__(self, *args, **kwargs):
DecTree.DecTreeNode.__init__(self, *args, **kwargs)
self.qBounds = []
self.nBounds = 0
def ClassifyExample(self, example, appendExamples=0):
""" Recursively clas... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/QuantTree.py | 0.848941 | 0.479199 | QuantTree.py | pypi |
import pickle
# FIX: the TreeNode class has not been updated to new-style classes
# (RD Issue380) because that would break all of our legacy pickled
# data. Until a solution is found for this breakage, an update is
# impossible.
class TreeNode:
""" This is your bog standard Tree class.
the root of the tree is j... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/Tree.py | 0.646237 | 0.595787 | Tree.py | pypi |
import numpy
from rdkit.ML.Data import SplitData
from rdkit.ML.DecTree import ID3
from rdkit.ML.DecTree import randomtest
def ChooseOptimalRoot(examples, trainExamples, testExamples, attrs, nPossibleVals, treeBuilder,
nQuantBounds=[], **kwargs):
""" loops through all possible tree roots and c... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/DecTree/CrossValidate.py | 0.632276 | 0.758041 | CrossValidate.py | pypi |
import numpy
import random
from rdkit.ML.Neural import NetNode, ActFuncs
# FIX: this class has not been updated to new-style classes
# (RD Issue380) because that would break all of our legacy pickled
# data. Until a solution is found for this breakage, an update is
# impossible.
class Network:
""" a neural network... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Neural/Network.py | 0.438304 | 0.496216 | Network.py | pypi |
import numpy
from . import ActFuncs
# FIX: this class has not been updated to new-style classes
# (RD Issue380) because that would break all of our legacy pickled
# data. Until a solution is found for this breakage, an update is
# impossible.
class NetNode:
""" a node in a neural network
"""
def Eval(self, va... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Neural/NetNode.py | 0.625667 | 0.563618 | NetNode.py | pypi |
from rdkit.ML.Neural import Network, Trainers
from rdkit.ML.Data import SplitData
import math
def CrossValidate(net, testExamples, tolerance, appendExamples=0):
""" Determines the classification error for the testExamples
**Arguments**
- tree: a decision tree (or anything supporting a _ClassifyExample()_... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Neural/CrossValidate.py | 0.811452 | 0.791055 | CrossValidate.py | pypi |
from rdkit.ML.Data import SplitData
from rdkit.ML.NaiveBayes.ClassificationModel import NaiveBayesClassifier
try:
from rdkit.ML.FeatureSelect import CMIM
except ImportError:
CMIM = None
def makeNBClassificationModel(trainExamples, attrs, nPossibleValues, nQuantBounds,
mEstimateVal=-... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/NaiveBayes/CrossValidate.py | 0.53777 | 0.497315 | CrossValidate.py | pypi |
import numpy
import pickle
from rdkit.ML.Data import DataUtils
class Composite(object):
"""a composite model
**Notes**
- adding a model which is already present just results in its count
field being incremented and the errors being averaged.
- typical usage:
1) grow the composite with... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Composite/Composite.py | 0.733261 | 0.566438 | Composite.py | pypi |
import numpy
from rdkit.ML.Composite import Composite
class BayesComposite(Composite.Composite):
"""a composite model using Bayesian statistics in the Decision Proxy
**Notes**
- typical usage:
1) grow the composite with AddModel until happy with it
2) call AverageErrors to calculate the ... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Composite/BayesComposite.py | 0.419648 | 0.620248 | BayesComposite.py | pypi |
import copy
import math
import numpy
numericTypes = (int, float)
class MLDataSet(object):
""" A data set for holding general data (floats, ints, and strings)
**Note**
this is intended to be a read-only data structure
(i.e. after calling the constructor you cannot touch it)
"""
def ... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Data/MLData.py | 0.69035 | 0.647548 | MLData.py | pypi |
import numpy
from rdkit.ML.Cluster import Clusters
try:
from rdkit.ML.Cluster.Clustering import MurtaghCluster, MurtaghDistCluster
except ImportError:
MurtaghCluster = None
MurtaghDistCluster = None
# constants to select the clustering algorithm
WARDS = 1
SLINK = 2
CLINK = 3
UPGMA = 4
MCQUITTY = 5
GOWER =... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/Murtagh.py | 0.652352 | 0.478773 | Murtagh.py | pypi |
try:
from rdkit.sping import pid
piddle = pid
except ImportError:
from rdkit.piddle import piddle
import numpy
from . import ClusterUtils
class VisOpts(object):
""" stores visualization options for cluster viewing
**Instance variables**
- x/yOffset: amount by which the drawing is offset from the ... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/ClusterVis.py | 0.534127 | 0.42477 | ClusterVis.py | pypi |
import numpy
from rdkit import RDLogger
logger = RDLogger.logger()
def EuclideanDist(pi, pj):
dv = numpy.array(pi) - numpy.array(pj)
return numpy.sqrt(dv * dv)
def ClusterData(data, nPts, distThresh, isDistData=False, distFunc=EuclideanDist, reordering=False):
""" clusters the data points passed in and retur... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/Butina.py | 0.672117 | 0.644365 | Butina.py | pypi |
def GetNodeList(cluster):
"""returns an ordered list of all nodes below cluster
the ordering is done using the lengths of the child nodes
**Arguments**
- cluster: the cluster in question
**Returns**
- a list of the leaves below this cluster
"""
if len(cluster) == 1:
return [cluster]
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/ClusterUtils.py | 0.68458 | 0.755231 | ClusterUtils.py | pypi |
import numpy
def EuclideanDistance(inData):
"""returns the euclidean metricMat between the points in _inData_
**Arguments**
- inData: a Numeric array of data points
**Returns**
a Numeric array with the metric matrix. See the module documentation
for the format.
"""
nObjs = len(... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/Resemblance.py | 0.86431 | 0.683257 | Resemblance.py | pypi |
def cmp(t1, t2):
return (t1 < t2) * -1 or (t1 > t2) * 1
CMPTOL = 1e-6
class Cluster(object):
"""a class for storing clusters/data
**General Remarks**
- It is assumed that the bottom of any cluster hierarchy tree is composed of
the individual data points which were clustered.
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Cluster/Clusters.py | 0.811863 | 0.675102 | Clusters.py | pypi |
from rdkit import DataStructs
from rdkit.SimDivFilters import rdSimDivPickers as rdsimdiv
if rdsimdiv is None:
raise ImportError('rdSimDivPickers not built')
class BitClusterer(object):
""" Class to cluster a set of bits based on their correllation
The correlation matrix is first built using by reading the... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/InfoTheory/BitClusterer.py | 0.774924 | 0.50891 | BitClusterer.py | pypi |
import numpy
from rdkit.ML.InfoTheory import entropy
def FormCounts(bitVects, actVals, whichBit, nPossibleActs, nPossibleBitVals=2):
""" generates the counts matrix for a particular bit
**Arguments**
- bitVects: a *sequence* containing *IntVectors*
- actVals: a *sequence*
- whichBit: an integer, ... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/InfoTheory/BitRank.py | 0.892346 | 0.74895 | BitRank.py | pypi |
from PIL import Image, ImageDraw
import numpy
def CollectVotes(composite, data, badOnly):
""" collects the votes from _composite_ for the examples in _data_
**Arguments**
- composite: a composite model
- data: a list of examples to run through _composite_
- badOnly: if set only bad (miscla... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/MLUtils/VoteImg.py | 0.674265 | 0.591399 | VoteImg.py | pypi |
import math
def log2(x):
return math.log(x) / math.log(2.)
def BurgesRiskBound(VCDim, nData, nWrong, conf):
""" Calculates Burges's formulation of the risk bound
The formulation is from Eqn. 3 of Burges's review
article "A Tutorial on Support Vector Machines for Pattern Recognition"
In _Data Minin... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/SLT/Risk.py | 0.799403 | 0.764012 | Risk.py | pypi |
import re
from rdkit.Chem import Descriptors as DescriptorsMod
from rdkit.ML.Descriptors import Descriptors
from rdkit.RDLogger import logger
import pickle
logger = logger()
class MolecularDescriptorCalculator(Descriptors.DescriptorCalculator):
""" used for calculating descriptors for molecules
"""
def __in... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Descriptors/MoleculeDescriptors.py | 0.622804 | 0.276956 | MoleculeDescriptors.py | pypi |
# The wildcard import is required to make functions available for the eval statement
from math import *
from rdkit import RDConfig
__DEBUG = False
# we do this to allow the use of stuff in the math module
# ----------------------
# atomic descriptor section
# ----------------------
# these are the methods which can... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Descriptors/Parser.py | 0.768907 | 0.565359 | Parser.py | pypi |
from rdkit import RDConfig
from rdkit.ML.Descriptors import Parser, Descriptors
from rdkit.utils import chemutils
# the list of possible ways to count valence electrons that we know
countOptions = [('NVAL', 'total number of valence electrons'),
('NVAL_NO_FULL_F', 'number of valence electrons neglecting... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/Descriptors/CompoundDescriptors.py | 0.870294 | 0.513363 | CompoundDescriptors.py | pypi |
class DescriptorCalculationError(Exception):
""" used to signal problems generating descriptor values """
pass
class ClassificationError(Exception):
""" used to signal problems generating predictions """
pass
class ModelPackage(object):
""" a container class to package a composite model with a descripto... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/ML/ModelPackage/Packager.py | 0.790126 | 0.440229 | Packager.py | pypi |
import sys
from rdkit import RDConfig
from rdkit.Dbase import DbModule
sqlTextTypes = DbModule.sqlTextTypes
sqlIntTypes = DbModule.sqlIntTypes
sqlFloatTypes = DbModule.sqlFloatTypes
sqlBinTypes = DbModule.sqlBinTypes
def GetDbNames(user='sysdba', password='masterkey', dirName='.', dBase='::template1', cn=None):
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Dbase/DbInfo.py | 0.436862 | 0.154472 | DbInfo.py | pypi |
import sys
from rdkit.Dbase import DbInfo
from rdkit.Dbase import DbModule
from rdkit.Dbase.DbResultSet import DbResultSet, RandomAccessDbResultSet
from io import StringIO
def _take(fromL, what):
""" Given a list fromL, returns an iterator of the elements specified using their
indices in the list what """
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Dbase/DbUtils.py | 0.402157 | 0.306488 | DbUtils.py | pypi |
from rdkit.Dbase import DbUtils, DbInfo, DbModule
class DbError(RuntimeError):
pass
class DbConnect(object):
""" This class is intended to abstract away many of the details of
interacting with databases.
It includes some GUI functionality
"""
def __init__(self, dbName='', tableName='', user='sys... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Dbase/DbConnection.py | 0.713931 | 0.284269 | DbConnection.py | pypi |
INCHI_AVAILABLE = True
import logging
from rdkit.Chem import rdinchi
from rdkit import RDLogger
logger = RDLogger.logger()
logLevelToLogFunctionLookup = {
logging.INFO: logger.info,
logging.DEBUG: logger.debug,
logging.WARNING: logger.warning,
logging.CRITICAL: logger.critical,
logging.ERROR: logger.error... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/inchi.py | 0.542621 | 0.360377 | inchi.py | pypi |
import enum
import hashlib
import json
import logging
import re
from typing import Iterable
from typing import Optional
from rdkit import Chem
from rdkit.Chem import rdMolHash
ATOM_PROP_MAP_NUMBER = 'molAtomMapNumber'
logger = logging.getLogger(__name__)
DEFAULT_CXFLAG = Chem.CXSmilesFields.CX_ATOM_LABELS | Chem.CX... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/RegistrationHash.py | 0.814348 | 0.281233 | RegistrationHash.py | pypi |
import os
import sys
import numpy
from rdkit import RDConfig
from rdkit.Chem import FragmentCatalog
from rdkit.Dbase.DbConnection import DbConnect
from rdkit.ML import InfoTheory
import pickle
def message(msg, dest=sys.stdout):
dest.write(msg)
def BuildCatalog(suppl, maxPts=-1, groupFileName=None, minPath=2,... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/BuildFragmentCatalog.py | 0.442877 | 0.32791 | BuildFragmentCatalog.py | pypi |
import itertools
from rdkit import Chem
# These are SMARTS patterns for the special cases used in SATIS typing.
aldehydePatt = Chem.MolFromSmarts('[CD2]=[OD1]')
ketonePatt = Chem.MolFromSmarts('[CD3]=[OD1]')
amidePatt = Chem.MolFromSmarts('[CD3](=[OD1])-[#7]')
esterPatt = Chem.MolFromSmarts('C(=[OD1])-O-[#6]')
carbo... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/SATIS.py | 0.615897 | 0.567577 | SATIS.py | pypi |
from rdkit.Chem import rdMolDescriptors
if hasattr(rdMolDescriptors, 'CalcPMI1'):
PMI1 = lambda *x, **y: rdMolDescriptors.CalcPMI1(*x, **y)
PMI1.version = rdMolDescriptors._CalcPMI1_version
PMI1.__doc__ = """ First (smallest) principal moment of inertia
**Arguments**
- inMol: a molecule
- co... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/Descriptors3D.py | 0.749912 | 0.495484 | Descriptors3D.py | pypi |
import collections
from rdkit import Chem
from rdkit.Chem import AllChem
def GetHeterocycleReactionSmarts():
"""
Return a list of the individual patterns for mutating individual
atoms in aromatic rings to generate a new aromatic ring. The
elements are collections.namedtuple objects with the following
... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/EnumerateHeterocycles.py | 0.571408 | 0.610947 | EnumerateHeterocycles.py | pypi |
import bisect
import numpy
from rdkit.Chem.EState.EState import EStateIndices as EStateIndices_
from rdkit.Chem.MolSurf import _LabuteHelper as VSAContribs_
"""
These default VSA bins were chosen using the PP3K solubility data
set. An arbitrary number of bins were selected and the
boundaries were selected to give a... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/EState/EState_VSA.py | 0.550366 | 0.562056 | EState_VSA.py | pypi |
import numpy
from rdkit import Chem
def GetPrincipleQuantumNumber(atNum):
""" Get principal quantum number for atom number """
if atNum <= 2:
return 1
if atNum <= 10:
return 2
if atNum <= 18:
return 3
if atNum <= 36:
return 4
if atNum <= 54:
return 5
if atNum <= 86:
return 6
re... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/EState/EState.py | 0.52342 | 0.647241 | EState.py | pypi |
from rdkit.Chem.Pharm2D import SigFactory, Matcher
raise NotImplementedError('not finished yet')
class Generator(object):
"""
Important attributes:
- mol: the molecules whose signature is being worked with
- sigFactory : the SigFactory object with signature parameters
NOTE: no preprocessing ... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/Pharm2D/LazyGenerator.py | 0.748444 | 0.406685 | LazyGenerator.py | pypi |
from rdkit.Chem.FeatMaps.FeatMapPoint import FeatMapPoint
import math
class FeatMapScoreMode(object):
All = 0
""" score each feature in the probe against every matching
feature in the FeatMap.
"""
Closest = 1
""" score each feature in the probe against the closest
matching feature in the FeatMa... | /rdkit_pypi-2023.3.1b1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl/rdkit/Chem/FeatMaps/FeatMaps.py | 0.697197 | 0.662933 | FeatMaps.py | pypi |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.