react-cheminfo 0.63.1 → 0.64.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/molecule3d/core/highlight.d.ts +53 -0
- package/lib/molecule3d/core/highlight.d.ts.map +1 -0
- package/lib/molecule3d/core/highlight.js +102 -0
- package/lib/molecule3d/core/highlight.js.map +1 -0
- package/lib/molecule3d/core/index.d.ts +2 -0
- package/lib/molecule3d/core/index.d.ts.map +1 -1
- package/lib/molecule3d/core/index.js +1 -0
- package/lib/molecule3d/core/index.js.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.d.ts.map +1 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.js +7 -1
- package/lib/molecule3d/ui/MoleculeCanvas3D.js.map +1 -1
- package/lib/molecule3d/ui/highlightColor.d.ts +18 -0
- package/lib/molecule3d/ui/highlightColor.d.ts.map +1 -0
- package/lib/molecule3d/ui/highlightColor.js +31 -0
- package/lib/molecule3d/ui/highlightColor.js.map +1 -0
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts +13 -0
- package/lib/molecule3d/ui/moleculeViewer3DProps.d.ts.map +1 -1
- package/lib/molecule3d/ui/renderMolecule.d.ts +2 -0
- package/lib/molecule3d/ui/renderMolecule.d.ts.map +1 -1
- package/lib/molecule3d/ui/renderMolecule.js +1 -1
- package/lib/molecule3d/ui/renderMolecule.js.map +1 -1
- package/lib/molecule3d/ui/viewer.d.ts +9 -0
- package/lib/molecule3d/ui/viewer.d.ts.map +1 -1
- package/lib/molecule3d/ui/viewer.js +18 -2
- package/lib/molecule3d/ui/viewer.js.map +1 -1
- package/lib/molstar/core/highlights.d.ts +57 -0
- package/lib/molstar/core/highlights.d.ts.map +1 -0
- package/lib/molstar/core/highlights.js +178 -0
- package/lib/molstar/core/highlights.js.map +1 -0
- package/lib/molstar/core/index.d.ts +2 -1
- package/lib/molstar/core/index.d.ts.map +1 -1
- package/lib/molstar/core/index.js +2 -1
- package/lib/molstar/core/index.js.map +1 -1
- package/package.json +1 -1
- package/src/molecule3d/core/highlight.ts +133 -0
- package/src/molecule3d/core/index.ts +6 -0
- package/src/molecule3d/ui/MoleculeCanvas3D.tsx +13 -0
- package/src/molecule3d/ui/highlightColor.ts +34 -0
- package/src/molecule3d/ui/moleculeViewer3DProps.ts +13 -0
- package/src/molecule3d/ui/renderMolecule.ts +1 -1
- package/src/molecule3d/ui/viewer.ts +23 -0
- package/src/molstar/core/highlights.ts +236 -0
- package/src/molstar/core/index.ts +2 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a highlight on a 3D molecule is, without React and without molstar: a
|
|
3
|
+
* bonded path of atoms a site points at — the two atoms of a bond, the three of
|
|
4
|
+
* an angle, the four of a dihedral — for the model to emphasise.
|
|
5
|
+
*
|
|
6
|
+
* Atoms are named by position, as measurements name them, so a row of a table
|
|
7
|
+
* read off one conformer lands on the same atoms of every other conformer of
|
|
8
|
+
* the same molecule.
|
|
9
|
+
*/
|
|
10
|
+
import type { AtomReference } from './measurement.ts';
|
|
11
|
+
/** One bonded path of atoms to emphasise on the model. */
|
|
12
|
+
export interface Molecule3DHighlight {
|
|
13
|
+
/**
|
|
14
|
+
* The atoms in the order they are bonded: two for a bond, three for the two
|
|
15
|
+
* bonds of an angle, four for the three bonds of a dihedral. One atom
|
|
16
|
+
* emphasises that atom alone.
|
|
17
|
+
*/
|
|
18
|
+
atoms: readonly AtomReference[];
|
|
19
|
+
}
|
|
20
|
+
/** Two consecutive atoms of a path: the bond a highlight emphasises. */
|
|
21
|
+
export type HighlightedBond = readonly [AtomReference, AtomReference];
|
|
22
|
+
/** Everything a list of highlights emphasises, each atom and bond once. */
|
|
23
|
+
export interface HighlightedParts {
|
|
24
|
+
/** Every atom of every path, in the order the paths first name them. */
|
|
25
|
+
atoms: readonly AtomReference[];
|
|
26
|
+
/** Every pair of consecutive atoms, in the order the paths first name them. */
|
|
27
|
+
bonds: readonly HighlightedBond[];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The atoms and the bonds a list of highlights emphasises.
|
|
31
|
+
*
|
|
32
|
+
* A bond is a pair of consecutive atoms of one path, and nothing else: two
|
|
33
|
+
* atoms that are both highlighted, but by different paths or not next to each
|
|
34
|
+
* other in one, are not a bond of the highlight — so six C–H paths never
|
|
35
|
+
* emphasise the C–C bond between two of their carbons. An atom the structure
|
|
36
|
+
* lacks is left out, with the two pairs it stands in; the atoms on either side
|
|
37
|
+
* of it are not joined in its place.
|
|
38
|
+
* @param highlights - The paths, as a site passes them.
|
|
39
|
+
* @param hasAtom - Whether the structure on screen has an atom; asked only of
|
|
40
|
+
* references whose two numbers are whole and not negative.
|
|
41
|
+
* @default () => true
|
|
42
|
+
* @returns The atoms and the bonds, each once, in the order first named.
|
|
43
|
+
*/
|
|
44
|
+
export declare function highlightedParts(highlights: readonly Molecule3DHighlight[], hasAtom?: (atom: AtomReference) => boolean): HighlightedParts;
|
|
45
|
+
/**
|
|
46
|
+
* Whether two lists of highlights name the same atoms, in the same paths and
|
|
47
|
+
* the same order — what decides that the model needs no repainting.
|
|
48
|
+
* @param first - One list.
|
|
49
|
+
* @param second - The other.
|
|
50
|
+
* @returns True when every path of one is the path of the other at its place.
|
|
51
|
+
*/
|
|
52
|
+
export declare function sameHighlights(first: readonly Molecule3DHighlight[], second: readonly Molecule3DHighlight[]): boolean;
|
|
53
|
+
//# sourceMappingURL=highlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/highlight.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;CACjC;AAED,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;AAEtE,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,wEAAwE;IACxE,KAAK,EAAE,SAAS,aAAa,EAAE,CAAC;IAChC,+EAA+E;IAC/E,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CACnC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAC9B,UAAU,EAAE,SAAS,mBAAmB,EAAE,EAC1C,OAAO,GAAE,CAAC,IAAI,EAAE,aAAa,KAAK,OAAmB,GACpD,gBAAgB,CA2BlB;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,KAAK,EAAE,SAAS,mBAAmB,EAAE,EACrC,MAAM,EAAE,SAAS,mBAAmB,EAAE,GACrC,OAAO,CAiBT"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a highlight on a 3D molecule is, without React and without molstar: a
|
|
3
|
+
* bonded path of atoms a site points at — the two atoms of a bond, the three of
|
|
4
|
+
* an angle, the four of a dihedral — for the model to emphasise.
|
|
5
|
+
*
|
|
6
|
+
* Atoms are named by position, as measurements name them, so a row of a table
|
|
7
|
+
* read off one conformer lands on the same atoms of every other conformer of
|
|
8
|
+
* the same molecule.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The atoms and the bonds a list of highlights emphasises.
|
|
12
|
+
*
|
|
13
|
+
* A bond is a pair of consecutive atoms of one path, and nothing else: two
|
|
14
|
+
* atoms that are both highlighted, but by different paths or not next to each
|
|
15
|
+
* other in one, are not a bond of the highlight — so six C–H paths never
|
|
16
|
+
* emphasise the C–C bond between two of their carbons. An atom the structure
|
|
17
|
+
* lacks is left out, with the two pairs it stands in; the atoms on either side
|
|
18
|
+
* of it are not joined in its place.
|
|
19
|
+
* @param highlights - The paths, as a site passes them.
|
|
20
|
+
* @param hasAtom - Whether the structure on screen has an atom; asked only of
|
|
21
|
+
* references whose two numbers are whole and not negative.
|
|
22
|
+
* @default () => true
|
|
23
|
+
* @returns The atoms and the bonds, each once, in the order first named.
|
|
24
|
+
*/
|
|
25
|
+
export function highlightedParts(highlights, hasAtom = isAnyAtom) {
|
|
26
|
+
const atoms = [];
|
|
27
|
+
const bonds = [];
|
|
28
|
+
const atomKeys = new Set();
|
|
29
|
+
const bondKeys = new Set();
|
|
30
|
+
for (const highlight of highlights) {
|
|
31
|
+
let previous;
|
|
32
|
+
for (const atom of highlight.atoms) {
|
|
33
|
+
const present = isAtomReference(atom) && hasAtom(atom);
|
|
34
|
+
if (present && !atomKeys.has(atomKey(atom))) {
|
|
35
|
+
atomKeys.add(atomKey(atom));
|
|
36
|
+
atoms.push({ unit: atom.unit, element: atom.element });
|
|
37
|
+
}
|
|
38
|
+
if (present && previous !== undefined) {
|
|
39
|
+
const key = bondKey(previous, atom);
|
|
40
|
+
if (key !== null && !bondKeys.has(key)) {
|
|
41
|
+
bondKeys.add(key);
|
|
42
|
+
bonds.push([
|
|
43
|
+
{ unit: previous.unit, element: previous.element },
|
|
44
|
+
{ unit: atom.unit, element: atom.element },
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
previous = present ? atom : undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return { atoms, bonds };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Whether two lists of highlights name the same atoms, in the same paths and
|
|
55
|
+
* the same order — what decides that the model needs no repainting.
|
|
56
|
+
* @param first - One list.
|
|
57
|
+
* @param second - The other.
|
|
58
|
+
* @returns True when every path of one is the path of the other at its place.
|
|
59
|
+
*/
|
|
60
|
+
export function sameHighlights(first, second) {
|
|
61
|
+
if (first === second)
|
|
62
|
+
return true;
|
|
63
|
+
if (first.length !== second.length)
|
|
64
|
+
return false;
|
|
65
|
+
for (let index = 0; index < first.length; index++) {
|
|
66
|
+
const one = first[index]?.atoms;
|
|
67
|
+
const other = second[index]?.atoms;
|
|
68
|
+
if (one === undefined || other === undefined)
|
|
69
|
+
return false;
|
|
70
|
+
if (one.length !== other.length)
|
|
71
|
+
return false;
|
|
72
|
+
for (let position = 0; position < one.length; position++) {
|
|
73
|
+
const atom = one[position];
|
|
74
|
+
const match = other[position];
|
|
75
|
+
if (atom?.unit !== match?.unit || atom?.element !== match?.element) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
function isAnyAtom() {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
function isAtomReference(atom) {
|
|
86
|
+
return (Number.isInteger(atom.unit) &&
|
|
87
|
+
atom.unit >= 0 &&
|
|
88
|
+
Number.isInteger(atom.element) &&
|
|
89
|
+
atom.element >= 0);
|
|
90
|
+
}
|
|
91
|
+
function atomKey(atom) {
|
|
92
|
+
return `${atom.unit}:${atom.element}`;
|
|
93
|
+
}
|
|
94
|
+
// One key for a pair whichever way round, and none for an atom with itself.
|
|
95
|
+
function bondKey(first, second) {
|
|
96
|
+
const one = atomKey(first);
|
|
97
|
+
const other = atomKey(second);
|
|
98
|
+
if (one === other)
|
|
99
|
+
return null;
|
|
100
|
+
return one < other ? `${one}-${other}` : `${other}-${one}`;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=highlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/molecule3d/core/highlight.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAyBH;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAC9B,UAA0C,EAC1C,UAA4C,SAAS;IAErD,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,MAAM,KAAK,GAAsB,EAAE,CAAC;IACpC,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAU,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,GAAG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QAC9B,IAAI,CAAC,OAAO,IAAI,CAAC,CAClB,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,IAAmB;IAClC,OAAO,GAAG,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;AACxC,CAAC;AAED,4EAA4E;AAC5E,SAAS,OAAO,CAAC,KAAoB,EAAE,MAAqB;IAC1D,MAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3B,MAAM,KAAK,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9B,IAAI,GAAG,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC;IAC/B,OAAO,GAAG,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,GAAG,IAAI,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,GAAG,EAAE,CAAC;AAC7D,CAAC"}
|
|
@@ -4,6 +4,8 @@ export type { ImageSize } from './exportImage.ts';
|
|
|
4
4
|
export { dataUriBytes, rasterSvgMarkup } from './exportImage.ts';
|
|
5
5
|
export type { Molecule3DGesture, Molecule3DGestureKey } from './gestures.ts';
|
|
6
6
|
export { MOLECULE_3D_GESTURES } from './gestures.ts';
|
|
7
|
+
export type { HighlightedBond, HighlightedParts, Molecule3DHighlight, } from './highlight.ts';
|
|
8
|
+
export { highlightedParts, sameHighlights } from './highlight.ts';
|
|
7
9
|
export type { AtomReference, Measurement, MeasurementKind, } from './measurement.ts';
|
|
8
10
|
export { MEASUREMENT_ATOM_COUNTS, MEASUREMENT_KINDS, MEASUREMENT_LABELS, } from './measurement.ts';
|
|
9
11
|
export type { Molecule3DFile, Molecule3DSettings, Molecule3DTools, RepresentationId, SurfaceColoringId, } from './settings.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACjE,YAAY,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAClE,YAAY,EACV,aAAa,EACb,WAAW,EACX,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { DEFAULT_MOLECULE_3D_CAMERA, MOLECULE_3D_ZOOM_RANGE, formatMolecule3DCamera, molecule3DCameraParam, normalizeMolecule3DCamera, parseMolecule3DCamera, sameMolecule3DCamera, } from "./camera.js";
|
|
2
2
|
export { dataUriBytes, rasterSvgMarkup } from "./exportImage.js";
|
|
3
3
|
export { MOLECULE_3D_GESTURES } from "./gestures.js";
|
|
4
|
+
export { highlightedParts, sameHighlights } from "./highlight.js";
|
|
4
5
|
export { MEASUREMENT_ATOM_COUNTS, MEASUREMENT_KINDS, MEASUREMENT_LABELS, } from "./measurement.js";
|
|
5
6
|
export { DEFAULT_MOLECULE_3D_SETTINGS, DEFAULT_MOLECULE_3D_TOOLS, MOLECULE_3D_RANGES, REPRESENTATIONS, REPRESENTATION_LABELS, SURFACE_CHARGE_COLORS, SURFACE_COLORINGS, SURFACE_COLORING_LABELS, isRepresentationId, isSurfaceColoringId, normalizeMolecule3DSettings, resetMolecule3DSettings, resolveMolecule3DTools, sameMolecule3DSettings, } from "./settings.js";
|
|
6
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAMrD,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/molecule3d/core/index.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,yBAAyB,EACzB,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAMrD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAMlE,OAAO,EACL,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAQ1B,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,EACzB,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,qBAAqB,EACrB,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,mBAAmB,EACnB,2BAA2B,EAC3B,uBAAuB,EACvB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoleculeCanvas3D.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"MoleculeCanvas3D.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAiBzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AAOxE,yCAAyC;AACzC,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CACjD,qBAAqB,EACrB,UAAU,GAAG,mBAAmB,CACjC;IACC,2EAA2E;IAC3E,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAuK3E"}
|
|
@@ -7,6 +7,7 @@ import { Molecule3DOptions } from "./Molecule3DOptions.js";
|
|
|
7
7
|
import { Molecule3DStage } from "./Molecule3DStage.js";
|
|
8
8
|
import { Molecule3DToolbar } from "./Molecule3DToolbar.js";
|
|
9
9
|
import { createMolecule3DViewer } from "./createViewer.js";
|
|
10
|
+
import { highlightColorOf } from "./highlightColor.js";
|
|
10
11
|
import { useControlledState } from "./useControlledState.js";
|
|
11
12
|
import { useImageExport } from "./useImageExport.js";
|
|
12
13
|
import { useMoleculeScene } from "./useMoleculeScene.js";
|
|
@@ -17,7 +18,7 @@ import { usePolarSurfaceArea } from "./usePolarSurfaceArea.js";
|
|
|
17
18
|
* @returns The canvas with its toolbars.
|
|
18
19
|
*/
|
|
19
20
|
export function MoleculeCanvas3D(props) {
|
|
20
|
-
const { molfile, frameNewMolecule = 'keep', tools: toolsProp, settings: settingsProp, defaultSettings, onSettingsChange, spinning: spinningProp, defaultSpinning = false, onSpinningChange, spinSpeed = DEFAULT_SPIN_SPEED, measurements: measurementsProp, onMeasurementsChange, fileName = 'molecule', background, minHeight = 320, onFailureChange, } = props;
|
|
21
|
+
const { molfile, frameNewMolecule = 'keep', tools: toolsProp, settings: settingsProp, defaultSettings, onSettingsChange, spinning: spinningProp, defaultSpinning = false, onSpinningChange, spinSpeed = DEFAULT_SPIN_SPEED, measurements: measurementsProp, onMeasurementsChange, highlights = NO_HIGHLIGHTS, fileName = 'molecule', background, minHeight = 320, onFailureChange, } = props;
|
|
21
22
|
const tools = resolveMolecule3DTools(toolsProp);
|
|
22
23
|
const [initialSettings] = useState(() => normalizeMolecule3DSettings(defaultSettings));
|
|
23
24
|
const [settings, setSettings] = useControlledState(settingsProp, initialSettings, onSettingsChange);
|
|
@@ -71,6 +72,10 @@ export function MoleculeCanvas3D(props) {
|
|
|
71
72
|
useEffect(() => {
|
|
72
73
|
void viewerRef.current?.setMeasureKind(measureKind);
|
|
73
74
|
}, [container, measureKind]);
|
|
75
|
+
// Kept out of the scene: a new highlight repaints the model, never redraws it.
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
void viewerRef.current?.setHighlights(highlights, highlightColorOf(container));
|
|
78
|
+
}, [container, highlights]);
|
|
74
79
|
const { resetView } = useMoleculeScene({
|
|
75
80
|
container,
|
|
76
81
|
viewerRef,
|
|
@@ -90,6 +95,7 @@ export function MoleculeCanvas3D(props) {
|
|
|
90
95
|
}, onResetView: resetView, options: _jsx(Molecule3DOptions, { settings: settings, onChange: setSettings, polarSurfaceArea: polarSurfaceArea, defaults: initialSettings }), exportPanel: _jsx(Molecule3DExport, { getSize: canvasSize, onExport: exportImage, onCopy: copyImage }) }) }))] })) }));
|
|
91
96
|
}
|
|
92
97
|
const NO_MEASUREMENTS = [];
|
|
98
|
+
const NO_HIGHLIGHTS = [];
|
|
93
99
|
const STAGE_STYLE = {
|
|
94
100
|
position: 'relative',
|
|
95
101
|
flex: '1 0 auto',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoleculeCanvas3D.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"MoleculeCanvas3D.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/MoleculeCanvas3D.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGjE,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAyB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,sB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AAM,aAAa,GAAkB;IACnC,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,YAAY;IACxB,GAAG,EAAE,CAAC;IACN,aAAa,EAAE,MAAM;CACtB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The colour the 3D view emphasises in, read off the page it sits on.
|
|
3
|
+
*
|
|
4
|
+
* A WebGL colour cannot be a custom property, and the family's accent is the
|
|
5
|
+
* one colour a site owns, so it cannot be written into a shared library either:
|
|
6
|
+
* the view asks the browser what `--accent` resolved to where it is drawn, as
|
|
7
|
+
* the parallel coordinates do, and hands molstar the answer.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What `--accent` resolved to on an element of the view.
|
|
11
|
+
* @param element - An element of the view, once it is on the page, or `null`
|
|
12
|
+
* before it is.
|
|
13
|
+
* @returns The accent as `#rrggbb`. A site that declares none emphasises in its
|
|
14
|
+
* text colour, and a page that declares neither, or no page yet, in the
|
|
15
|
+
* family's.
|
|
16
|
+
*/
|
|
17
|
+
export declare function highlightColorOf(element: Element | null): string;
|
|
18
|
+
//# sourceMappingURL=highlightColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlightColor.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/highlightColor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,GAAG,MAAM,CAMhE"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The colour the 3D view emphasises in, read off the page it sits on.
|
|
3
|
+
*
|
|
4
|
+
* A WebGL colour cannot be a custom property, and the family's accent is the
|
|
5
|
+
* one colour a site owns, so it cannot be written into a shared library either:
|
|
6
|
+
* the view asks the browser what `--accent` resolved to where it is drawn, as
|
|
7
|
+
* the parallel coordinates do, and hands molstar the answer.
|
|
8
|
+
*/
|
|
9
|
+
import { normalizeColor } from "../../tokens/core/colors.js";
|
|
10
|
+
import { FAMILY_TOKEN_VALUES } from "../../tokens/core/familyTokens.js";
|
|
11
|
+
/**
|
|
12
|
+
* What `--accent` resolved to on an element of the view.
|
|
13
|
+
* @param element - An element of the view, once it is on the page, or `null`
|
|
14
|
+
* before it is.
|
|
15
|
+
* @returns The accent as `#rrggbb`. A site that declares none emphasises in its
|
|
16
|
+
* text colour, and a page that declares neither, or no page yet, in the
|
|
17
|
+
* family's.
|
|
18
|
+
*/
|
|
19
|
+
export function highlightColorOf(element) {
|
|
20
|
+
return (tokenColor(element, '--accent') ??
|
|
21
|
+
tokenColor(element, '--text') ??
|
|
22
|
+
FAMILY_TOKEN_VALUES['--text']);
|
|
23
|
+
}
|
|
24
|
+
function tokenColor(element, name) {
|
|
25
|
+
const resolve = globalThis.getComputedStyle;
|
|
26
|
+
if (element === null || typeof resolve !== 'function')
|
|
27
|
+
return undefined;
|
|
28
|
+
const color = normalizeColor(resolve(element).getPropertyValue(name));
|
|
29
|
+
return color === null ? undefined : `#${color}`;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=highlightColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlightColor.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/highlightColor.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAExE;;;;;;;GAOG;AACH,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,OAAO,CACL,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC;QAC/B,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC7B,mBAAmB,CAAC,QAAQ,CAAC,CAC9B,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,OAAuB,EAAE,IAAY;IACvD,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAC5C,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,OAAO,KAAK,UAAU;QAAE,OAAO,SAAS,CAAC;IACxE,MAAM,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;IACtE,OAAO,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,KAAK,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ViewerCapability } from '../../orbital/ui/capability.ts';
|
|
3
3
|
import type { Molecule3DCamera } from '../core/camera.ts';
|
|
4
|
+
import type { Molecule3DHighlight } from '../core/highlight.ts';
|
|
4
5
|
import type { Measurement } from '../core/measurement.ts';
|
|
5
6
|
import type { Molecule3DFile, Molecule3DSettings, Molecule3DTools } from '../core/settings.ts';
|
|
6
7
|
/**
|
|
@@ -74,6 +75,18 @@ export interface MoleculeViewer3DProps {
|
|
|
74
75
|
* @default undefined
|
|
75
76
|
*/
|
|
76
77
|
onMeasurementsChange?: (measurements: readonly Measurement[]) => void;
|
|
78
|
+
/**
|
|
79
|
+
* The parts of the model to emphasise in the site's accent colour, each a
|
|
80
|
+
* bonded path of atoms named as measurements name them: two atoms are that
|
|
81
|
+
* bond, three the two bonds of an angle, four the three bonds of a dihedral,
|
|
82
|
+
* and one atom is that atom alone. Only the bonds between consecutive atoms
|
|
83
|
+
* of one path are emphasised, never another bond between two highlighted
|
|
84
|
+
* atoms, and an atom the structure lacks is skipped. Changing them repaints
|
|
85
|
+
* the model and nothing else: the camera, the measurements and the hover are
|
|
86
|
+
* left as they are.
|
|
87
|
+
* @default [] — nothing is emphasised
|
|
88
|
+
*/
|
|
89
|
+
highlights?: readonly Molecule3DHighlight[];
|
|
77
90
|
/**
|
|
78
91
|
* Where the camera stands when the first molecule is framed — what a shared
|
|
79
92
|
* link carries. The camera belongs to whoever is dragging it afterwards, so
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"moleculeViewer3DProps.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/moleculeViewer3DProps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EACd,kBAAkB,EAClB,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB;IACpC,qEAAqE;IACrE,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IAC/B;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACpC;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAC9C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC1D;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,C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B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,gBAAgB,KAAK,SAAS,CAAC;CACjE"}
|
|
@@ -12,6 +12,8 @@ import type { Molecule3DFile } from '../core/settings.ts';
|
|
|
12
12
|
import type { MoleculeStyle } from './viewerTypes.ts';
|
|
13
13
|
/** State-tree ref of the structure every representation hangs off. */
|
|
14
14
|
export declare const MOLECULE_STRUCTURE_REF = "molecule3d-structure";
|
|
15
|
+
/** The drawn model, replaced in place whenever the style changes. */
|
|
16
|
+
export declare const MODEL_REPRESENTATION_REF = "molecule3d-model";
|
|
15
17
|
/**
|
|
16
18
|
* Replace the displayed molecule. Everything already on screen goes first.
|
|
17
19
|
* @param plugin - The molstar context.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderMolecule.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/renderMolecule.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAOvE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"renderMolecule.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/renderMolecule.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAOvE,OAAO,KAAK,EAAE,cAAc,EAAoB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,sEAAsE;AACtE,eAAO,MAAM,sBAAsB,yBAAyB,CAAC;AAK7D,qEAAqE;AACrE,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAiB3D;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,cAAc,EACvB,KAAK,GAAE,aAAkB,GACxB,OAAO,CAAC,IAAI,CAAC,CA0Cf;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,aAAa,GACpB,SAAS,GAAG,SAAS,CAIvB"}
|
|
@@ -15,7 +15,7 @@ export const MOLECULE_STRUCTURE_REF = 'molecule3d-structure';
|
|
|
15
15
|
/** Root of the molecule subtree: deleting it removes model and surface. */
|
|
16
16
|
const MOLECULE_DATA_REF = 'molecule3d-data';
|
|
17
17
|
/** The drawn model, replaced in place whenever the style changes. */
|
|
18
|
-
const MODEL_REPRESENTATION_REF = 'molecule3d-model';
|
|
18
|
+
export const MODEL_REPRESENTATION_REF = 'molecule3d-model';
|
|
19
19
|
/**
|
|
20
20
|
* molstar's ball-and-stick radius factor that a size factor of 1 stands for:
|
|
21
21
|
* thin sticks and readable balls.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderMolecule.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/renderMolecule.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,EAAE,mCAAmC,EAAE,MAAM,yEAAyE,CAAC;AAC9H,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAOtG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a,EAAE,KAAK;aACrB;YACD,KAAK;YACL,WAAW;YACX,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE;SACzB,CAAC,CAAC;IACL,CAAC;IACD,OAAO,mCAAmC,CAAC,MAAM,EAAE,SAAS,EAAE;QAC5D,IAAI,EAAE,gBAAgB;QACtB,UAAU,EAAE;YACV,UAAU;YACV,eAAe,EAAE,2BAA2B;YAC5C,aAAa,EAAE,KAAK;SACrB;QACD,KAAK;QACL,WAAW;KACZ,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
import type { Molecule3DCamera } from '../core/camera.ts';
|
|
11
11
|
import type { ImageSize } from '../core/exportImage.ts';
|
|
12
|
+
import type { Molecule3DHighlight } from '../core/highlight.ts';
|
|
12
13
|
import type { Measurement, MeasurementKind } from '../core/measurement.ts';
|
|
13
14
|
import type { Molecule3DFile } from '../core/settings.ts';
|
|
14
15
|
import type { Molecule3DViewerOptions, MoleculeStyle, SurfaceStyle } from './viewerTypes.ts';
|
|
@@ -56,6 +57,14 @@ export declare class Molecule3DViewer {
|
|
|
56
57
|
* @returns Nothing; resolves once the labels are on screen.
|
|
57
58
|
*/
|
|
58
59
|
showMeasurements(measurements: readonly Measurement[]): Promise<void>;
|
|
60
|
+
/**
|
|
61
|
+
* Emphasise exactly these paths of atoms on the model — this one and every
|
|
62
|
+
* one drawn after it — without redrawing the scene or moving the camera.
|
|
63
|
+
* @param highlights - Replaces what is emphasised; empty restores the model.
|
|
64
|
+
* @param color - What they are painted in, as `#rrggbb`.
|
|
65
|
+
* @returns Nothing; resolves once the model is repainted.
|
|
66
|
+
*/
|
|
67
|
+
setHighlights(highlights: readonly Molecule3DHighlight[], color: string): Promise<void>;
|
|
59
68
|
/**
|
|
60
69
|
* Make clicks on atoms build a measurement, or give them back to the camera.
|
|
61
70
|
* @param kind - The measurement to build, or `null`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"viewer.d.ts","sourceRoot":"","sources":["../../../src/molecule3d/ui/viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgBH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAU1D,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EACb,YAAY,EACb,MAAM,kBAAkB,CAAC;AAE1B;;;GAGG;AACH,qBAAa,gBAAgB;;IAK3B,0EAA0E;IAC1E,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9B;;;;OAIG;gBACS,SAAS,EAAE,WAAW,EAAE,OAAO,GAAE,uBAA4B;IAiBzE;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAO3E;;;OAGG;IACH,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;IAO7B;;;;OAIG;IACH,WAAW,CAAC,KAAK,CAAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD;;;OAGG;IACH,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B;;;;OAIG;IACH,gBAAgB,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrE;;;;;;OAMG;IACH,aAAa,CACX,UAAU,EAAE,SAAS,mBAAmB,EAAE,EAC1C,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;OAIG;IACH,cAAc,CAAC,IAAI,EAAE,eAAe,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAM3D;;;;;;OAMG;IACH,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAI1D;;;;;OAKG;IACH,WAAW,CACT,oBAAoB,SAA0B,EAC9C,SAAS,UAAQ,GAChB,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;;OAKG;IACH,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,oBAAoB,SAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAM5E;;;;;OAKG;IACH,WAAW,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,KAAK,IAAI,GAAG,MAAM,IAAI;IAI5E;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,SAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrE,kEAAkE;IAClE,YAAY,IAAI,IAAI;IAIpB,sEAAsE;IACtE,OAAO,IAAI,IAAI;CAWhB"}
|
|
@@ -7,9 +7,10 @@
|
|
|
7
7
|
* the viewer has been disposed. molstar's own UI is not mounted: every control
|
|
8
8
|
* is the component's.
|
|
9
9
|
*/
|
|
10
|
-
import {
|
|
10
|
+
import { Color } from 'molstar/lib/mol-util/color/color.js';
|
|
11
|
+
import { DEFAULT_CAMERA_DURATION, DEFAULT_SPIN_SPEED, HighlightPainter, MeasurementPicker, MolstarPlugin, captureScene, clearMeasurements, renderMeasurements, setSpin, } from "../../molstar/core/index.js";
|
|
11
12
|
import { applyCamera, resetCamera, watchCamera } from "./camera.js";
|
|
12
|
-
import { clearMolecule, moleculeStructure, renderMolecule, } from "./renderMolecule.js";
|
|
13
|
+
import { MODEL_REPRESENTATION_REF, clearMolecule, moleculeStructure, renderMolecule, } from "./renderMolecule.js";
|
|
13
14
|
import { clearSurface, renderSurface } from "./renderSurface.js";
|
|
14
15
|
/**
|
|
15
16
|
* One molstar canvas, and every operation the component performs on it. Every
|
|
@@ -18,6 +19,7 @@ import { clearSurface, renderSurface } from "./renderSurface.js";
|
|
|
18
19
|
export class Molecule3DViewer {
|
|
19
20
|
#plugin;
|
|
20
21
|
#picker;
|
|
22
|
+
#painter;
|
|
21
23
|
/** Resolves once the canvas exists; every method awaits it internally. */
|
|
22
24
|
ready;
|
|
23
25
|
/**
|
|
@@ -33,6 +35,7 @@ export class Molecule3DViewer {
|
|
|
33
35
|
void this.#plugin
|
|
34
36
|
.run((plugin) => {
|
|
35
37
|
this.#picker = new MeasurementPicker(plugin, onMeasure, moleculeStructure);
|
|
38
|
+
this.#painter = new HighlightPainter(plugin, MODEL_REPRESENTATION_REF);
|
|
36
39
|
})
|
|
37
40
|
.catch(ignore);
|
|
38
41
|
}
|
|
@@ -82,6 +85,18 @@ export class Molecule3DViewer {
|
|
|
82
85
|
showMeasurements(measurements) {
|
|
83
86
|
return this.#run((plugin) => renderMeasurements(plugin, measurements, moleculeStructure));
|
|
84
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Emphasise exactly these paths of atoms on the model — this one and every
|
|
90
|
+
* one drawn after it — without redrawing the scene or moving the camera.
|
|
91
|
+
* @param highlights - Replaces what is emphasised; empty restores the model.
|
|
92
|
+
* @param color - What they are painted in, as `#rrggbb`.
|
|
93
|
+
* @returns Nothing; resolves once the model is repainted.
|
|
94
|
+
*/
|
|
95
|
+
setHighlights(highlights, color) {
|
|
96
|
+
return this.#run(() => {
|
|
97
|
+
this.#painter?.set(highlights, Color.fromHexStyle(color));
|
|
98
|
+
});
|
|
99
|
+
}
|
|
85
100
|
/**
|
|
86
101
|
* Make clicks on atoms build a measurement, or give them back to the camera.
|
|
87
102
|
* @param kind - The measurement to build, or `null`.
|
|
@@ -151,6 +166,7 @@ export class Molecule3DViewer {
|
|
|
151
166
|
/** Tear the viewer down and release its WebGL context. Idempotent. */
|
|
152
167
|
dispose() {
|
|
153
168
|
this.#picker?.dispose();
|
|
169
|
+
this.#painter?.dispose();
|
|
154
170
|
this.#plugin.dispose();
|
|
155
171
|
}
|
|
156
172
|
#run(action) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"viewer.js","sourceRoot":"","sources":["../../../src/molecule3d/ui/viewer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAE5D,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,EAClB,OAAO,GACR,MAAM,6BAA6B,CAAC;AAOrC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EACL,wBAAwB,EACxB,aAAa,EACb,iBAAiB,EACjB,cAAc,GACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAOjE;;;GAGG;AACH,MAAM,OAAO,gBAAgB;IAClB,OAAO,CAAgB;IAChC,OAAO,CAAgC;IACvC,QAAQ,CAA+B;IAEvC,0EAA0E;IACjE,KAAK,CAAgB;IAE9B;;;;OAIG;IACH,YAAY,SAAsB,EAAE,UAAmC,EAAE;QACvE,MAAM,EAAE,UAAU,EAAE,SAAS,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC;QACnD,IAAI,CAAC,OAAO,GAAG,IAAI,aAAa,CAAC,SAAS,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QAC5D,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O,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,QAAiB,EAAE,KAAK,GAAG,kBAAkB;QACnD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE;YAC1B,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;QACnC,CAAC,CAAC,CAAC;IACL,CAAC;IAED,kEAAkE;IAClE,YAAY;QACV,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9B,CAAC;IAED,sEAAsE;IACtE,OAAO;QACL,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC;QACxB,IAAI,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;IAED,IAAI,CACF,MAA2D;QAE3D,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF;AAED,SAAS,MAAM;IACb,iBAAiB;AACnB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Atoms and bonds of the displayed molecule emphasised in one colour, for as
|
|
3
|
+
* long as a site keeps pointing at them.
|
|
4
|
+
*
|
|
5
|
+
* Neither of molstar's own markings fits: its hover highlight is erased by the
|
|
6
|
+
* next move of the pointer, and its selection belongs to the measuring tools.
|
|
7
|
+
* This is an overpaint of the model's own representation instead, so it
|
|
8
|
+
* follows the model in every style, survives the hover, and leaves the camera
|
|
9
|
+
* and every other drawing alone.
|
|
10
|
+
*
|
|
11
|
+
* molstar paints an atom and every half-bond leaving it from one element loci,
|
|
12
|
+
* which would tint the C–C bonds of a row that names only C–H ones. So the
|
|
13
|
+
* overpaint has three layers: the atoms, then those half-bonds cleared again,
|
|
14
|
+
* then exactly the bonds the paths name, as bond loci.
|
|
15
|
+
*/
|
|
16
|
+
import type { Structure } from 'molstar/lib/mol-model/structure.js';
|
|
17
|
+
import { Bond, StructureElement } from 'molstar/lib/mol-model/structure.js';
|
|
18
|
+
import type { PluginContext } from 'molstar/lib/mol-plugin/context.js';
|
|
19
|
+
import { Overpaint } from 'molstar/lib/mol-theme/overpaint.js';
|
|
20
|
+
import type { Color } from 'molstar/lib/mol-util/color/color.js';
|
|
21
|
+
import type { Molecule3DHighlight } from '../../molecule3d/core/highlight.ts';
|
|
22
|
+
/** The loci an overpaint layer of {@link highlightOverpaint} holds. */
|
|
23
|
+
type HighlightLoci = StructureElement.Loci | Bond.Loci;
|
|
24
|
+
/**
|
|
25
|
+
* The overpaint that emphasises `highlights` on a representation of
|
|
26
|
+
* `structure`: their atoms, and exactly the bonds between consecutive atoms of
|
|
27
|
+
* each path.
|
|
28
|
+
* @param structure - The structure the representation is drawn from.
|
|
29
|
+
* @param highlights - The paths; an atom the structure lacks is skipped.
|
|
30
|
+
* @param color - What they are painted in.
|
|
31
|
+
* @returns The overpaint, empty when no atom is left to paint.
|
|
32
|
+
*/
|
|
33
|
+
export declare function highlightOverpaint(structure: Structure, highlights: readonly Molecule3DHighlight[], color: Color): Overpaint<HighlightLoci>;
|
|
34
|
+
/**
|
|
35
|
+
* Keeps one representation of the state tree painted with the highlights a
|
|
36
|
+
* site asks for: the one there now, and every one built under the same ref
|
|
37
|
+
* afterwards, so a restyled model or a new conformer comes up already painted.
|
|
38
|
+
*/
|
|
39
|
+
export declare class HighlightPainter {
|
|
40
|
+
#private;
|
|
41
|
+
/**
|
|
42
|
+
* Start following the representation at `representationRef`.
|
|
43
|
+
* @param plugin - The molstar context.
|
|
44
|
+
* @param representationRef - State-tree ref of the representation to paint.
|
|
45
|
+
*/
|
|
46
|
+
constructor(plugin: PluginContext, representationRef: string);
|
|
47
|
+
/**
|
|
48
|
+
* Paint exactly these highlights, in place of the ones painted.
|
|
49
|
+
* @param highlights - The paths; an empty list restores the plain model.
|
|
50
|
+
* @param color - What they are painted in.
|
|
51
|
+
*/
|
|
52
|
+
set(highlights: readonly Molecule3DHighlight[], color: Color): void;
|
|
53
|
+
/** Stop following the representation. */
|
|
54
|
+
dispose(): void;
|
|
55
|
+
}
|
|
56
|
+
export {};
|
|
57
|
+
//# sourceMappingURL=highlights.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"highlights.d.ts","sourceRoot":"","sources":["../../../src/molstar/core/highlights.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EACL,IAAI,EACJ,gBAAgB,EAEjB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGvE,OAAO,EAAE,SAAS,EAAE,MAAM,oCAAoC,CAAC;AAC/D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qCAAqC,CAAC;AAEjE,OAAO,KAAK,EAEV,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAY5C,uEAAuE;AACvE,KAAK,aAAa,GAAG,gBAAgB,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;AAEvD;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,SAAS,EACpB,UAAU,EAAE,SAAS,mBAAmB,EAAE,EAC1C,KAAK,EAAE,KAAK,GACX,SAAS,CAAC,aAAa,CAAC,CAgB1B;AAED;;;;GAIG;AACH,qBAAa,gBAAgB;;IAO3B;;;;OAIG;gBACS,MAAM,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM;IAgB5D;;;;OAIG;IACH,GAAG,CAAC,UAAU,EAAE,SAAS,mBAAmB,EAAE,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IASnE,yCAAyC;IACzC,OAAO,IAAI,IAAI;CAwBhB"}
|