Metadata-Version: 2.4
Name: NepTrainKit
Version: 3.0.0
Summary: Visualize, diagnose, and manipulate NEP training datasets.
Author-email: Chen Cheng bing <1747193328@qq.com>
License-Expression: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/aboys-cb/NepTrainKit
Project-URL: Documentation, https://github.com/aboys-cb/NepTrainKit
Project-URL: Repository, https://github.com/aboys-cb/NepTrainKit
Project-URL: Issues, https://github.com/aboys-cb/NepTrainKit/issues
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Chemistry
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Scientific/Engineering :: Physics
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <3.14,>=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: THIRD_PARTY_NOTICES.md
Requires-Dist: PySide6==6.9.0
Requires-Dist: PySide6-Fluent-Widgets>=1.7.0
Requires-Dist: loguru>=0.7.2
Requires-Dist: requests>=2.32.3
Requires-Dist: packaging>=24.0
Requires-Dist: pyqtgraph>=0.13.7
Requires-Dist: PyOpenGL>=3.1.7
Requires-Dist: numpy>=1.26.0
Requires-Dist: vispy>=0.14.3
Requires-Dist: ase
Requires-Dist: nep-adapters>=1.0
Requires-Dist: scipy>=1.15.0
Requires-Dist: SQLAlchemy>=2.0.0
Provides-Extra: test
Requires-Dist: pytest>=7.0; extra == "test"
Requires-Dist: pytest-qt>=4.2.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: codecov>=2.0.0; extra == "test"
Requires-Dist: ruff>=0.12.0; extra == "test"
Requires-Dist: scikit-learn>=1.5.0; extra == "test"
Requires-Dist: tomli>=2.0; python_version < "3.11" and extra == "test"
Dynamic: license-file

<div align="center">
<a href="https://github.com/aboys-cb/NepTrainKit">
  <img src="https://raw.githubusercontent.com/aboys-cb/NepTrainKit/master/src/NepTrainKit/src/images/logo.png" width="25%" alt="NepTrainKit logo">
</a><br>
<a href="https://pypi.org/project/NepTrainKit"><img src="https://img.shields.io/pypi/dm/NepTrainKit?logo=pypi&logoColor=white&color=blue&label=PyPI" alt="PyPI downloads"></a>
<a href="https://python.org/downloads"><img src="https://img.shields.io/badge/Python-3.10--3.13-blue.svg?logo=python&logoColor=white" alt="Python version"></a>
<a href="https://codecov.io/github/aboys-cb/NepTrainKit"><img src="https://codecov.io/github/aboys-cb/NepTrainKit/graph/badge.svg?token=HQ5FMLD91F" alt="Codecov"></a>
<a href="https://github.com/aboys-cb/NepTrainKit/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0--or--later-blue" alt="License"></a>
<br><br>
<strong>English</strong> | <a href="https://github.com/aboys-cb/NepTrainKit/blob/master/README.zh-CN.md">简体中文</a>
</div>

# NepTrainKit

NepTrainKit is a desktop application for preparing, auditing, and visualizing training datasets for neuroevolution potentials (NEPs). It complements, rather than replaces, long-running GPUMD training or DFT calculations. Its focus is the repetitive work around those calculations: generating candidate structures, cleaning problematic samples, selecting representative configurations, and passing a well-prepared dataset back into the DFT and GPUMD workflow.

## What you can do

- **Make Dataset**: generate strained, perturbed, defective, surface, doped, magnetic, and solvated candidate structures with composable cards.
- **NEP Dataset Display**: inspect structures, errors, and distributions; remove problematic samples; and export a clean subset.
- **Representative selection**: reduce a candidate pool to a smaller, more representative set with methods such as farthest point sampling (FPS).
- **Training-result inspection**: load NEP- and DeepMD-related outputs, locate high-error structures, and identify data gaps for the next iteration.
- **Project tracking**: use Data Management to record models, dataset paths, and notes across multiple iterations.

