LiteViewer
A thin wrapper around MolecularViewer for quick, PyMOL-style renders — a canvas plus an optional play/stop button, with no settings panel. For the full settings surface (energy plots, constraints, polyhedra, camera presets, export, …), use MolecularViewer directly.
See the Lightweight view() example for an embedded preview.
Snake_case, not camelCase
Unlike the other viewer classes, LiteViewer and view() take snake_case keyword arguments (hide_hs, bond_threshold, show_bond, …) instead of the camelCase used by MolecularViewer, OverlayViewer, NormalViewer, and FragSelector.
No per-instance theme
LiteViewer has no theme= constructor argument and ships no themed template — it always renders with the same fixed template regardless of aseview.set_theme(). Background is chosen automatically from the styles value (dark background for grey, bubble, cinematic, neon, 2d; white otherwise).
Constructor
Parameters
| Parameter | Type | Description | Default |
|---|---|---|---|
data |
Atoms, List[Atoms], Dict, str |
Molecular data to visualize | Required |
styles |
str |
Rendering style — see Styles for the full list | "cinematic" |
fps |
int, float |
Playback rate for trajectories | 30 |
hide_hs |
bool |
Hide hydrogen atoms and their bonds without removing them from the data | False |
center |
bool, None |
Center each frame by center of mass | None |
centering |
bool, None |
Alias of center (both may be passed if they agree) |
None |
bond_threshold |
float |
Bond detection scale factor (multiplier for covalent radii sum) | 1.3 |
show_bond |
bool |
Draw bonds | True |
high_performance |
bool |
Disable antialiasing, lock pixel ratio to 1, and reduce damping for large structures | False |
view() Helper
The shortest entry point: builds a LiteViewer, immediately calls .show(), and returns the viewer instance so it can also be saved with save_html().
Accepts every LiteViewer parameter above, plus:
| Parameter | Type | Description | Default |
|---|---|---|---|
width |
int |
Notebook iframe width in pixels | 500 |
height |
int |
Notebook iframe height in pixels | 500 |
from aseview import view
viewer = view(atoms, styles="cinematic", hide_hs=True, center=True, width=400, height=400)
Methods
Inherited from the shared viewer base — see MolecularViewer methods for full parameter details.