examples
Small programmatic examples for molecular mechanics and DFT workflows.
import mlx_atomistic.examples
Functions
Section titled “Functions”bonded_chain_example
Section titled “bonded_chain_example”def bonded_chain_example()Return a four-particle bonded chain with bond, angle, and torsion terms.
butane_like_torsion_example
Section titled “butane_like_torsion_example”def butane_like_torsion_example()Return a four-atom butane-like torsion system.
charged_dimer_example
Section titled “charged_dimer_example”def charged_dimer_example()Return a two-particle charged system with direct Coulomb interactions.
ionic_cluster_example
Section titled “ionic_cluster_example”def ionic_cluster_example()Return a small typed ionic cluster.
lj_liquid_example
Section titled “lj_liquid_example”def lj_liquid_example(*, particles: int = 32, density: float = 0.8, temperature: float = 1.0, seed: int = 7)Return an LJ liquid starting point.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
particles | int | 32 | |
density | float | 0.8 | |
temperature | float | 1.0 | |
seed | int | 7 |
mixed_lj_fluid_example
Section titled “mixed_lj_fluid_example”def mixed_lj_fluid_example(*, particles: int = 32, density: float = 0.8, temperature: float = 1.0, seed: int = 7)Return a typed mixed LJ fluid.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
particles | int | 32 | |
density | float | 0.8 | |
temperature | float | 1.0 | |
seed | int | 7 |
periodic_cell_example
Section titled “periodic_cell_example”def periodic_cell_example() -> CellReturn the default reduced-unit demonstration cell.
Returns
Cell
toy_closed_shell_dft_example
Section titled “toy_closed_shell_dft_example”def toy_closed_shell_dft_example()Return a compact two-electron closed-shell Gaussian-well DFT toy system.
toy_one_electron_dft_example
Section titled “toy_one_electron_dft_example”def toy_one_electron_dft_example()Return a compact one-electron Gaussian-well DFT toy system.
toy_periodic_cluster_dft_example
Section titled “toy_periodic_cluster_dft_example”def toy_periodic_cluster_dft_example()Return a small periodic three-center Gaussian DFT toy system.
toy_two_center_dft_example
Section titled “toy_two_center_dft_example”def toy_two_center_dft_example()Return a two-center closed-shell Gaussian DFT toy system.
water_like_constrained_example
Section titled “water_like_constrained_example”def water_like_constrained_example()Return a small constrained water-like molecular mechanics system.