bravais 0.1.3 → 0.2.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.
@@ -1,6 +1,6 @@
1
1
  import type { SymmetryOperation } from "../structure/types.js";
2
2
  /**
3
- * Parse one Jones-faithful operator such as `-x+1/2, y, -z+1/2` or
4
- * `2/3+x,1/3+y,1/3+z` into a rotation matrix and translation.
3
+ * Parse a symmetry operation as CIF files write it, such as
4
+ * `-x+1/2, y, -z+1/2`, into a rotation matrix and translation.
5
5
  */
6
6
  export declare function parseSymmetryOperator(text: string): SymmetryOperation;
@@ -18,12 +18,12 @@ export type { BuildSceneOptions, SceneAtom, StructureScene, } from "./scene/buil
18
18
  export type { Bond } from "./structure/bonds.js";
19
19
  export type { Lattice, LatticeParameters, Mat3, Site, SpaceGroupInfo, Species, Structure, SymmetryOperation, Vec3, } from "./structure/types.js";
20
20
  /**
21
- * Read the first structure in a CIF. Symmetry comes from the file's operator
22
- * loop, checked to fit its atoms, or from moyo by the file's space-group
23
- * symbol or number, in the setting its atoms or its cell select; a file
24
- * naming neither is taken as listing every atom (P1). Throws
25
- * `CifSyntaxError` for text that is not CIF, `CifStructureError` for a
26
- * CIF without a usable structure, and `SpaceGroupLookupError` for a space
27
- * group the symmetry table does not know.
21
+ * Read the first structure in a CIF file. Its symmetry comes from the
22
+ * file's list of symmetry operations or, without one, from its space-group
23
+ * symbol or number; a file with neither is read as listing every atom.
24
+ *
25
+ * Throws `CifSyntaxError` for text that is not valid CIF,
26
+ * `CifStructureError` for a file without a usable structure, and
27
+ * `SpaceGroupLookupError` for an unknown space group.
28
28
  */
29
29
  export declare function readCif(text: string): Promise<Structure>;
@@ -2,14 +2,17 @@ import { OrthographicCamera, Quaternion, Scene, type WebGLRenderer } from "three
2
2
  import type { Mat3 } from "../structure/types.js";
3
3
  /** The a, b, c axes of the cell drawn in a corner, following the camera. */
