Skip to content

Commit 7965159

Browse files
committed
v0.1.6
1 parent 3ca064a commit 7965159

File tree

13 files changed

+94
-72
lines changed

13 files changed

+94
-72
lines changed

changelog.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Changelog
22

3+
## [v0.1.6](https://github.com/janosh/matterviz/compare/v0.1.5...v0.1.6)
4+
5+
> 28 July 2025
6+
7+
### 🛠 Enhancements
8+
9+
- More `Histogram.svelte` features (near parity with `ScatterPlot.svelte`) by @janosh in https://github.com/janosh/matterviz/pull/101
10+
- Add parsing routines for single OPTIMADE JSON by @ml-evs in https://github.com/janosh/matterviz/pull/100
11+
- Add camera projection selector to `StructureControls.svelte`: perspective (default) or orthographic by @janosh in https://github.com/janosh/matterviz/pull/105
12+
- StructureControls.svelte add CIF and POSCAR file export and clipboard copy buttons by @janosh in https://github.com/janosh/matterviz/pull/110
13+
- Customize site labels (size, color, padding, bg color, offset) via `StructureControls.svelte` by @janosh in https://github.com/janosh/matterviz/pull/111
14+
- Streaming trajectory loader and parser to support large MD files by @janosh in https://github.com/janosh/matterviz/pull/112
15+
- Add lots of VSCode extension settings for customizing default appearance by @janosh in https://github.com/janosh/matterviz/pull/114
16+
17+
### 🐛 Bug Fixes
18+
19+
- Fix VSCode PNG export by @janosh in https://github.com/janosh/matterviz/pull/103
20+
- Fix Matterviz auto-render triggering on unsupported files by @janosh in https://github.com/janosh/matterviz/pull/108
21+
- Fix CIF parsing of TiO2 (mp-2657) by @janosh in https://github.com/janosh/matterviz/pull/109
22+
23+
## New Contributors
24+
25+
- @ml-evs made their first contribution in https://github.com/janosh/matterviz/pull/100
26+
327
## [v0.1.5](https://github.com/janosh/matterviz/compare/v0.1.4...v0.1.5)
428

529
> 22 July 2025

