Metadata-Version: 2.4
Name: tkasegui
Version: 0.9.1
Summary: Unofficial ASE GUI extension
Home-page: https://gitlab.com/Avakyan/tkasegui
Author: Leon Avakyan
Author-email: laavakyan@sfedu.ru
License: LGPL-2.1-or-later
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ase<3.31,>=3.23
Requires-Dist: numpy>=1.24
Provides-Extra: gui
Requires-Dist: matplotlib>=3.7; extra == "gui"
Provides-Extra: mlip
Requires-Dist: matgl; extra == "mlip"
Provides-Extra: test
Requires-Dist: pytest>=7.4; extra == "test"
Requires-Dist: pytest-timeout>=2.2; extra == "test"
Requires-Dist: pytest-cov>=5; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# tkinter Atomic Simulation Environment Graphical User Interface

The unofficial GUI for [ASE](https://wiki.fysik.dtu.dk/ase/ase/).

An attempt to preserve and develop the good old GUI version.
(See (https://gitlab.com/ase/ase/-/issues/492), (https://gitlab.com/ase/ase/-/merge_requests/1862))

## Features
- Undo/redo and cut/copy/paste atom editing;
- Bulk crystal, nanoparticle, nanotube, and surface-slab setup dialogs;
- ASE-style constraint editing with `Fix`, `Release`, `Clear all constraints`,
  and per-axis `FixCartesian` controls;
- Interfaces for Lennard-Jones, EMT, GPAW, a harmonic bond toy calculator,
  and MatGL machine learning interatomic potential (MLIP);
- Calculation of total energy and forces, with energy/max-force status readout;
- Relaxation of atomic structures;
- Molecular dynamics with optional Maxwell-Boltzmann velocity initialization,
  stationary/zero-rotation options;
- Per-frame charge preservation and syncing for trajectories and exports;
- Trajectory export with cached calculator results and charges preserved;
- Trajectory analysis with multi-frame radial distribution functions;
- Velocity/force autocorrelation with frame strides, lag limits, and
  all/selected/visible atom scopes;
- Phonon DOS from the velocity autocorrelation function, plotted in `THz`,
  `eV`, or `cm^-1`;
- IR spectra from charge-weighted atomic velocities, plotted in `THz`, `eV`,
  or `cm^-1`;

## Analysis tools
- `Analysis -> Autocorrelation ...` computes velocity or force autocorrelation
  functions. The default timestep is taken from the current Dynamics settings.
- `Analysis -> Phonon DOS ...` computes a non-normalized phonon DOS from the
  velocity autocorrelation function. The Python API also accepts
  `normalize=True`.
- `Analysis -> IR spectra ...` computes a raw one-sided `|FFT(dμ/dt)|²`
  spectrum using `dμ/dt = Σᵢ qᵢ vᵢ`. Charges are read from
  `Atoms.arrays['initial_charges']` or cached calculator results; ASE dipole and
  polarization helpers are not used. Per-frame charge changes are accepted,
  while `dqᵢ/dt` is neglected.

## Requirements
- Python 3.11 or newer;
- ASE 3.23 or newer (below 3.31);
- NumPy 1.24 or newer;
- Matplotlib 3.7 or newer;
- MatGL (optional, for MLIP);
- A working Tk installation with a display.

## Installation


Stable version is avaialble through PyPi:

```bash
pip install tkasegui
```


The up-to-date development version may be installed as follows:

```bash
pip install .
```

For development:

```bash
pip install -e '.[test,gui]'
```

For optional MatGL MLIP support:

```bash
pip install '.[mlip]'
```

Select the MLIP model folder from `Simulation -> Set Calculator -> MLIP -> Setup`.

Run the GUI with:

```bash
tkasegui
```

or:

```bash
python -m tkasegui
```

Run without opening a GUI using:

```bash
python -m tkasegui -t trajectory.traj -g i,e
```

## Tests
Headless numerical and CLI tests:

```bash
pytest -m "not gui"
```

GUI tests require X11 emulation:

```bash
xvfb-run -a pytest -m gui
```

All tests:

```bash
xvfb-run -a pytest
```
