chemicalchecker.database.molrepo.MolrepoHasMolecule

class MolrepoHasMolecule(**kwargs)[source]

Bases: Base

Molrepo-Molecule association object.

Again a Many-to-Many relationship. This table links Molecules and Molrepos also including the external compound identifiers (e.g. ChEMBL -> CHEMBL10, BindigDB -> BDBM50028883, etc.).

Fields:

id(str): primary key, src_id + “_” + molrepo_name. molrepo_name(str): the molrepo name. src_id(str): the download id as in the source file. smiles(str): simplified molecular-input line-entry system (SMILES). inchikey(str): hashed version of the full InChI (SHA-256 algorithm).

A simple constructor that allows initialization from kwargs.

Sets attributes on the constructed instance using the names and values in kwargs.

Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.

Methods

get

Get Molrepo entries associated to the given inchikey.

Attributes

id

inchikey

metadata

molecule

molrepo_name

registry

smiles

src_id

__repr__()[source]

String representation.

static get(inchikey)[source]

Get Molrepo entries associated to the given inchikey.

Parameters:

inchikey (str) – The inchikey to search for.