Automated Descriptor Engine for SNCI, SCDI, and 9D KNF
Project description
KNF-CORE
KNF-CORE is an automated computational chemistry pipeline for generating KNF descriptors from molecular structure files. It combines xTB + Multiwfn + custom post-processing to produce:
- SNCI
- SCDI variance
- 9D KNF vector (
f1...f9)
Version
Current package version in this branch: 1.0.2
What This Branch Includes
- Automatic input conversion to XYZ when needed (via Open Babel)
- Single-file and directory processing modes
- Auto-configured multi-worker batch mode
- Internal UTF/filename artifact normalization for robust file discovery
- Dockerized runtime (
Dockerfile,docker-compose.yml, container entrypoint) - Updated fragment handling rules
Fragment behavior:
1fragment:f1 = 0.0,f2 = 180.02fragments:f1= COM distance,f2= detected H-bond angle>2fragments:f1= average COM distance over all unique pairs,f2 = 180.0
Requirements
- Python
>=3.8 xtbinPATHobabel(Open Babel) inPATHMultiwfninPATH
Install
From PyPI:
pip install KNF
From source:
git clone https://github.com/Prasanna163/KNF.git
cd KNF
pip install .
CLI Usage
Basic run:
knf input_molecule.sdf
Useful options:
--charge <int>: total charge (default0)--spin <int>: multiplicity (default1)--force: recompute stages--clean: remove prior working folder for that input--debug: verbose logging--processing <single|multi>(alias:--processes)--workers <int>: explicit workers for multi mode--output-dir <path>: custom results root--ram-per-job <MB>: RAM hint for auto worker selection--refresh-autoconfig: regenerate auto-config cache--storage-efficient: delete heavy intermediates after each successful molecule
Example:
knf example.mol --charge 0 --force
Directory batch example:
knf ./molecules --processing multi --force
Python API
from knf_core.pipeline import KNFPipeline
pipeline = KNFPipeline(
input_file="test.sdf",
charge=0,
spin=1,
)
pipeline.run()
Output Layout
Default output root:
- File input:
<input_parent>/Results/<input_stem>/ - Directory input:
<input_dir>/Results/<file_stem>/
Typical output files:
knf.jsonoutput.txtxtbopt.xyz- xTB/Multiwfn intermediates (
wbo,molden.input,nci_grid.txt, etc.)
Batch mode also writes:
batch_knf.jsonat the batchResultsroot, containing:- per-input status/error/timing
- embedded content of each successful
knf.json - a combined
knf_resultslist for ML training pipelines
Docker
Quick run:
docker build -t knf-core:latest .
docker run --rm -v "$(pwd):/work" -w /work knf-core:latest example.mol --charge 0 --force
Compose:
docker compose up --build
Full Docker documentation is in README.DOCKER.md.
Releasing
PyPI release steps are documented in RELEASE.md.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file knf-1.0.2.tar.gz.
File metadata
- Download URL: knf-1.0.2.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c419ac6883dada531556bdc4618cb06d074386db0d566e8f6cd91f257e3a8abd
|
|
| MD5 |
124ab71ab8f2dac01607ebfee94c6f49
|
|
| BLAKE2b-256 |
3ea5cc55ffd8ece3cdb6d0081e25ce99bdfa467c46f99dc6cbc3ccac19fbce18
|
File details
Details for the file knf-1.0.2-py3-none-any.whl.
File metadata
- Download URL: knf-1.0.2-py3-none-any.whl
- Upload date:
- Size: 31.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c88f07f88a9e48e7aaab7ab3cf4f455a7b85b6fca10ea9a8a0930022509c53fe
|
|
| MD5 |
f6295a21dc906872b3e89c79eea4a2fe
|
|
| BLAKE2b-256 |
e59e8c98090bb4886d02141529d4463390935a1ce8446309881060a225046167
|