httk.analyse.crysviz¶
Open httk structures in the CrysViz viewer.
Functions¶
|
Serialize an httk structure as an in-memory CrysViz payload. |
|
Open structures in CrysViz and return when its window is ready. |
Module Contents¶
- httk.analyse.crysviz.to_payload(structure, *, name=None, format='vasp-poscar')¶
Serialize an httk structure as an in-memory CrysViz payload.
- Parameters:
- Returns:
A CrysViz payload containing the serialized structure.
- Raises:
ImportError – If CrysViz is not installed.
ValueError – If
formatis not supported.
- Return type:
Any
- httk.analyse.crysviz.show(*structures, **viewer_kwargs)¶
Open structures in CrysViz and return when its window is ready.
- Parameters:
*structures (Any) – CrysViz payloads, source paths, or httk structures to display.
**viewer_kwargs (Any) – Keyword arguments forwarded to
crysviz.show.
- Returns:
The ready CrysViz viewer, which also supports the context-manager protocol.
- Raises:
ImportError – If CrysViz is not installed.
- Return type:
Any
The call is non-blocking after the window is ready. Call
viewer.wait()to block until the window closes.