visualization
Lightweight visualization helpers for notebooks.
import mlx_atomistic.visualization
Functions
Section titled “Functions”atoms_to_xyz_block
Section titled “atoms_to_xyz_block”def atoms_to_xyz_block(symbols: Sequence[str], positions: Sequence[Sequence[float]]) -> strConvert atom symbols and Cartesian coordinates to an XYZ string.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
symbols | Sequence[str] | ||
positions | Sequence[Sequence[float]] |
Returns
str
view_atoms_3d
Section titled “view_atoms_3d”def view_atoms_3d(symbols: Sequence[str], positions: Sequence[Sequence[float]], *, width: int = 640, height: int = 420)Create a py3Dmol viewer for simple atomistic structures.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
symbols | Sequence[str] | ||
positions | Sequence[Sequence[float]] | ||
width | int | 640 | |
height | int | 420 |