extensions/vscode/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "matterviz",
33
"displayName": "MatterViz",
44
"description": "Visualize crystal structures and MD trajectories in VSCode",
5-
"version": "0.1.5",
5+
"version": "0.1.6",
66
"publisher": "janosh",
77
"icon": "icon.png",
88
"repository": "https://github.com/janosh/matterviz",
@@ -332,44 +332,44 @@
332332
"minimum": 0.05,
333333
"maximum": 0.5
334334
},
335-
"matterviz.structure.show_lattice": {
335+
"matterviz.structure.show_cell": {
336336
"type": "boolean",
337337
"default": false,
338-
"description": "Display unit cell lattice"
338+
"description": "Display system cell"
339339
},
340340
"matterviz.structure.show_vectors": {
341341
"type": "boolean",
342342
"default": false,
343-
"description": "Display lattice vectors"
343+
"description": "Display cell vectors"
344344
},
345-
"matterviz.structure.lattice_edge_opacity": {
345+
"matterviz.structure.cell_edge_opacity": {
346346
"type": "number",
347347
"default": 0.3,
348-
"description": "Opacity of lattice edge lines",
348+
"description": "Opacity of cell edge lines",
349349
"minimum": 0,
350350
"maximum": 1
351351
},
352-
"matterviz.structure.lattice_surface_opacity": {
352+
"matterviz.structure.cell_surface_opacity": {
353353
"type": "number",
354354
"default": 0.1,
355-
"description": "Opacity of lattice surfaces",
355+
"description": "Opacity of cell surfaces",
356356
"minimum": 0,
357357
"maximum": 1
358358
},
359-
"matterviz.structure.lattice_edge_color": {
359+
"matterviz.structure.cell_edge_color": {
360360
"type": "string",
361361
"default": "#808080",
362-
"description": "Color of lattice edges"
362+
"description": "Color of cell edges"
363363
},
364-
"matterviz.structure.lattice_surface_color": {
364+
"matterviz.structure.cell_surface_color": {
365365
"type": "string",
366366
"default": "#e0e0e0",
367-
"description": "Color of lattice surfaces"
367+
"description": "Color of cell surfaces"
368368
},
369-
"matterviz.structure.lattice_line_width": {
369+
"matterviz.structure.cell_line_width": {
370370
"type": "number",
371371
"default": 1.5,
372-
"description": "Width of lattice edge lines",
372+
"description": "Width of cell edge lines",
373373
"minimum": 0.5,
374374
"maximum": 5
375375
},
@@ -380,7 +380,7 @@
380380
},
381381
"matterviz.trajectory.fps": {
382382
"type": "number",
383-
"default": 5,
383+
"default": 10,
384384
"description": "Frames per second for trajectory playback",
385385
"minimum": 0.1,
386386
"maximum": 60

extensions/vscode/readme.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@ MatterViz provides extensive customization options through VSCode settings. Acce
116116

117117
### Setting Categories
118118

119-
| Category | Description | Example Settings |
120-
| --------------- | ------------------------------- | ----------------------------------------------------------- |
121-
| **General** | Global appearance and behavior | `color_scheme`, `background_color`, `show_image_atoms` |
122-
| **Structure** | 3D structure visualization | `atom_radius`, `bond_thickness`, `show_lattice`, `lighting` |
123-
| **Trajectory** | Animation and playback controls | `fps`, `auto_play`, `display_mode`, `show_controls` |
124-
| **Plots** | Scatter plots and histograms | `scatter_point_size`, `plot_grid_lines`, `auto_fit_range` |
125-
| **Performance** | Memory and processing options | `chunk_size`, `use_indexing`, `sphere_segments` |
119+
| Category | Description | Example Settings |
120+
| --------------- | ------------------------------- | --------------------------------------------------------- |
121+
| **General** | Global appearance and behavior | `color_scheme`, `background_color`, `show_image_atoms` |
122+
| **Structure** | 3D structure visualization | `atom_radius`, `bond_thickness`, `show_cell`, `lighting` |
123+
| **Trajectory** | Animation and playback controls | `fps`, `auto_play`, `display_mode`, `show_controls` |
124+
| **Plots** | Scatter plots and histograms | `scatter_point_size`, `plot_grid_lines`, `auto_fit_range` |
125+
| **Performance** | Memory and processing options | `chunk_size`, `use_indexing`, `sphere_segments` |
126126

127127
### Pro Tips
128128

extensions/vscode/src/webview/main.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -354,10 +354,10 @@ const structure_props = (defaults: DefaultSettings) => {
354354
},
355355
lattice_props: {
356356
show_vectors: structure.show_vectors,
357-
cell_edge_opacity: structure.lattice_edge_opacity,
358-
cell_surface_opacity: structure.lattice_surface_opacity,
359-
cell_edge_color: structure.lattice_edge_color,
360-
cell_surface_color: structure.lattice_surface_color,
357+
cell_edge_opacity: structure.cell_edge_opacity,
358+
cell_surface_opacity: structure.cell_surface_opacity,
359+
cell_edge_color: structure.cell_edge_color,
360+
cell_surface_color: structure.cell_surface_color,
361361
},
362362
color_scheme: defaults.color_scheme,
363363
background_color: defaults.background_color,

extensions/vscode/tests/extension.test.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1216,8 +1216,8 @@ describe(`MatterViz Extension`, () => {
12161216
[`structure.ambient_light`, 0.6],
12171217
[`structure.directional_light`, 0.8],
12181218
[`structure.force_scale`, 2.0],
1219-
[`structure.lattice_edge_opacity`, 0.5],
1220-
[`structure.lattice_surface_opacity`, 0.2],
1219+
[`structure.cell_edge_opacity`, 0.5],
1220+
[`structure.cell_surface_opacity`, 0.2],
12211221
[`background_opacity`, 0.8],
12221222
[`trajectory.fps`, 10],
12231223
[`trajectory.step_labels`, 10],
@@ -1228,7 +1228,7 @@ describe(`MatterViz Extension`, () => {
12281228
[`structure.show_bonds`, true],
12291229
[`structure.show_site_labels`, true],
12301230
[`structure.show_force_vectors`, true],
1231-
[`structure.show_lattice`, true],
1231+
[`structure.show_cell`, true],
12321232
[`structure.show_vectors`, true],
12331233
[`show_image_atoms`, true],
12341234
[`show_gizmo`, false],
@@ -1240,8 +1240,8 @@ describe(`MatterViz Extension`, () => {
12401240
[`structure.bond_color`, `#ff0000`],
12411241
[`structure.site_label_color`, `#00ff00`],
12421242
[`structure.site_label_bg_color`, `#333333`],
1243-
[`structure.lattice_edge_color`, `#aaaaaa`],
1244-
[`structure.lattice_surface_color`, `#bbbbbb`],
1243+
[`structure.cell_edge_color`, `#aaaaaa`],
1244+
[`structure.cell_surface_color`, `#bbbbbb`],
12451245
[`structure.force_color`, `#ffff00`],
12461246
[`background_color`, `#111111`],
12471247

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://janosh.github.io/matterviz",
66
"repository": "https://github.com/janosh/matterviz",
77
"license": "MIT",
8-
"version": "0.1.5",
8+
"version": "0.1.6",
99
"type": "module",
1010
"svelte": "./dist/index.js",
1111
"bugs": "https://github.com/janosh/matterviz/issues",

src/lib/io/index.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,11 @@ export async function handle_url_drop(
2121

2222
async function load_binary_traj(
2323
resp: Response,
24-
filename: string,
2524
type: string,
2625
fallback = false,
2726
): Promise<ArrayBuffer | string> {
2827
try {
2928
const buffer = await resp.arrayBuffer()
30-
console.log(`Loaded ${type} as binary:`, { filename, size: buffer.byteLength })
3129
return buffer
3230
} catch (error) {
3331
if (fallback) {
@@ -71,7 +69,7 @@ export async function load_from_url(
7169
// For H5 files, always load as binary regardless of signature
7270
// to handle files that have .h5/.hdf5 extensions but may not have the proper HDF5 signature
7371
if ([`h5`, `hdf5`].includes(ext)) {
74-
const result = await load_binary_traj(resp, filename, `H5`, true)
72+
const result = await load_binary_traj(resp, `H5`, true)
7573

7674
// Log warning if signature doesn't match (only for ArrayBuffer results)
7775
if (result instanceof ArrayBuffer && result.byteLength >= 8) {
@@ -87,7 +85,7 @@ export async function load_from_url(
8785

8886
// For .traj files, ensure we always get ArrayBuffer for proper ASE parsing
8987
if (ext === `traj`) {
90-
const buffer = await load_binary_traj(resp, filename, `.traj`)
88+
const buffer = await load_binary_traj(resp, `.traj`)
9189
return callback(buffer, filename)
9290
}
9391

src/lib/settings.ts

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,13 @@ export interface SettingsConfig {
5959
force_shaft_radius: SettingType<number>
6060
force_arrow_head_radius: SettingType<number>
6161
force_arrow_head_length: SettingType<number>
62-
show_lattice: SettingType<boolean>
62+
show_cell: SettingType<boolean>
6363
show_vectors: SettingType<boolean>
64-
lattice_edge_opacity: SettingType<number>
65-
lattice_surface_opacity: SettingType<number>
66-
lattice_edge_color: SettingType<string>
67-
lattice_surface_color: SettingType<string>
68-
lattice_line_width: SettingType<number>
64+
cell_edge_opacity: SettingType<number>
65+
cell_surface_opacity: SettingType<number>
66+
cell_edge_color: SettingType<string>
67+
cell_surface_color: SettingType<string>
68+
cell_line_width: SettingType<number>
6969
}
7070

7171
// Trajectory viewer settings
@@ -344,37 +344,37 @@ export const SETTINGS_CONFIG: SettingsConfig = {
344344
minimum: 0.05,
345345
maximum: 0.5,
346346
},
347-
show_lattice: {
347+
show_cell: {
348348
value: false,
349-
description: `Display unit cell lattice`,
349+
description: `Display system cell`,
350350
},
351351
show_vectors: {
352352
value: false,
353-
description: `Display lattice vectors`,
353+
description: `Display cell vectors`,
354354
},
355-
lattice_edge_opacity: {
355+
cell_edge_opacity: {
356356
value: 0.3,
357-
description: `Opacity of lattice edge lines`,
357+
description: `Opacity of cell edge lines`,
358358
minimum: 0,
359359
maximum: 1,
360360
},
361-
lattice_surface_opacity: {
361+
cell_surface_opacity: {
362362
value: 0.1,
363-
description: `Opacity of lattice surfaces`,
363+
description: `Opacity of cell surfaces`,
364364
minimum: 0,
365365
maximum: 1,
366366
},
367-
lattice_edge_color: {
367+
cell_edge_color: {
368368
value: `#808080`,
369-
description: `Color of lattice edges`,
369+
description: `Color of cell edges`,
370370
},
371-
lattice_surface_color: {
371+
cell_surface_color: {
372372
value: `#e0e0e0`,
373-
description: `Color of lattice surfaces`,
373+
description: `Color of cell surfaces`,
374374
},
375-
lattice_line_width: {
375+
cell_line_width: {
376376
value: 1.5,
377-
description: `Width of lattice edge lines`,
377+
description: `Width of cell edge lines`,
378378
minimum: 0.5,
379379
maximum: 5.0,
380380
},

src/lib/structure/Lattice.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
}
2727
let {
2828
matrix = undefined,
29-
cell_edge_color = DEFAULTS.structure.lattice_edge_color,
30-
cell_surface_color = DEFAULTS.structure.lattice_surface_color,
31-
cell_line_width = DEFAULTS.structure.lattice_line_width,
32-
cell_edge_opacity = DEFAULTS.structure.lattice_edge_opacity,
33-
cell_surface_opacity = DEFAULTS.structure.lattice_surface_opacity,
29+
cell_edge_color = DEFAULTS.structure.cell_edge_color,
30+
cell_surface_color = DEFAULTS.structure.cell_surface_color,
31+
cell_line_width = DEFAULTS.structure.cell_line_width,
32+
cell_edge_opacity = DEFAULTS.structure.cell_edge_opacity,
33+
cell_surface_opacity = DEFAULTS.structure.cell_surface_opacity,
3434
show_vectors = true,
3535
vector_colors = [`red`, `green`, `blue`],
3636
vector_origin = [-1, -1, -1] as Vec3,

src/lib/structure/Structure.svelte

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@
100100
ambient_light: DEFAULTS.structure.ambient_light,
101101
}),
102102
lattice_props = $bindable({
103-
cell_edge_opacity: DEFAULTS.structure.lattice_edge_opacity,
104-
cell_surface_opacity: DEFAULTS.structure.lattice_surface_opacity,
105-
cell_edge_color: DEFAULTS.structure.lattice_edge_color,
106-
cell_surface_color: DEFAULTS.structure.lattice_surface_color,
107-
cell_line_width: DEFAULTS.structure.lattice_line_width,
103+
cell_edge_opacity: DEFAULTS.structure.cell_edge_opacity,
104+
cell_surface_opacity: DEFAULTS.structure.cell_surface_opacity,
105+
cell_edge_color: DEFAULTS.structure.cell_edge_color,
106+
cell_surface_color: DEFAULTS.structure.cell_surface_color,
107+
cell_line_width: DEFAULTS.structure.cell_line_width,
108108
show_vectors: true,
109109
}),
110110
controls_open = $bindable(false),

0 commit comments

Comments
 (0)