4
4
  export declare class AxesGizmo {
5
- private readonly fontFamily;
6
5
  readonly scene: Scene<import("three").Object3DEventMap>;
7
6
  readonly camera: OrthographicCamera;
8
7
  private readonly axes;
8
+ /** The a, b and c arrows, built once and turned to each new cell. */
9
+ private readonly arrows;
9
10
  private readonly headlight;
10
11
  private readonly inverse;
12
+ private readonly direction;
11
13
  /** `fontFamily` is the interface font the axis letters are drawn in. */
12
14
  constructor(fontFamily: string);
15
+ /** Point the arrows along the cell's a, b and c axes. */
13
16
  setCell(cell: Mat3): void;
14
17
  /** Draw into the bottom-left `size` pixels of a renderer whose main pass is done. */
15
18
  render(renderer: WebGLRenderer, cameraQuaternion: Quaternion, size: number): void;
@@ -1,4 +1,4 @@
1
- import { DataTexture, LineBasicMaterial, MeshStandardMaterial, type Material } from "three";
1
+ import { DataTexture, LineBasicMaterial, MeshStandardMaterial } from "three";
2
2
  export declare const METALNESS = 0.1;
3
3
  export declare const ROUGHNESS = 0.6;
4
4
  export declare const AMBIENT_LIGHT_INTENSITY = 0.8;
@@ -40,4 +40,3 @@ export declare const GIZMO_AXIS_STENCIL = 1;
40
40
  * axis letters can tell what they are drawn over.
41
41
  */
42
42
  export declare function createGizmoMaterial(color: string, stencilRef: number): MeshStandardMaterial;
43
- export declare function disposeMaterial(material: Material | Material[]): void;
@@ -22,3 +22,12 @@ export declare function cellCenter(cell: Mat3): Vec3;
22
22
  * bounds and the span.
23
23
  */
24
24
  export declare function createSceneModel(layers: SceneLayer[]): SceneModel;
25
+ /**
26
+ * A placeholder atom, bond and cell frame in every material a structure is
27
+ * drawn with, opaque and see-through, so their shaders can compile before
28
+ * the first structure arrives. It gives no element a colour.
29
+ */
30
+ export declare function createShaderWarmup(): {
31
+ group: Group;
32
+ dispose(): void;
33
+ };
@@ -1,12 +1,11 @@
1
- /** Assign session colours to `elements` before drawing them, most common first. */
1
+ /** Give these elements their colours now, the more common ones first, so colours do not depend on drawing order. */
2
2
  export declare function ensureElementColors(elements: readonly string[]): void;
3
- /** The session colour of an element, assigned now if it is new. */
3
+ /** The colour of an element as a hex string such as `#e15949`, given on first use. */
4
4
  export declare function elementColor(element: string): string;
5
- /** Elements seen in this session with their colours, in order of first appearance. */
5
+ /** Every element given a colour so far, with its colour, in the order given. */
6
6
  export declare function elementColorAssignments(): [string, string][];
7
7
  /**
8
- * Forget the session's colours, for when every structure is cleared. The
9
- * palette is shared by every viewer and thumbnail renderer in the page,
10
- * which pick up new colours at their next draw.
8
+ * Forget every colour given so far, for example when all structures are
9
+ * closed. Viewers and thumbnails pick up new colours at their next draw.
11
10
  */
12
11
  export declare function resetElementColors(): void;
@@ -6,12 +6,13 @@ export interface ThumbnailRenderer {
6
6
  * Models are cached by `key` and rebuilt when the layers array changes.
7
7
  */
8
8
  render(key: string, layers: SceneLayer[], view: ViewState | null, canvas: HTMLCanvasElement): void;
9
- /** Drop the cached model of `key`. */
9
+ /** Forget the cached model of `key`. */
10
10
  release(key: string): void;
11
+ /** Free the shared WebGL context and every cached model. */
11
12
  dispose(): void;
12
13
  }
13
14
  /**
14
- * One shared WebGL context that paints small previews into ordinary 2D
15
- * canvases, so a list of structures does not open a context per card.
15
+ * Draw small previews into ordinary canvases from one shared WebGL context,
16
+ * so a list of structures does not need a context for each.
16
17
  */
17
18
  export declare function createThumbnailRenderer(): ThumbnailRenderer;
@@ -1,7 +1,7 @@
1
1
  import type { Vec3 } from "../structure/types.js";
2
2
  /**
3
- * A camera pose an app can store, restore and carry between a viewer and a
4
- * thumbnail: the same state reads the same at any canvas size.
3
+ * A view an app can save and restore, or pass between a viewer and a
4
+ * thumbnail. It looks the same at any canvas size.
5
5
  */
6
6
  export interface ViewState {
7
7
  /** Orientation of the camera as [x, y, z, w], three.js order. */
@@ -8,32 +8,32 @@ export interface ViewerOptions {
8
8
  }
9
9
  export interface Viewer {
10
10
  /**
11
- * Replace what is drawn with scenes from `buildScene`, usually of expanded
12
- * structures. The view resets to the standard orientation unless `view`
13
- * is given.
11
+ * Draw these scenes from `buildScene`, replacing what was shown. The view
12
+ * resets to the standard orientation unless `view` is given.
14
13
  */
15
14
  setLayers(layers: SceneLayer[], view?: ViewState | null): void;
16
15
  /** Remove everything drawn. */
17
16
  clear(): void;
18
- /** The current pose, or null while nothing is loaded. */
17
+ /** The current view, or null while nothing is shown. */
19
18
  getView(): ViewState | null;
20
- /** Restore a pose from `getView`, of this or another viewer. */
19
+ /** Restore a view from `getView`, of this or another viewer. */
21
20
  setView(view: ViewState): void;
22
21
  /** Back to the standard orientation, fitted to the viewport. */
23
22
  resetView(): void;
24
- /** Refit to the element's size; call after layout changes the viewer's box. */
23
+ /** Fit the canvas to the container again; the viewer does this itself when the container resizes. */
25
24
  resize(): void;
26
- /** Draw a frame now. */
25
+ /** Draw a frame now, or as soon as the shaders finish compiling. */
27
26
  render(): void;
28
- /** Called after the user moves the camera. Returns the unsubscribe function. */
27
+ /** Call `listener` when the user rotates or zooms. Returns a function that removes it. */
29
28
  onInteraction(listener: () => void): () => void;
30
- /** Take the viewer out of its container and release its WebGL resources. */
29
+ /** Remove the viewer from its container and free its WebGL resources. */
31
30
  dispose(): void;
32
31
  }
33
32
  /**
34
- * Mount a crystal viewer in `container`. The viewer fills the container and
35
- * follows its size, so the container needs a height of its own. The call
36
- * gives the container the class `bravais-viewer` and adds, once per
37
- * document, a `<style id="bravais-styles">` for the overlays.
33
+ * Create a viewer inside `container`. It fills the container and follows
34
+ * its size, so give the container a height. Adds the class `bravais-viewer`
35
+ * to the container and one small stylesheet to the page. Its shaders start
36
+ * compiling in the background at once, and drawing waits until they are
37
+ * ready.
38
38
  */
39
39
  export declare function createViewer(container: HTMLElement, options?: ViewerOptions): Viewer;
@@ -23,26 +23,24 @@ export interface StructureScene {
23
23
  /** Elements present, in order of first appearance, deuterium as hydrogen. */
24
24
  elements: string[];
25
25
  }
26
- /** One structure drawn in a viewer; several overlay, each with its own opacity. */
26
+ /** One structure to draw. A viewer can overlay several, each with its own opacity. */
27
27
  export interface SceneLayer {
28
28
  scene: StructureScene;
29
29
  /**
30
- * 1 draws the layer solid; a lower value draws it translucent over the
31
- * others; 0 draws nothing, yet the layer still frames the view, so a viewer
32
- * switching between two states of a structure can keep one centre and
33
- * scale. Default 1.
30
+ * From 0 to 1; default 1. Below 1 the layer is drawn see-through over the
31
+ * others. At 0 it is not drawn but still counts when fitting the view, so
32
+ * switching between two versions of a structure keeps the same framing.
34
33
  */
35
34
  opacity?: number;
36
35
  }
37
36
  export interface BuildSceneOptions {
38
- /** Draw image atoms: boundary sites repeated on the opposite faces, edges and corners. Default true. */
37
+ /** Repeat atoms on the cell's faces, edges and corners on the opposite side too. Default true. */
39
38
  imageAtoms?: boolean;
40
39
  }
41
40
  /** Every chemical element on any site, in order of first appearance. */
42
41
  export declare function structureElements(structure: Structure): string[];
43
42
  /**
44
- * Atoms, bonds and cell of a structure as the renderer draws them. The sites
45
- * are drawn as listed and `operations` are not applied: pass
46
- * `expandStructure(structure)` to draw the full cell.
43
+ * Prepare a structure for drawing: its atoms, bonds and cell. Sites are
44
+ * drawn as listed; pass `expandStructure(structure)` to draw the whole cell.
47
45
  */
48
46
  export declare function buildScene(structure: Structure, options?: BuildSceneOptions): StructureScene;
@@ -1,6 +1,7 @@
1
1
  import { type Structure } from "./types.js";
2
2
  /**
3
- * Apply every operation to every site and keep the distinct positions: the
4
- * full cell as an explicit list of sites (P1).
3
+ * Fill the unit cell: apply every symmetry operation to every site and keep
4
+ * each distinct position once. The result lists every atom, with the
5
+ * identity as its only operation.
5
6
  */
6
7
  export declare function expandStructure(structure: Structure): Structure;
@@ -1,10 +1,10 @@
1
1
  import type { Lattice, LatticeParameters, Mat3, Vec3 } from "./types.js";
2
2
  /**
3
- * Cartesian row vectors for cell parameters, in the convention pymatgen uses
4
- * by default: c along z and a in the xz plane.
3
+ * A lattice from cell lengths in ångström and angles in degrees. The c axis
4
+ * points along z and a lies in the xz plane, as in pymatgen.
5
5
  */
6
6
  export declare function latticeFromParameters(parameters: LatticeParameters): Lattice;
7
- /** Cell parameters of three Cartesian row vectors. */
7
+ /** A lattice from its three cell vectors, in ångström. */
8
8
  export declare function latticeFromVectors(vectors: Mat3): Lattice;
9
9
  export declare function fractionalToCartesian(lattice: Lattice, fractional: Vec3): Vec3;
10
10
  export declare function distance(p: Vec3, q: Vec3): number;
@@ -35,9 +35,7 @@ export interface SymmetryDataset {
35
35
  standard: Structure;
36
36
  }
37
37
  /**
38
- * Analyse the symmetry of what a structure actually contains. The structure
39
- * is expanded to every atom in its cell and handed to moyo, which finds the
40
- * space group from the atoms alone, so the result does not depend on how,
41
- * or whether, the file named it.
38
+ * Find the space group of a structure from its atoms alone, whatever the
39
+ * file says. See `SymmetryDataset` for what the result holds.
42
40
  */
43
41
  export declare function symmetryDataset(structure: Structure, options?: SymmetryOptions): Promise<SymmetryDataset>;
@@ -4,10 +4,8 @@ export declare class SpaceGroupLookupError extends Error {
4
4
  constructor(message: string);
5
5
  }
6
6
  /**
7
- * Load the bundled moyo WebAssembly module, once. It is a separate file of
8
- * the package that nothing loads until a structure needs it. Every function
9
- * that needs moyo calls this itself, so calling it is only a way to pay the
10
- * start-up cost early. A failed load is not cached: the next call tries
7
+ * Load moyo, the symmetry library, ahead of first use. This is optional:
8
+ * everything that needs moyo loads it. If loading fails, the next call tries
11
9
  * again.
12
10
  */
13
11
  export declare function ensureMoyo(): Promise<void>;
@@ -47,9 +45,9 @@ export interface OperationSetting {
47
45
  */
48
46
  export declare function operationSettings(info: SpaceGroupInfo): Promise<OperationSetting[]>;
49
47
  /**
50
- * The operations of a space group named by Hall symbol, Hermann-Mauguin
51
- * symbol or number: those of the setting a suffix such as `:H` selects,
52
- * otherwise of the standard setting. Throws `SpaceGroupLookupError` when
53
- * the table has no such group.
48
+ * The symmetry operations of a space group given by Hall symbol,
49
+ * Hermann-Mauguin symbol or number, in the setting a suffix such as `:H`
50
+ * names, or else the standard setting. Throws `SpaceGroupLookupError` for
51
+ * an unknown group.
54
52
  */
55
53
  export declare function operationsForSpaceGroup(info: SpaceGroupInfo): Promise<SymmetryOperation[]>;
@@ -1,10 +1,8 @@
1
1
  /**
2
- * A Hermann-Mauguin symbol the way textbooks print it: no spaces, screw
3
- * axes with subscripts and rotoinversion axes with a bar, so `F m -3 m`
4
- * becomes Fm3̅m and `P 2_1/c` becomes P2₁/c. The ASCII forms of moyo and
5
- * spglib (`2_1`) and of CIF files (`21`, the digits run together) are both
6
- * read. A setting suffix such as `:H` is kept after a space. A symbol
7
- * written without spaces is only given bars and underscore subscripts,
8
- * since `F432` cannot be told from a screw axis without them.
2
+ * Write a space-group symbol the way textbooks print it: `F m -3 m` becomes
3
+ * Fm3̅m and `P 2_1/c` becomes P2₁/c. A setting suffix such as `:H` is kept.
4
+ * A screw axis written as two digits, as CIF files do (`P 1 21/c 1`), is
5
+ * recognised only when the symbol has spaces, since in `F432` the digits
6
+ * are separate axes.
9
7
  */
10
8
  export declare function typesetSymbol(symbol: string): string;
@@ -0,0 +1,254 @@
1
+ #------------------------------------------------------------------------------
2
+ #$Date: 2024-05-06 10:39:41 +0300 (Mon, 06 May 2024) $
3
+ #$Revision: 291735 $
4
+ #$URL: file:///home/coder/svn-repositories/_RELOADED_COD/cod-reloaded/cif/9/00/86/9008618.cif $
5
+ #------------------------------------------------------------------------------
6
+ #
7
+ # This file is available in the Crystallography Open Database (COD),
8
+ # http://www.crystallography.net/. The original data for this entry
9
+ # were provided the American Mineralogist Crystal Structure Database,
10
+ # http://rruff.geo.arizona.edu/AMS/amcsd.php
11
+ #
12
+ # The file may be used within the scientific community so long as
13
+ # proper attribution is given to the journal article from which the
14
+ # data were obtained.
15
+ #
16
+ data_9008618
17
+ loop_
18
+ _publ_author_name
19
+ 'Wyckoff, R. W. G.'
20
+ _publ_section_title
21
+ ;
22
+ Second edition. Interscience Publishers, New York, New York
23
+ rocksalt structure
24
+ ;
25
+ _journal_name_full 'Crystal Structures'
26
+ _journal_page_first 85
27
+ _journal_page_last 237
28
+ _journal_volume 1
29
+ _journal_year 1963
30
+ _chemical_formula_structural CoO
31
+ _chemical_formula_sum 'Co O'
32
+ _space_group_IT_number 225
33
+ _symmetry_space_group_name_Hall '-F 4 2 3'
34
+ _symmetry_space_group_name_H-M 'F m -3 m'
35
+ _cell_angle_alpha 90
36
+ _cell_angle_beta 90
37
+ _cell_angle_gamma 90
38
+ _cell_length_a 4.2667
39
+ _cell_length_b 4.2667
40
+ _cell_length_c 4.2667
41
+ _cell_formula_units_Z 4
42
+ _cell_volume 77.674
43
+ _database_code_amcsd 0011296
44
+ _exptl_crystal_density_diffrn 6.408
45
+ _cod_original_sg_symbol_H-M 'F m 3 m'
46
+ _cod_database_code 9008618
47
+ _amcsd_formula_title CoO
48
+ loop_
49
+ _space_group_symop_operation_xyz
50
+ x,y,z
51
+ x,1/2+y,1/2+z
52
+ 1/2+x,y,1/2+z
53
+ 1/2+x,1/2+y,z
54
+ z,-x,y
55
+ z,1/2-x,1/2+y
56
+ 1/2+z,-x,1/2+y
57
+ 1/2+z,1/2-x,y
58
+ -y,z,-x
59
+ -y,1/2+z,1/2-x
60
+ 1/2-y,z,1/2-x
61
+ 1/2-y,1/2+z,-x
62
+ x,-y,z
63
+ x,1/2-y,1/2+z
64
+ 1/2+x,-y,1/2+z
65
+ 1/2+x,1/2-y,z
66
+ -z,x,-y
67
+ -z,1/2+x,1/2-y
68
+ 1/2-z,x,1/2-y
69
+ 1/2-z,1/2+x,-y
70
+ y,-z,x
71
+ y,1/2-z,1/2+x
72
+ 1/2+y,-z,1/2+x
73
+ 1/2+y,1/2-z,x
74
+ -x,y,-z
75
+ -x,1/2+y,1/2-z
76
+ 1/2-x,y,1/2-z
77
+ 1/2-x,1/2+y,-z
78
+ x,-z,-y
79
+ x,1/2-z,1/2-y
80
+ 1/2+x,-z,1/2-y
81
+ 1/2+x,1/2-z,-y
82
+ -z,y,x
83
+ -z,1/2+y,1/2+x
84
+ 1/2-z,y,1/2+x
85
+ 1/2-z,1/2+y,x
86
+ y,-x,-z
87
+ y,1/2-x,1/2-z
88
+ 1/2+y,-x,1/2-z
89
+ 1/2+y,1/2-x,-z
90
+ -x,z,y
91
+ -x,1/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z
210
+ x,z,-y
211
+ x,1/2+z,1/2-y
212
+ 1/2+x,z,1/2-y
213
+ 1/2+x,1/2+z,-y
214
+ -z,-y,x
215
+ -z,1/2-y,1/2+x
216
+ 1/2-z,-y,1/2+x
217
+ 1/2-z,1/2-y,x
218
+ y,x,-z
219
+ y,1/2+x,1/2-z
220
+ 1/2+y,x,1/2-z
221
+ 1/2+y,1/2+x,-z
222
+ -z,-x,-y
223
+ -z,1/2-x,1/2-y
224
+ 1/2-z,-x,1/2-y
225
+ 1/2-z,1/2-x,-y
226
+ y,z,x
227
+ y,1/2+z,1/2+x
228
+ 1/2+y,z,1/2+x
229
+ 1/2+y,1/2+z,x
230
+ -x,-y,-z
231
+ -x,1/2-y,1/2-z
232
+ 1/2-x,-y,1/2-z
233
+ 1/2-x,1/2-y,-z
234
+ z,x,y
235
+ z,1/2+x,1/2+y
236
+ 1/2+z,x,1/2+y
237
+ 1/2+z,1/2+x,y
238
+ -y,-z,-x
239
+ -y,1/2-z,1/2-x
240
+ 1/2-y,-z,1/2-x
241
+ 1/2-y,1/2-z,-x
242
+ loop_
243
+ _atom_site_label
244
+ _atom_site_fract_x
245
+ _atom_site_fract_y
246
+ _atom_site_fract_z
247
+ Co 0.00000 0.00000 0.00000
248
+ O 0.50000 0.50000 0.50000
249
+ loop_
250
+ _cod_related_entry_id
251
+ _cod_related_entry_database
252
+ _cod_related_entry_code
253
+ 1 ChemSpider 8117730
254
+ 2 AMCSD 0011296
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bravais",
3
- "version": "0.1.3",
4
- "description": "Crystal structure viewer: reads CIFs, applies their symmetry, repeats boundary sites, finds bonds with VESTA's cutoffs and renders with three.js.",
3
+ "version": "0.2.0",
4
+ "description": "A minimal crystal structure viewer for the web: reads CIF files and draws them with three.js.",
5
5
  "license": "MIT",
6
6
  "author": "Jiacheng Wang",
7
7
  "repository": {
@@ -30,13 +30,13 @@
30
30
  "exports": {
31
31
  ".": {
32
32
  "types": "./dist/types/index.d.ts",
33
- "import": "./dist/bravais.js",
34
33
  "default": "./dist/bravais.js"
35
34
  },
36
35
  "./package.json": "./package.json"
37
36
  },
38
37
  "files": [
39
38
  "dist",
39
+ "examples/CoO.cif",
40
40
  "CHANGELOG.md",
41
41
  "THIRD_PARTY_NOTICES.md"
42
42
  ],