## Installation

We recommend installing NepTrainKit in a dedicated Python environment. Python 3.10 through 3.13 is supported.

```bash
conda create -n nepkit python=3.10
conda activate nepkit
pip install NepTrainKit
```

After installation, launch the application with either command:

```bash
nepkit
# or
NepTrainKit
```

### NEP compute backend

NepTrainKit does not compile the NEP compute backend into the application. `pip` installs the separate `nep-adapters` dependency:

| Platform | Installed backend |
| --- | --- |
| macOS / Windows | CPU |
| Linux x86_64 | CPU and CUDA in one wheel |

The Linux CUDA path requires a compatible NVIDIA driver, but installing the wheel does not require a local CUDA toolkit or NVCC. Source builds and supported CUDA architectures are documented in the [NEPAdapters repository](https://github.com/MagTheoryLab/NEPAdapters).

After launching NepTrainKit, select `Auto`, `CPU`, or `CUDA` under `Settings → NEP Backend`. `Auto` uses CUDA when the installed wheel, driver, and model support it; otherwise NepTrainKit explains why it is continuing on CPU. Explicit `CUDA` requests fail instead of silently changing backend.

`Settings → NEP Settings → NEP runtime updates` can install a compatible `nep-adapters` update without replacing NepTrainKit. NepTrainKit also checks this runtime in the background whenever the app opens; no-update and network-failure cases stay silent, while an available update opens an installation prompt. Pip installations store the managed wheel under the user configuration directory; the Windows standalone build stores it under `runtime/nep-adapters/versions` beside `NepTrainKit.exe`. A wheel is activated only after SHA256 verification and a fresh-process health check, and takes effect after restart.

Confirm the installed runtime with:

```bash
python -c "import nep_adapters as n; print(n.backend_status('cpu')); print(n.backend_status('cuda'))"
```

### Windows package

If you prefer not to compile NepTrainKit locally, download `NepTrainKit.windows-x86_64.zip` from [GitHub Releases](https://github.com/aboys-cb/NepTrainKit/releases). This package requires 64-bit Windows on x86_64 hardware.

## Documentation and support

- User documentation: [neptrainkit.readthedocs.io](https://neptrainkit.readthedocs.io/en/latest/)
- Release notes: [GitHub Releases](https://github.com/aboys-cb/NepTrainKit/releases)
- Bug reports and feature requests: [GitHub Issues](https://github.com/aboys-cb/NepTrainKit/issues)
- Community: [QQ group invitation](https://qm.qq.com/q/wPDQYHMhyg)

If this is your first time using NepTrainKit, begin with **Quickstart** and **Cleaning candidate structures before DFT** in the user documentation. If you already know which class of configurations you need, go directly to the Make Dataset card reference.

## Citation

If NepTrainKit contributes to your research, please cite:

```bibtex
@article{CHEN2025109859,
title = {NepTrain and NepTrainKit: Automated active learning and visualization toolkit for neuroevolution potentials},
journal = {Computer Physics Communications},
volume = {317},
pages = {109859},
year = {2025},
issn = {0010-4655},
doi = {https://doi.org/10.1016/j.cpc.2025.109859},
url = {https://www.sciencedirect.com/science/article/pii/S0010465525003613},
author = {Chengbing Chen and Yutong Li and Rui Zhao and Zhoulin Liu and Zheyong Fan and Gang Tang and Zhiyong Wang},
}
```

## License and third-party code

NepTrainKit is licensed under the GNU General Public License v3.0 or later. See [LICENSE](./LICENSE) for details.

NEP computation is provided by the separate [nep-adapters](https://github.com/MagTheoryLab/NEPAdapters) dependency. NepTrainKit no longer vendors the NEP_CPU or GPUMD backend source trees.

See [THIRD_PARTY_NOTICES.md](./THIRD_PARTY_NOTICES.md) for the remaining attribution in this repository. The `nep-adapters` distribution carries its own backend source notices and licenses.
