react-cheminfo 0.2.0 → 0.3.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/README.md +47 -6
- package/lib/core.d.ts +1 -0
- package/lib/core.d.ts.map +1 -1
- package/lib/core.js +1 -0
- package/lib/core.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +18 -0
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/glyphs.d.ts +16 -0
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -0
- package/lib/ecosystem/ui/glyphs.js +41 -0
- package/lib/ecosystem/ui/glyphs.js.map +1 -0
- package/lib/ecosystem/ui/marks.d.ts.map +1 -1
- package/lib/ecosystem/ui/marks.js +2 -33
- package/lib/ecosystem/ui/marks.js.map +1 -1
- package/lib/orbital/core/atomicGrid.d.ts +58 -0
- package/lib/orbital/core/atomicGrid.d.ts.map +1 -0
- package/lib/orbital/core/atomicGrid.js +69 -0
- package/lib/orbital/core/atomicGrid.js.map +1 -0
- package/lib/orbital/core/atomicOrbitals.d.ts +97 -0
- package/lib/orbital/core/atomicOrbitals.d.ts.map +1 -0
- package/lib/orbital/core/atomicOrbitals.js +135 -0
- package/lib/orbital/core/atomicOrbitals.js.map +1 -0
- package/lib/orbital/core/constants.d.ts +33 -0
- package/lib/orbital/core/constants.d.ts.map +1 -0
- package/lib/orbital/core/constants.js +21 -0
- package/lib/orbital/core/constants.js.map +1 -0
- package/lib/orbital/core/electronConfiguration.d.ts +106 -0
- package/lib/orbital/core/electronConfiguration.d.ts.map +1 -0
- package/lib/orbital/core/electronConfiguration.js +207 -0
- package/lib/orbital/core/electronConfiguration.js.map +1 -0
- package/lib/orbital/core/grid.d.ts +60 -0
- package/lib/orbital/core/grid.d.ts.map +1 -0
- package/lib/orbital/core/grid.js +81 -0
- package/lib/orbital/core/grid.js.map +1 -0
- package/lib/orbital/core/hydrogenic.d.ts +99 -0
- package/lib/orbital/core/hydrogenic.d.ts.map +1 -0
- package/lib/orbital/core/hydrogenic.js +181 -0
- package/lib/orbital/core/hydrogenic.js.map +1 -0
- package/lib/orbital/core/index.d.ts +22 -0
- package/lib/orbital/core/index.d.ts.map +1 -0
- package/lib/orbital/core/index.js +12 -0
- package/lib/orbital/core/index.js.map +1 -0
- package/lib/orbital/core/numerics.d.ts +39 -0
- package/lib/orbital/core/numerics.d.ts.map +1 -0
- package/lib/orbital/core/numerics.js +75 -0
- package/lib/orbital/core/numerics.js.map +1 -0
- package/lib/orbital/core/occupancy.d.ts +44 -0
- package/lib/orbital/core/occupancy.d.ts.map +1 -0
- package/lib/orbital/core/occupancy.js +85 -0
- package/lib/orbital/core/occupancy.js.map +1 -0
- package/lib/orbital/core/palette.d.ts +36 -0
- package/lib/orbital/core/palette.d.ts.map +1 -0
- package/lib/orbital/core/palette.js +37 -0
- package/lib/orbital/core/palette.js.map +1 -0
- package/lib/orbital/core/realHarmonics.d.ts +57 -0
- package/lib/orbital/core/realHarmonics.d.ts.map +1 -0
- package/lib/orbital/core/realHarmonics.js +144 -0
- package/lib/orbital/core/realHarmonics.js.map +1 -0
- package/lib/orbital/core/sample.d.ts +52 -0
- package/lib/orbital/core/sample.d.ts.map +1 -0
- package/lib/orbital/core/sample.js +54 -0
- package/lib/orbital/core/sample.js.map +1 -0
- package/lib/orbital/core/screening.d.ts +46 -0
- package/lib/orbital/core/screening.d.ts.map +1 -0
- package/lib/orbital/core/screening.js +72 -0
- package/lib/orbital/core/screening.js.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +57 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.js +105 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +73 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.js +49 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -0
- package/lib/orbital/ui/camera.d.ts +36 -0
- package/lib/orbital/ui/camera.d.ts.map +1 -0
- package/lib/orbital/ui/camera.js +98 -0
- package/lib/orbital/ui/camera.js.map +1 -0
- package/lib/orbital/ui/capability.d.ts +28 -0
- package/lib/orbital/ui/capability.d.ts.map +1 -0
- package/lib/orbital/ui/capability.js +77 -0
- package/lib/orbital/ui/capability.js.map +1 -0
- package/lib/orbital/ui/index.d.ts +17 -0
- package/lib/orbital/ui/index.d.ts.map +1 -0
- package/lib/orbital/ui/index.js +13 -0
- package/lib/orbital/ui/index.js.map +1 -0
- package/lib/orbital/ui/renderVolume.d.ts +57 -0
- package/lib/orbital/ui/renderVolume.d.ts.map +1 -0
- package/lib/orbital/ui/renderVolume.js +120 -0
- package/lib/orbital/ui/renderVolume.js.map +1 -0
- package/lib/orbital/ui/viewer.d.ts +86 -0
- package/lib/orbital/ui/viewer.d.ts.map +1 -0
- package/lib/orbital/ui/viewer.js +155 -0
- package/lib/orbital/ui/viewer.js.map +1 -0
- package/lib/orbital/ui/volumeField.d.ts +49 -0
- package/lib/orbital/ui/volumeField.d.ts.map +1 -0
- package/lib/orbital/ui/volumeField.js +108 -0
- package/lib/orbital/ui/volumeField.js.map +1 -0
- package/lib/orbital.d.ts +11 -0
- package/lib/orbital.d.ts.map +1 -0
- package/lib/orbital.js +11 -0
- package/lib/orbital.js.map +1 -0
- package/package.json +11 -3
- package/src/core.ts +1 -0
- package/src/ecosystem/core/sites.ts +21 -1
- package/src/ecosystem/ui/glyphs.tsx +246 -0
- package/src/ecosystem/ui/marks.tsx +4 -201
- package/src/orbital/core/atomicGrid.ts +115 -0
- package/src/orbital/core/atomicOrbitals.ts +212 -0
- package/src/orbital/core/constants.ts +36 -0
- package/src/orbital/core/electronConfiguration.ts +242 -0
- package/src/orbital/core/grid.ts +126 -0
- package/src/orbital/core/hydrogenic.ts +222 -0
- package/src/orbital/core/index.ts +72 -0
- package/src/orbital/core/numerics.ts +79 -0
- package/src/orbital/core/occupancy.ts +100 -0
- package/src/orbital/core/palette.ts +56 -0
- package/src/orbital/core/realHarmonics.ts +172 -0
- package/src/orbital/core/sample.ts +91 -0
- package/src/orbital/core/screening.ts +90 -0
- package/src/orbital/ui/AtomicOrbitalCanvas.tsx +181 -0
- package/src/orbital/ui/AtomicOrbitalViewer.tsx +150 -0
- package/src/orbital/ui/camera.ts +125 -0
- package/src/orbital/ui/capability.ts +102 -0
- package/src/orbital/ui/index.ts +17 -0
- package/src/orbital/ui/renderVolume.ts +190 -0
- package/src/orbital/ui/viewer.ts +186 -0
- package/src/orbital/ui/volumeField.ts +128 -0
- package/src/orbital.ts +11 -0
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How the electrons of one atom are laid out over its orbitals, and the two
|
|
3
|
+
* adjustments a *virtual* orbital needs.
|
|
4
|
+
*
|
|
5
|
+
* Split out of `atomicOrbitals.ts` so that module stays what it says it is —
|
|
6
|
+
* the join of a configuration, a screening, a radial function and a harmonic —
|
|
7
|
+
* with none of the bookkeeping in the way.
|
|
8
|
+
*/
|
|
9
|
+
import { groupRank } from "./screening.js";
|
|
10
|
+
/** No known element occupies a shell above n = 7. */
|
|
11
|
+
const HIGHEST_SHELL = 7;
|
|
12
|
+
/**
|
|
13
|
+
* Slater's rules can hand a badly-screened orbital a charge at or below zero —
|
|
14
|
+
* a 7p on hydrogen, say — which has no bound hydrogen-like solution. Clamping
|
|
15
|
+
* to a small positive charge keeps such an orbital enormous and diffuse, which
|
|
16
|
+
* is the honest picture, rather than throwing.
|
|
17
|
+
*/
|
|
18
|
+
export const MINIMUM_CHARGE = 0.3;
|
|
19
|
+
/**
|
|
20
|
+
* Spread electrons over the orbitals of a subshell by Hund's rule.
|
|
21
|
+
* @param electrons - Electrons in the subshell.
|
|
22
|
+
* @param orbitalCount - `2ℓ + 1`.
|
|
23
|
+
* @returns One count per orbital: singles first, then pairs.
|
|
24
|
+
*/
|
|
25
|
+
export function hundDistribution(electrons, orbitalCount) {
|
|
26
|
+
const spread = new Array(orbitalCount).fill(0);
|
|
27
|
+
const capacity = orbitalCount * 2;
|
|
28
|
+
let left = Math.min(electrons, capacity);
|
|
29
|
+
for (let pass = 0; pass < 2 && left > 0; pass++) {
|
|
30
|
+
for (let index = 0; index < orbitalCount && left > 0; index++) {
|
|
31
|
+
spread[index] = spread[index] + 1;
|
|
32
|
+
left -= 1;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return spread;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* How far up the list goes when the caller does not say.
|
|
39
|
+
* @param valenceShell - Outermost occupied shell.
|
|
40
|
+
* @returns One shell past it, never below 4 and never above 7.
|
|
41
|
+
*/
|
|
42
|
+
export function defaultMaximumShell(valenceShell) {
|
|
43
|
+
return Math.min(HIGHEST_SHELL, Math.max(4, valenceShell + 1));
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The configuration with one electron taken out of the outermost occupied
|
|
47
|
+
* subshell — the atom as it is while one of its electrons sits in a virtual
|
|
48
|
+
* orbital.
|
|
49
|
+
* @param configuration - The ground-state configuration to reduce.
|
|
50
|
+
* @returns The reduced configuration, empty subshells dropped.
|
|
51
|
+
*/
|
|
52
|
+
export function withoutOutermostElectron(configuration) {
|
|
53
|
+
let outermost = -1;
|
|
54
|
+
for (let index = 0; index < configuration.length; index++) {
|
|
55
|
+
const entry = configuration[index];
|
|
56
|
+
const best = configuration[outermost];
|
|
57
|
+
if (outermost === -1 ||
|
|
58
|
+
best === undefined ||
|
|
59
|
+
groupRank(entry) > groupRank(best)) {
|
|
60
|
+
outermost = index;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const reduced = [];
|
|
64
|
+
for (let index = 0; index < configuration.length; index++) {
|
|
65
|
+
const entry = configuration[index];
|
|
66
|
+
const electrons = index === outermost ? entry.electrons - 1 : entry.electrons;
|
|
67
|
+
if (electrons > 0)
|
|
68
|
+
reduced.push({ ...entry, electrons });
|
|
69
|
+
}
|
|
70
|
+
return reduced;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* The outermost shell an atom actually occupies.
|
|
74
|
+
* @param configuration - Its configuration.
|
|
75
|
+
* @returns The largest `n` holding an electron.
|
|
76
|
+
*/
|
|
77
|
+
export function outermostShell(configuration) {
|
|
78
|
+
let outermost = 1;
|
|
79
|
+
for (const entry of configuration) {
|
|
80
|
+
if (entry.electrons > 0 && entry.n > outermost)
|
|
81
|
+
outermost = entry.n;
|
|
82
|
+
}
|
|
83
|
+
return outermost;
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=occupancy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"occupancy.js","sourceRoot":"","sources":["../../../src/orbital/core/occupancy.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE3C,qDAAqD;AACrD,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,CAAC;AAElC;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAC9B,SAAiB,EACjB,YAAoB;IAEpB,MAAM,MAAM,GAAG,IAAI,KAAK,CAAS,YAAY,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACvD,MAAM,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;IAClC,IAAI,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACzC,KAAK,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;QAChD,KAAK,IAAI,KAAK,GAAG,C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,KAAK,CAAC,SAAS,CAAC;QAC9D,IAAI,SAAS,GAAG,CAAC;YAAE,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3D,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAC5B,aAA2C;IAE3C,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;QAClC,IAAI,KAAK,CAAC,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC,GAAG,SAAS;YAAE,SAAS,GAAG,KAAK,CAAC,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colours for orbital phases and nodal surfaces.
|
|
3
|
+
*
|
|
4
|
+
* Plain data: the renderer picks a palette, this module says what the hex
|
|
5
|
+
* values are. Two phase palettes ship, and both are first-class — around 8% of
|
|
6
|
+
* male students have a red/green or red/blue-at-low-luminance deficiency, so
|
|
7
|
+
* the blue/yellow pair is a supported choice, not a fallback.
|
|
8
|
+
*/
|
|
9
|
+
/** Which pair of phase colours the viewer uses. */
|
|
10
|
+
export type PhasePaletteId = 'textbook' | 'colourBlindSafe';
|
|
11
|
+
/** The colours one phase palette provides. */
|
|
12
|
+
export interface PhasePalette {
|
|
13
|
+
id: PhasePaletteId;
|
|
14
|
+
/** Name shown in the palette picker. */
|
|
15
|
+
label: string;
|
|
16
|
+
/** Lobe where the wavefunction is positive. */
|
|
17
|
+
positive: string;
|
|
18
|
+
/** Lobe where the wavefunction is negative. */
|
|
19
|
+
negative: string;
|
|
20
|
+
/** Lobe drawn with the `phase` display flag off. */
|
|
21
|
+
neutral: string;
|
|
22
|
+
/** Translucent disc marking a nodal plane. */
|
|
23
|
+
node: string;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The two phase palettes.
|
|
27
|
+
*
|
|
28
|
+
* `textbook` is the blue/red of printed MO diagrams and of Jmol's signed
|
|
29
|
+
* isosurfaces; `colourBlindSafe` swaps the negative lobe for the amber of the
|
|
30
|
+
* Okabe-Ito qualitative palette, which stays separable under protanopia,
|
|
31
|
+
* deuteranopia and tritanopia.
|
|
32
|
+
*/
|
|
33
|
+
export declare const PHASE_PALETTES: Record<PhasePaletteId, PhasePalette>;
|
|
34
|
+
/** Palette used until the student picks another one. */
|
|
35
|
+
export declare const DEFAULT_PHASE_PALETTE_ID: PhasePaletteId;
|
|
36
|
+
//# sourceMappingURL=palette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/palette.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,iBAAiB,CAAC;AAE5D,8CAA8C;AAC9C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,cAAc,CAAC;IACnB,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,+CAA+C;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,cAAc,EAAE,YAAY,CAiB/D,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,wBAAwB,EAAE,cAA2B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Colours for orbital phases and nodal surfaces.
|
|
3
|
+
*
|
|
4
|
+
* Plain data: the renderer picks a palette, this module says what the hex
|
|
5
|
+
* values are. Two phase palettes ship, and both are first-class — around 8% of
|
|
6
|
+
* male students have a red/green or red/blue-at-low-luminance deficiency, so
|
|
7
|
+
* the blue/yellow pair is a supported choice, not a fallback.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* The two phase palettes.
|
|
11
|
+
*
|
|
12
|
+
* `textbook` is the blue/red of printed MO diagrams and of Jmol's signed
|
|
13
|
+
* isosurfaces; `colourBlindSafe` swaps the negative lobe for the amber of the
|
|
14
|
+
* Okabe-Ito qualitative palette, which stays separable under protanopia,
|
|
15
|
+
* deuteranopia and tritanopia.
|
|
16
|
+
*/
|
|
17
|
+
export const PHASE_PALETTES = {
|
|
18
|
+
textbook: {
|
|
19
|
+
id: 'textbook',
|
|
20
|
+
label: 'Blue / red (textbook)',
|
|
21
|
+
positive: '#2563eb',
|
|
22
|
+
negative: '#dc2626',
|
|
23
|
+
neutral: '#9ca3af',
|
|
24
|
+
node: '#64748b',
|
|
25
|
+
},
|
|
26
|
+
colourBlindSafe: {
|
|
27
|
+
id: 'colourBlindSafe',
|
|
28
|
+
label: 'Blue / yellow (colour-blind safe)',
|
|
29
|
+
positive: '#0072b2',
|
|
30
|
+
negative: '#e69f00',
|
|
31
|
+
neutral: '#9ca3af',
|
|
32
|
+
node: '#56606b',
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
/** Palette used until the student picks another one. */
|
|
36
|
+
export const DEFAULT_PHASE_PALETTE_ID = 'textbook';
|
|
37
|
+
//# sourceMappingURL=palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.js","sourceRoot":"","sources":["../../../src/orbital/core/palette.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAoBH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,cAAc,GAAyC;IAClE,QAAQ,EAAE;QACR,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;IACD,eAAe,EAAE;QACf,EAAE,EAAE,iBAAiB;QACrB,KAAK,EAAE,mCAAmC;QAC1C,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,SAAS;QAClB,IAAI,EAAE,SAAS;KAChB;CACF,CAAC;AAEF,wDAAwD;AACxD,MAAM,CAAC,MAAM,wBAAwB,GAAmB,UAAU,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The real spherical harmonics, ℓ = 0 to 3, written as cartesian ratios.
|
|
3
|
+
*
|
|
4
|
+
* These are the angular halves of the orbitals a chemist draws: the real
|
|
5
|
+
* combinations `p_x, p_y, p_z` rather than the complex `m = −1, 0, +1`, because
|
|
6
|
+
* only the real ones have the lobes along axes that a bond can point at.
|
|
7
|
+
*
|
|
8
|
+
* Each is normalised so that `∫|Y|² dΩ = 1` over the unit sphere, and each is
|
|
9
|
+
* given `(x, y, z)` in ångström together with their length, so sampling a grid
|
|
10
|
+
* never calls `acos` or `atan2`. The number of angular nodes is exactly ℓ, and
|
|
11
|
+
* this file is where that fact becomes visible: `s` has none, every `p` has one
|
|
12
|
+
* plane, every `d` two surfaces, every `f` three.
|
|
13
|
+
*
|
|
14
|
+
* `key` is ascii and appears in a URL — `#/elements/Fe/3dx2-y2`; `label` is the
|
|
15
|
+
* typeset subscript a student reads.
|
|
16
|
+
*/
|
|
17
|
+
/** Subshell letter for an angular momentum, `s p d f`. */
|
|
18
|
+
export declare const SUBSHELL_LETTERS: readonly ["s", "p", "d", "f"];
|
|
19
|
+
/** One real spherical harmonic. */
|
|
20
|
+
export interface RealHarmonic {
|
|
21
|
+
/** Angular momentum quantum number, also the count of angular nodes. */
|
|
22
|
+
l: number;
|
|
23
|
+
/** Ascii subscript, url-safe: `x`, `z2`, `x2-y2`, `y_3x2-y2`. */
|
|
24
|
+
key: string;
|
|
25
|
+
/** Typeset subscript, e.g. `x²−y²`. Empty for `s`. */
|
|
26
|
+
label: string;
|
|
27
|
+
/**
|
|
28
|
+
* Value of the harmonic at a point.
|
|
29
|
+
* @param x - Offset from the nucleus along x, ångström.
|
|
30
|
+
* @param y - Offset from the nucleus along y, ångström.
|
|
31
|
+
* @param z - Offset from the nucleus along z, ångström.
|
|
32
|
+
* @param radius - Length of `(x, y, z)`, passed in because the caller has
|
|
33
|
+
* already computed it for the radial part.
|
|
34
|
+
* @returns The dimensionless amplitude; 0 at the nucleus for ℓ > 0.
|
|
35
|
+
*/
|
|
36
|
+
evaluate: (x: number, y: number, z: number, radius: number) => number;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The harmonics of one shell, indexed by ℓ: `REAL_HARMONICS[2]` is the five d
|
|
40
|
+
* functions. The order inside a shell is the one the orbital list shows.
|
|
41
|
+
*/
|
|
42
|
+
export declare const REAL_HARMONICS: RealHarmonic[][];
|
|
43
|
+
/**
|
|
44
|
+
* The harmonics of one subshell.
|
|
45
|
+
* @param l - Angular momentum quantum number, 0 to 3.
|
|
46
|
+
* @returns Its `2ℓ + 1` real harmonics, in list order.
|
|
47
|
+
* @throws {Error} When ℓ is outside the s, p, d and f shells this site draws.
|
|
48
|
+
*/
|
|
49
|
+
export declare function harmonicsOf(l: number): RealHarmonic[];
|
|
50
|
+
/**
|
|
51
|
+
* The letter naming a subshell.
|
|
52
|
+
* @param l - Angular momentum quantum number, 0 to 3.
|
|
53
|
+
* @returns `s`, `p`, `d` or `f`.
|
|
54
|
+
* @throws {Error} When ℓ is outside them.
|
|
55
|
+
*/
|
|
56
|
+
export declare function subshellLetter(l: number): string;
|
|
57
|
+
//# sourceMappingURL=realHarmonics.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realHarmonics.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/realHarmonics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0DAA0D;AAC1D,eAAO,MAAM,gBAAgB,+BAAgC,CAAC;AAE9D,mCAAmC;AACnC,MAAM,WAAW,YAAY;IAC3B,wEAAwE;IACxE,CAAC,EAAE,MAAM,CAAC;IACV,iEAAiE;IACjE,GAAG,EAAE,MAAM,CAAC;IACZ,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd;;;;;;;;OAQG;IACH,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACvE;AAeD;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EAAE,EAsF1C,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAMrD;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAMhD"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The real spherical harmonics, ℓ = 0 to 3, written as cartesian ratios.
|
|
3
|
+
*
|
|
4
|
+
* These are the angular halves of the orbitals a chemist draws: the real
|
|
5
|
+
* combinations `p_x, p_y, p_z` rather than the complex `m = −1, 0, +1`, because
|
|
6
|
+
* only the real ones have the lobes along axes that a bond can point at.
|
|
7
|
+
*
|
|
8
|
+
* Each is normalised so that `∫|Y|² dΩ = 1` over the unit sphere, and each is
|
|
9
|
+
* given `(x, y, z)` in ångström together with their length, so sampling a grid
|
|
10
|
+
* never calls `acos` or `atan2`. The number of angular nodes is exactly ℓ, and
|
|
11
|
+
* this file is where that fact becomes visible: `s` has none, every `p` has one
|
|
12
|
+
* plane, every `d` two surfaces, every `f` three.
|
|
13
|
+
*
|
|
14
|
+
* `key` is ascii and appears in a URL — `#/elements/Fe/3dx2-y2`; `label` is the
|
|
15
|
+
* typeset subscript a student reads.
|
|
16
|
+
*/
|
|
17
|
+
/** Subshell letter for an angular momentum, `s p d f`. */
|
|
18
|
+
export const SUBSHELL_LETTERS = ['s', 'p', 'd', 'f'];
|
|
19
|
+
const FOUR_PI = 4 * Math.PI;
|
|
20
|
+
const S = Math.sqrt(1 / FOUR_PI);
|
|
21
|
+
const P = Math.sqrt(3 / FOUR_PI);
|
|
22
|
+
const D_Z2 = Math.sqrt(5 / (16 * Math.PI));
|
|
23
|
+
const D_PLANAR = Math.sqrt(15 / FOUR_PI);
|
|
24
|
+
const D_X2Y2 = Math.sqrt(15 / (16 * Math.PI));
|
|
25
|
+
const F_Z3 = Math.sqrt(7 / (16 * Math.PI));
|
|
26
|
+
const F_XZ2 = Math.sqrt(21 / (32 * Math.PI));
|
|
27
|
+
const F_ZX2Y2 = Math.sqrt(105 / (16 * Math.PI));
|
|
28
|
+
const F_XYZ = Math.sqrt(105 / FOUR_PI);
|
|
29
|
+
const F_CUBIC = Math.sqrt(35 / (32 * Math.PI));
|
|
30
|
+
/**
|
|
31
|
+
* The harmonics of one shell, indexed by ℓ: `REAL_HARMONICS[2]` is the five d
|
|
32
|
+
* functions. The order inside a shell is the one the orbital list shows.
|
|
33
|
+
*/
|
|
34
|
+
export const REAL_HARMONICS = [
|
|
35
|
+
[{ l: 0, key: '', label: '', evaluate: () => S }],
|
|
36
|
+
[
|
|
37
|
+
{ l: 1, key: 'x', label: 'x', evaluate: (x, y, z, r) => (P * x) / r },
|
|
38
|
+
{ l: 1, key: 'y', label: 'y', evaluate: (x, y, z, r) => (P * y) / r },
|
|
39
|
+
{ l: 1, key: 'z', label: 'z', evaluate: (x, y, z, r) => (P * z) / r },
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
{
|
|
43
|
+
l: 2,
|
|
44
|
+
key: 'z2',
|
|
45
|
+
label: 'z²',
|
|
46
|
+
evaluate: (x, y, z, r) => (D_Z2 * (3 * z * z - r * r)) / (r * r),
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
l: 2,
|
|
50
|
+
key: 'xz',
|
|
51
|
+
label: 'xz',
|
|
52
|
+
evaluate: (x, y, z, r) => (D_PLANAR * x * z) / (r * r),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
l: 2,
|
|
56
|
+
key: 'yz',
|
|
57
|
+
label: 'yz',
|
|
58
|
+
evaluate: (x, y, z, r) => (D_PLANAR * y * z) / (r * r),
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
l: 2,
|
|
62
|
+
key: 'xy',
|
|
63
|
+
label: 'xy',
|
|
64
|
+
evaluate: (x, y, z, r) => (D_PLANAR * x * y) / (r * r),
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
l: 2,
|
|
68
|
+
key: 'x2-y2',
|
|
69
|
+
label: 'x²−y²',
|
|
70
|
+
evaluate: (x, y, z, r) => (D_X2Y2 * (x * x - y * y)) / (r * r),
|
|
71
|
+
},
|
|
72
|
+
],
|
|
73
|
+
[
|
|
74
|
+
{
|
|
75
|
+
l: 3,
|
|
76
|
+
key: 'z3',
|
|
77
|
+
label: 'z³',
|
|
78
|
+
evaluate: (x, y, z, r) => (F_Z3 * z * (5 * z * z - 3 * r * r)) / (r * r * r),
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
l: 3,
|
|
82
|
+
key: 'xz2',
|
|
83
|
+
label: 'xz²',
|
|
84
|
+
evaluate: (x, y, z, r) => (F_XZ2 * x * (5 * z * z - r * r)) / (r * r * r),
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
l: 3,
|
|
88
|
+
key: 'yz2',
|
|
89
|
+
label: 'yz²',
|
|
90
|
+
evaluate: (x, y, z, r) => (F_XZ2 * y * (5 * z * z - r * r)) / (r * r * r),
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
l: 3,
|
|
94
|
+
key: 'xyz',
|
|
95
|
+
label: 'xyz',
|
|
96
|
+
evaluate: (x, y, z, r) => (F_XYZ * x * y * z) / (r * r * r),
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
l: 3,
|
|
100
|
+
key: 'z_x2-y2',
|
|
101
|
+
label: 'z(x²−y²)',
|
|
102
|
+
evaluate: (x, y, z, r) => (F_ZX2Y2 * z * (x * x - y * y)) / (r * r * r),
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
l: 3,
|
|
106
|
+
key: 'x_x2-3y2',
|
|
107
|
+
label: 'x(x²−3y²)',
|
|
108
|
+
evaluate: (x, y, z, r) => (F_CUBIC * x * (x * x - 3 * y * y)) / (r * r * r),
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
l: 3,
|
|
112
|
+
key: 'y_3x2-y2',
|
|
113
|
+
label: 'y(3x²−y²)',
|
|
114
|
+
evaluate: (x, y, z, r) => (F_CUBIC * y * (3 * x * x - y * y)) / (r * r * r),
|
|
115
|
+
},
|
|
116
|
+
],
|
|
117
|
+
];
|
|
118
|
+
/**
|
|
119
|
+
* The harmonics of one subshell.
|
|
120
|
+
* @param l - Angular momentum quantum number, 0 to 3.
|
|
121
|
+
* @returns Its `2ℓ + 1` real harmonics, in list order.
|
|
122
|
+
* @throws {Error} When ℓ is outside the s, p, d and f shells this site draws.
|
|
123
|
+
*/
|
|
124
|
+
export function harmonicsOf(l) {
|
|
125
|
+
const shell = REAL_HARMONICS[l];
|
|
126
|
+
if (shell === undefined) {
|
|
127
|
+
throw new RangeError(`no real harmonics for angular momentum ${l}`);
|
|
128
|
+
}
|
|
129
|
+
return shell;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* The letter naming a subshell.
|
|
133
|
+
* @param l - Angular momentum quantum number, 0 to 3.
|
|
134
|
+
* @returns `s`, `p`, `d` or `f`.
|
|
135
|
+
* @throws {Error} When ℓ is outside them.
|
|
136
|
+
*/
|
|
137
|
+
export function subshellLetter(l) {
|
|
138
|
+
const letter = SUBSHELL_LETTERS[l];
|
|
139
|
+
if (letter === undefined) {
|
|
140
|
+
throw new RangeError(`no subshell letter for angular momentum ${l}`);
|
|
141
|
+
}
|
|
142
|
+
return letter;
|
|
143
|
+
}
|
|
144
|
+
//# sourceMappingURL=realHarmonics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realHarmonics.js","sourceRoot":"","sources":["../../../src/orbital/core/realHarmonics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,0DAA0D;AAC1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAU,CAAC;AAsB9D,MAAM,OAAO,GAAG,CAAC,GAAG,IAAI,CAAC,EAAE,CAAC;AAE5B,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;AACjC,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC;AACjC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,CAAC;AACzC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC9C,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;AAChD,MAA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AC;QACzB,MAAM,IAAI,UAAU,CAAC,2CAA2C,CAAC,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one job the viewer asks for, shaped so it can cross a worker boundary.
|
|
3
|
+
*
|
|
4
|
+
* The request carries an atomic number and an orbital id, never an
|
|
5
|
+
* `AtomicOrbital`: that object holds its spherical harmonic as a
|
|
6
|
+
* function*, which the structured clone algorithm cannot copy. Rebuilding the
|
|
7
|
+
* list from two plain values costs microseconds and keeps the boundary honest.
|
|
8
|
+
*
|
|
9
|
+
* A site that would rather not spend ~25 ms of its main thread per orbital
|
|
10
|
+
* implements this contract in a worker and hands `AtomicOrbitalViewer` the
|
|
11
|
+
* `sample` prop; one that does not gets the in-process version for free.
|
|
12
|
+
*/
|
|
13
|
+
import type { OrbitalGrid } from './grid.ts';
|
|
14
|
+
/** Which orbital to sample, and how finely. */
|
|
15
|
+
export interface AtomicSampleRequest {
|
|
16
|
+
/** Proton count, 1 to 118. */
|
|
17
|
+
atomicNumber: number;
|
|
18
|
+
/** Which orbital of that element, e.g. `3dz2`. */
|
|
19
|
+
orbitalId: string;
|
|
20
|
+
/**
|
|
21
|
+
* Samples along each edge of the cube. The cost is the cube of this.
|
|
22
|
+
* @default 56
|
|
23
|
+
*/
|
|
24
|
+
resolution?: number;
|
|
25
|
+
}
|
|
26
|
+
/** What one sampling job produces. */
|
|
27
|
+
export interface AtomicSampleResult {
|
|
28
|
+
/** The signed field, ready for an isosurface. */
|
|
29
|
+
grid: OrbitalGrid;
|
|
30
|
+
/** Radii of the orbital's radial nodes, ångström, ascending. */
|
|
31
|
+
nodeRadii: number[];
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Sample one atomic orbital onto a grid.
|
|
35
|
+
*
|
|
36
|
+
* Synchronous and free of React, molstar and the DOM, so it runs unchanged on
|
|
37
|
+
* the main thread, in a worker, and under vitest.
|
|
38
|
+
* @param request - See {@link AtomicSampleRequest}.
|
|
39
|
+
* @returns The field, and where its radial nodes are.
|
|
40
|
+
* @throws {Error} When the element or the orbital id names nothing.
|
|
41
|
+
*/
|
|
42
|
+
export declare function runAtomicSample(request: AtomicSampleRequest): AtomicSampleResult;
|
|
43
|
+
/** How a caller supplies the sampling — in process, or through a worker. */
|
|
44
|
+
export type AtomicSampler = (request: AtomicSampleRequest) => Promise<AtomicSampleResult>;
|
|
45
|
+
/**
|
|
46
|
+
* The default sampler: {@link runAtomicSample}, yielded to the event loop so
|
|
47
|
+
* the spinner has painted before the main thread is taken.
|
|
48
|
+
* @param request - See {@link AtomicSampleRequest}.
|
|
49
|
+
* @returns The field, and where its radial nodes are.
|
|
50
|
+
*/
|
|
51
|
+
export declare const sampleInProcess: AtomicSampler;
|
|
52
|
+
//# sourceMappingURL=sample.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAG7C,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,kDAAkD;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,sCAAsC;AACtC,MAAM,WAAW,kBAAkB;IACjC,iDAAiD;IACjD,IAAI,EAAE,WAAW,CAAC;IAClB,gEAAgE;IAChE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,mBAAmB,GAC3B,kBAAkB,CAiBpB;AAED,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG,CAC1B,OAAO,EAAE,mBAAmB,KACzB,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAEjC;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,aAK7B,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The one job the viewer asks for, shaped so it can cross a worker boundary.
|
|
3
|
+
*
|
|
4
|
+
* The request carries an atomic number and an orbital id, never an
|
|
5
|
+
* `AtomicOrbital`: that object holds its spherical harmonic as a
|
|
6
|
+
* function*, which the structured clone algorithm cannot copy. Rebuilding the
|
|
7
|
+
* list from two plain values costs microseconds and keeps the boundary honest.
|
|
8
|
+
*
|
|
9
|
+
* A site that would rather not spend ~25 ms of its main thread per orbital
|
|
10
|
+
* implements this contract in a worker and hands `AtomicOrbitalViewer` the
|
|
11
|
+
* `sample` prop; one that does not gets the in-process version for free.
|
|
12
|
+
*/
|
|
13
|
+
import { sampleAtomicOrbital } from "./atomicGrid.js";
|
|
14
|
+
import { atomicOrbitalsOf, findAtomicOrbital, hydrogenicParametersOf, } from "./atomicOrbitals.js";
|
|
15
|
+
import { radialNodeRadii } from "./hydrogenic.js";
|
|
16
|
+
/**
|
|
17
|
+
* Sample one atomic orbital onto a grid.
|
|
18
|
+
*
|
|
19
|
+
* Synchronous and free of React, molstar and the DOM, so it runs unchanged on
|
|
20
|
+
* the main thread, in a worker, and under vitest.
|
|
21
|
+
* @param request - See {@link AtomicSampleRequest}.
|
|
22
|
+
* @returns The field, and where its radial nodes are.
|
|
23
|
+
* @throws {Error} When the element or the orbital id names nothing.
|
|
24
|
+
*/
|
|
25
|
+
export function runAtomicSample(request) {
|
|
26
|
+
const { atomicNumber, orbitalId, resolution } = request;
|
|
27
|
+
const orbitals = atomicOrbitalsOf(atomicNumber);
|
|
28
|
+
const orbital = findAtomicOrbital(orbitals, orbitalId);
|
|
29
|
+
if (orbital === null) {
|
|
30
|
+
throw new Error(`Element ${atomicNumber} has no orbital ${orbitalId}. Known: ${orbitals
|
|
31
|
+
.map((entry) => entry.id)
|
|
32
|
+
.join(', ')}.`);
|
|
33
|
+
}
|
|
34
|
+
const options = {};
|
|
35
|
+
if (resolution !== undefined)
|
|
36
|
+
options.resolution = resolution;
|
|
37
|
+
return {
|
|
38
|
+
grid: sampleAtomicOrbital(orbital, options),
|
|
39
|
+
nodeRadii: radialNodeRadii(hydrogenicParametersOf(orbital)),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* The default sampler: {@link runAtomicSample}, yielded to the event loop so
|
|
44
|
+
* the spinner has painted before the main thread is taken.
|
|
45
|
+
* @param request - See {@link AtomicSampleRequest}.
|
|
46
|
+
* @returns The field, and where its radial nodes are.
|
|
47
|
+
*/
|
|
48
|
+
export const sampleInProcess = async (request) => {
|
|
49
|
+
await new Promise((resolve) => {
|
|
50
|
+
setTimeout(resolve, 0);
|
|
51
|
+
});
|
|
52
|
+
return runAtomicSample(request);
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=sample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sample.js","sourceRoot":"","sources":["../../../src/orbital/core/sample.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAuBlD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAC7B,OAA4B;IAE5B,MAAM,EAAE,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IACxD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAChD,MAAM,OAAO,GAAG,iBAAiB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IACvD,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,KAAK,CACb,WAAW,YAAY,mBAAmB,SAAS,YAAY,QAAQ;aACpE,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;aACxB,IAAI,CAAC,IAAI,CAAC,GAAG,CACjB,CAAC;IACJ,CAAC;IACD,MAAM,OAAO,GAAsB,EAAE,CAAC;IACtC,IAAI,UAAU,KAAK,SAAS;QAAE,OAAO,CAAC,UAAU,GAAG,UAAU,CAAC;IAC9D,OAAO;QACL,IAAI,EAAE,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC;QAC3C,SAAS,EAAE,eAAe,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;KAC5D,CAAC;AACJ,CAAC;AAOD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAkB,KAAK,EAAE,OAAO,EAAE,EAAE;IAC9D,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC5B,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IACzB,CAAC,CAAC,CAAC;IACH,OAAO,eAAe,CAAC,OAAO,CAAC,CAAC;AAClC,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slater's rules: how much of the nucleus an electron actually feels.
|
|
3
|
+
*
|
|
4
|
+
* A hydrogen-like orbital needs one number, the effective nuclear charge, and
|
|
5
|
+
* taking the full `Z` would draw carbon's 2p six times too small. Slater's rules
|
|
6
|
+
* estimate the shielding `S` from the other electrons, and `Z_eff = Z − S` is
|
|
7
|
+
* what the radial function is built with.
|
|
8
|
+
*
|
|
9
|
+
* They are an empirical fit from 1930, not a calculation — but they are the ones
|
|
10
|
+
* every general-chemistry course teaches, they reproduce the periodic trends
|
|
11
|
+
* that matter (Z_eff rises across a period, barely moves down a group), and a
|
|
12
|
+
* student can check the arithmetic here against the one they did by hand.
|
|
13
|
+
*
|
|
14
|
+
* The electrons are grouped as Slater grouped them, with s and p sharing a
|
|
15
|
+
* group and each d and f standing alone:
|
|
16
|
+
*
|
|
17
|
+
* ```
|
|
18
|
+
* [1s] [2s2p] [3s3p] [3d] [4s4p] [4d] [4f] [5s5p] [5d] [5f] [6s6p] [6d] [7s7p]
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
import type { Subshell, SubshellOccupancy } from './electronConfiguration.ts';
|
|
22
|
+
/** The shielding an orbital feels, and what is left of the nuclear charge. */
|
|
23
|
+
export interface Screening {
|
|
24
|
+
/** Sum of the shielding contributions, `S`. */
|
|
25
|
+
shielding: number;
|
|
26
|
+
/** `Z − S`, the charge the hydrogen-like radial function is built with. */
|
|
27
|
+
effectiveCharge: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Apply Slater's rules to one subshell of one atom.
|
|
31
|
+
* @param atomicNumber - Proton count, the `Z` the shielding is subtracted from.
|
|
32
|
+
* @param configuration - Every occupied subshell of the atom.
|
|
33
|
+
* @param subshell - The subshell whose electron is being screened.
|
|
34
|
+
* @returns Its shielding and effective nuclear charge.
|
|
35
|
+
*/
|
|
36
|
+
export declare function slaterScreening(atomicNumber: number, configuration: readonly SubshellOccupancy[], subshell: Subshell): Screening;
|
|
37
|
+
/**
|
|
38
|
+
* Where a subshell sits in Slater's left-to-right ordering of groups.
|
|
39
|
+
*
|
|
40
|
+
* s and p of the same shell share a group, so they share a rank; d and f each
|
|
41
|
+
* get their own, placed after the s/p group of the same `n`.
|
|
42
|
+
* @param subshell - The subshell to rank.
|
|
43
|
+
* @returns A comparable rank; equal ranks mean the same Slater group.
|
|
44
|
+
*/
|
|
45
|
+
export declare function groupRank(subshell: Subshell): number;
|
|
46
|
+
//# sourceMappingURL=screening.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screening.d.ts","sourceRoot":"","sources":["../../../src/orbital/core/screening.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE9E,8EAA8E;AAC9E,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,CAAC;IAClB,2EAA2E;IAC3E,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,MAAM,EACpB,aAAa,EAAE,SAAS,iBAAiB,EAAE,EAC3C,QAAQ,EAAE,QAAQ,GACjB,SAAS,CA+BX;AAED;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAEpD"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Slater's rules: how much of the nucleus an electron actually feels.
|
|
3
|
+
*
|
|
4
|
+
* A hydrogen-like orbital needs one number, the effective nuclear charge, and
|
|
5
|
+
* taking the full `Z` would draw carbon's 2p six times too small. Slater's rules
|
|
6
|
+
* estimate the shielding `S` from the other electrons, and `Z_eff = Z − S` is
|
|
7
|
+
* what the radial function is built with.
|
|
8
|
+
*
|
|
9
|
+
* They are an empirical fit from 1930, not a calculation — but they are the ones
|
|
10
|
+
* every general-chemistry course teaches, they reproduce the periodic trends
|
|
11
|
+
* that matter (Z_eff rises across a period, barely moves down a group), and a
|
|
12
|
+
* student can check the arithmetic here against the one they did by hand.
|
|
13
|
+
*
|
|
14
|
+
* The electrons are grouped as Slater grouped them, with s and p sharing a
|
|
15
|
+
* group and each d and f standing alone:
|
|
16
|
+
*
|
|
17
|
+
* ```
|
|
18
|
+
* [1s] [2s2p] [3s3p] [3d] [4s4p] [4d] [4f] [5s5p] [5d] [5f] [6s6p] [6d] [7s7p]
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* Apply Slater's rules to one subshell of one atom.
|
|
23
|
+
* @param atomicNumber - Proton count, the `Z` the shielding is subtracted from.
|
|
24
|
+
* @param configuration - Every occupied subshell of the atom.
|
|
25
|
+
* @param subshell - The subshell whose electron is being screened.
|
|
26
|
+
* @returns Its shielding and effective nuclear charge.
|
|
27
|
+
*/
|
|
28
|
+
export function slaterScreening(atomicNumber, configuration, subshell) {
|
|
29
|
+
const rank = groupRank(subshell);
|
|
30
|
+
const isCore = subshell.n === 1;
|
|
31
|
+
const isDiffuse = subshell.l >= 2;
|
|
32
|
+
let shielding = 0;
|
|
33
|
+
for (const occupied of configuration) {
|
|
34
|
+
const otherRank = groupRank(occupied);
|
|
35
|
+
if (otherRank > rank)
|
|
36
|
+
continue;
|
|
37
|
+
if (otherRank === rank) {
|
|
38
|
+
// An electron does not shield itself, so one is left out — but only from
|
|
39
|
+
// its *own* subshell. 2s and 2p share a group, and every one of carbon's
|
|
40
|
+
// two 2s electrons shields its 2p electron in full.
|
|
41
|
+
const others = Math.max(0, occupied.electrons - (sameSubshell(occupied, subshell) ? 1 : 0));
|
|
42
|
+
shielding += others * (isCore ? 0.3 : 0.35);
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
if (isDiffuse) {
|
|
46
|
+
// A d or f electron is screened completely by everything inside it.
|
|
47
|
+
shielding += occupied.electrons;
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
shielding +=
|
|
51
|
+
occupied.electrons * (occupied.n === subshell.n - 1 ? 0.85 : 1);
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
shielding,
|
|
55
|
+
effectiveCharge: atomicNumber - shielding,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Where a subshell sits in Slater's left-to-right ordering of groups.
|
|
60
|
+
*
|
|
61
|
+
* s and p of the same shell share a group, so they share a rank; d and f each
|
|
62
|
+
* get their own, placed after the s/p group of the same `n`.
|
|
63
|
+
* @param subshell - The subshell to rank.
|
|
64
|
+
* @returns A comparable rank; equal ranks mean the same Slater group.
|
|
65
|
+
*/
|
|
66
|
+
export function groupRank(subshell) {
|
|
67
|
+
return subshell.n * 10 + (subshell.l <= 1 ? 0 : subshell.l);
|
|
68
|
+
}
|
|
69
|
+
function sameSubshell(first, second) {
|
|
70
|
+
return first.n === second.n && first.l === second.l;
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=screening.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screening.js","sourceRoot":"","sources":["../../../src/orbital/core/screening.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAYH;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAC7B,YAAoB,EACpB,aAA2C,EAC3C,QAAkB;IAElB,MAAM,IAAI,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,SAAS,GAAG,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC;IAClC,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,KAAK,MAAM,QAAQ,IAAI,aAAa,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,CAAC,CAAC;QACtC,IAAI,SAAS,GAAG,IAAI;YAAE,SAAS;QAC/B,IAAI,SAAS,KAAK,IAAI,EAAE,CAAC;YACvB,yEAAyE;YACzE,yEAAyE;YACzE,oDAAoD;YACpD,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CACrB,CAAC,EACD,QAAQ,CAAC,SAAS,GAAG,CAAC,YAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAChE,CAAC;YACF,SAAS,IAAI,MAAM,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC5C,SAAS;QACX,CAAC;QACD,IAAI,SAAS,EAAE,CAAC;YACd,o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