UNPKG

molstar

Version:

A comprehensive macromolecular library.

36 lines (35 loc) 1.69 kB
/** * Copyright (c) 2019 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Fred Ludlow <Fred.Ludlow@astx.com> * @author Alexander Rose <alexander.rose@weirdbyte.de> */ import { Structure, StructureElement, Unit } from '../../../mol-model/structure'; import { ParamDefinition as PD } from '../../../mol-util/param-definition'; import { RuntimeContext } from '../../../mol-task'; export declare function explicitValence(structure: Structure, unit: Unit.Atomic, index: StructureElement.UnitIndex): number; /** * Attempts to produce a consistent charge and implicit * H-count for an atom. * * If both props.assignCharge and props.assignH, this * approximately follows the rules described in * https://docs.eyesopen.com/toolkits/python/oechemtk/valence.html#openeye-hydrogen-count-model * * If only charge or hydrogens are to be assigned it takes * a much simpler view and deduces one from the other */ export declare function calculateHydrogensCharge(structure: Structure, unit: Unit.Atomic, index: StructureElement.UnitIndex, props: ValenceModelProps): number[]; export interface ValenceModel { charge: Int8Array; implicitH: Int8Array; totalH: Int8Array; idealGeometry: Int8Array; } export declare const ValenceModelParams: { assignCharge: PD.Select<string>; assignH: PD.Select<string>; }; export declare type ValenceModelParams = typeof ValenceModelParams; export declare type ValenceModelProps = PD.Values<ValenceModelParams>; export declare function calcValenceModel(ctx: RuntimeContext, structure: Structure, props: Partial<ValenceModelProps>): Promise<Map<number, ValenceModel>>;