Quick Start
Command line
aseview molecule.xyz # one structure
aseview trajectory.xyz -i 0:10 # first 10 frames (ASE-style slice)
aseview reactant.xyz product.xyz # several files → overlay
aseview molecule.xyz --hess orca.hess # normal modes (ORCA .hess or VASP OUTCAR)
aseview molecule.xyz -v frag # fragment selector
aseview HOMO.cube -v surface # isosurface (needs the surface extra)
aseview molecule.xyz -o molecule.html # save instead of serving
The viewer opens in your browser. See the CLI reference for every option.
On a remote server
aseview molecule.xyz -p 8080 --no-browser # on the server
ssh -L 8080:localhost:8080 user@server # on your machine
Then open http://localhost:8080.
Python
from ase.io import read
from aseview import MolecularViewer
atoms = read("molecule.xyz")
viewer = MolecularViewer(atoms, style="glossy", show_cell=False)
viewer.show() # inline in Jupyter
viewer.save_html("molecule.html") # standalone file, no Python needed to open it
Keyword arguments are viewer settings: the same names the sidebar controls, validated when the viewer is created. The other viewers work the same way:
from aseview import OverlayViewer, NormalViewer, FragSelector, view
OverlayViewer(read("conformers.xyz", index=":"), align_structures=True).show()
NormalViewer.from_orca(atoms, "orca.hess").show()
FragSelector(atoms).show()
view(atoms, style="cinematic") # quick render without the sidebar
Themes
A theme sets the interface look; it is independent of the molecule style.
import aseview
aseview.set_theme("dark") # every viewer created afterwards
aseview.MolecularViewer(atoms, theme="glass") # one viewer
Next steps
- Guides with live, embedded viewers
- Python API for each viewer
- JavaScript module to use the viewer in any web page