@iktos-oss/rdkit-provider
Version:
exports an initialized RDKit instance, with helper functions
141 lines (140 loc) • 4.58 kB
TypeScript
import { RDKitColor } from '../../types';
import { CIPAtoms, CIPBonds } from '../types';
export declare const getSvg: ({ smiles, drawingDetails, alignmentDetails, }: {
smiles: string;
drawingDetails?: DrawingDetails | undefined;
alignmentDetails?: AlignmentDetails | undefined;
}) => string | null;
export declare const getSvgFromSmarts: ({ smarts, width, height }: {
smarts: string;
width: number;
height: number;
}) => string | null;
export type DeprecatedMoleculeBasicDetails = {
numAtoms: number;
numRings: number;
};
type MoleculeFullDetails = Descriptors;
export declare function getMoleculeDetails(params: {
smiles: string;
returnFullDetails: true;
}): MoleculeFullDetails | null;
export declare function getMoleculeDetails(params: {
smiles: string;
returnFullDetails: false;
}): DeprecatedMoleculeBasicDetails | null;
export declare const getCanonicalFormForStructure: ({ structure, useQMol, }: {
structure: string;
molNotation?: MolNotation | undefined;
useQMol?: boolean | undefined;
}) => string | null;
export declare const isChiral: (smiles: string) => boolean;
export declare const getMorganFp: ({ smiles, options, }: {
smiles: string;
options?: {
radius?: number | undefined;
nBits?: number | undefined;
len?: number | undefined;
} | undefined;
}) => string;
export declare const isValidSmiles: (smiles: string) => boolean;
export declare const isValidSmarts: (smarts: string) => boolean;
export declare const hasMatchingSubstructure: ({ smiles, substructure }: {
smiles: string;
substructure: string;
}) => boolean;
export declare const getMatchingSubstructure: ({ structure, substructure }: {
structure: string;
substructure: string;
}) => {
matchingAtoms: number[];
matchingBonds: number[];
} | null;
export declare const isValidMolBlock: (mdl: string) => boolean;
/**
* Convert molecule structure to given notation (smiles, smarts, molblock, ...)
* Warning: some notations like inchi and aromatic_form don't work with qmol
*/
export declare const convertMolNotation: ({ moleculeString, targetNotation, sourceNotation, useQMol, }: {
moleculeString: string;
targetNotation: MolNotation;
sourceNotation?: SourceMolNotation | undefined;
useQMol?: boolean | undefined;
}) => string | null;
export declare const getNewCoords: (structure: string, useCoordGen?: boolean) => string | null;
export declare const removeHs: (structure: string) => string | null;
export declare const addHs: (structure: string) => string | null;
export declare const getStereoTags: (structure: string) => {
CIP_atoms: CIPAtoms;
CIP_bonds: CIPBonds;
};
export interface AlignmentDetails {
molBlock: string;
highlightColor?: RDKitColor;
}
export interface DrawingDetails {
width: number;
height: number;
bondLineWidth?: number;
backgroundColour?: RDKitColor;
highlightColour?: RDKitColor;
highlightRadius?: number;
fixedBondLength?: number;
addAtomIndices?: boolean;
atoms?: number[];
bonds?: number[];
highlightAtomColors?: Record<number, RDKitColor>;
highlightBondColors?: Record<number, RDKitColor>;
}
export type MolNotation = 'aromatic_form' | 'cxsmiles' | 'inchi' | 'kekule_form' | 'molblock' | 'smarts' | 'smiles' | 'v3Kmolblock';
export type SourceMolNotation = 'smarts' | 'smiles' | 'molblock';
export type Descriptors = {
amw: number;
chi0n: number;
chi0v: number;
chi1n: number;
chi1v: number;
chi2n: number;
chi2v: number;
chi3n: number;
chi3v: number;
chi4n: number;
chi4v: number;
CrippenClogP: number;
CrippenMR: number;
exactmw: number;
FractionCSP3: number;
hallKierAlpha: number;
kappa1: number;
kappa2: number;
kappa3: number;
labuteASA: number;
lipinskiHBA: number;
lipinskiHBD: number;
NumAliphaticHeterocycles: number;
NumAliphaticRings: number;
NumAmideBonds: number;
NumAromaticHeterocycles: number;
NumAromaticRings: number;
NumAtoms: number;
NumAtomStereoCenters: number;
NumBridgeheadAtoms: number;
NumHBA: number;
NumHBD: number;
NumHeavyAtoms: number;
NumHeteroatoms: number;
NumHeterocycles: number;
NumRings: number;
NumRotatableBonds: number;
NumSaturatedHeterocycles: number;
NumSaturatedRings: number;
NumSpiroAtoms: number;
NumUnspecifiedAtomStereoCenters: number;
Phi: number;
tpsa: number;
};
export type SubstructMatch = {
atoms?: number[];
bonds?: number[];
};
export {};