Qn-Util — Qn Network Analysis and RMC Constraint Generation
Qn-Util is a Python library for constructing and analyzing Qn networks and generating constraint files for RMC_POT, using VASP POSCAR/CONTCAR structures and JSON configuration files as input. It outputs Qn distributions, network connectivity information, and analysis reports.
The library is primarily intended for generating RMC_POT constraint files and is used for research and study purposes.
Main Components
VaspStructure: Reads POSCAR files and calculates distances and angles under periodic boundary conditions.QnNetworkAnalysis: Builds networks from JSON configurations, counts Qn species, and outputs connectivity information and analysis results.RmcConstraintWriter: Generates FNC=3 constraint files, unit definitions, and network topology files for RMC_POT.QnNetworkBuilder: A facade that preserves existing calling conventions and provides combined access to analysis and output functions.ConfigError: An exception for configuration and input validation errors.
Input and Output
Inputs are structural files in POSCAR/CONTCAR format and JSON configuration files. Outputs include *_qn.csv, *_network_bonds.csv, *_report.txt, *_rmc_fnc3.fnc, and *_rmc_unit.top. See the tutorials for required configuration parameters and the meaning of the constraints.
Python API Example
from qn_util.qn_network_builder import QnNetworkBuilder
builder = QnNetworkBuilder.from_poscar("POSCAR", "qn_config.json")
print(builder.get_qn_counts())
builder.write_analysis("sample")
builder.write_all("sample")
write_all generates analysis results and RMC input files. See scripts/ for concrete configuration examples.
Installation
pip install qn-util
Installing Example Scripts
After installing the package, run the following command in your working directory to copy the files bundled under scripts/ (Python scripts and qn_config.json) into the current directory.
qn_util install
If files with the same names already exist, the command exits with an error without overwriting them. Specify --force only when you want to overwrite existing files.
qn_util install --force
Documentation
The tutorials cover Qn networks, FNC, topology, JSON configuration, and future development. The API Reference is generated from source docstrings.
Metadata
Release files for qn-util 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qn_util-0.0.0.tar.gz | 25.7 kB | With provenance | Details for qn_util-0.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qn_util-0.0.0-py3-none-any.whl | Python 3 | none | any | Details for qn_util-0.0.0-py3-none-any.whl |
Total release size: 52.8 kB
Release files / qn_util-0.0.0.tar.gz
| Download URL | qn_util-0.0.0.tar.gz |
|---|---|
| Size | 25.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d852061879bb67b46a7108a6e4ef8a34d46f34515f7199a5d25dd131d1efa5e
|
|
BLAKE2b-256 checksum How to use checksums |
5441ccdb3b901d23d5560bad207a9917f7e26730713335a832a3d65767108964
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / qn_util-0.0.0-py3-none-any.whl
| Download URL | qn_util-0.0.0-py3-none-any.whl |
|---|---|
| Size | 27.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16af87cd14ea8ee4f3545e8c81895bad7e2e57eccd2c80c824a0a1dfbc8fc657
|
|
BLAKE2b-256 checksum How to use checksums |
1c21606fabd4808af7482fe0afffa6efbcca0b0edd54ae443d5d87d54ab2e585
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for qn-util 0.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for qn_util-0.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.