Automated Descriptor Engine for SNCI, SCDI, and 9D KNF
Project description
NCIForge
NCIForge is a physics-informed descriptor pipeline for non-covalent interactions. It computes KNF descriptors, SNCI/SCDI metrics, and KUID-family indexing artifacts from molecular structure files using xTB + NCI backend + KNF post-processing.
Current package version: 1.0.8
Release milestone tag: v1
What It Covers
- Generate KNF feature vectors (
f1..f9) for single files and batches - Generate full
KUIDidentifiers (instance-level) - Generate
KUID-Intensiveidentifiers (topology-family level) - Build reusable lookup artifacts (prefix, reverse, and bridge indexes)
- Recompute universal KUID outputs from existing batch folders (
--universal-kuid) - Generate canonical atlas bundle files (
--atlas-bundle)
Requirements
- Python
>=3.8 - External tools in
PATH:xtbobabel
Multiwfnonly when using--nci-backend multiwfn
Optional:
torchfor Torch NCI backend (CPU or CUDA)
Install
Fastest local install (from this repo):
Windows PowerShell:
./scripts/install_nciforge.ps1
macOS/Linux:
bash ./scripts/install_nciforge.sh
This opens an interactive CLI wizard that asks:
- install scope:
globalorlocalvirtual environment - PyTorch mode:
cpu,gpu, orskip - whether to auto-setup external dependencies (
xtb,obabel, etc.)
Manual source install:
git clone https://github.com/Prasanna163/KNF.git
cd KNF
pip install -e .
Install with Torch extra:
pip install -e ".[torch-nci]"
CLI Commands
Primary CLI:
nciforge
Compatibility alias (still supported):
knf
Example Runs
Single molecule:
nciforge example.mol
Batch run:
nciforge ./molecules --processing multi --workers 4 --force
GPU run (Torch CUDA):
nciforge ./molecules --gpu
--gpu enables smart GPU routing by default:
- Runs Torch NCI on CUDA first.
- If a molecule hits CUDA OOM, that molecule is re-routed to CPU automatically.
- The next molecule retries GPU automatically.
- Uses memory-friendlier
float32by default.
CPU run (no GPU):
nciforge ./molecules --cpu
--cpu forces CPU execution. If PyTorch is unavailable, KNF auto-falls back to
the Multiwfn CPU backend (when Multiwfn is installed).
Split into batches:
nciforge ./molecules --batches 4
Recompute universal KUID calibration from existing batch outputs:
nciforge ./existing_runs --universal-kuid
Generate canonical atlas submission bundle:
nciforge ./molecules --atlas-bundle
Outputs
Single-run outputs include:
knf.json(containskuidandkuid_intensivesections)kuid_calibration.json
Batch root outputs include:
batch_knf.jsonbatch_knf_unified.csvkuid_calibration.jsonkuid_intensive_calibration.jsonkuid_prefix_index.jsonkuid_topology_prefix_index.jsonkuid_instance_prefix_index.jsonkuid_full_topology_bridge.jsonkuid_full_topology_bridge.csvkuid_reverse_index.jsonkuid_reverse_index.csvkuid_topology_reverse_index.jsonkuid_topology_reverse_index.csvkuid_family_stats.jsonkuid_family_stats.csvkuid_intensive_family_distribution.csvkuid_intensive_family_distribution.png
With --water, water-suffixed variants are emitted (for example *_water.json, *_water.csv).
Atlas Submission Bundle
When --atlas-bundle is supplied, NCIForge writes:
submission_bundle/atlas_submission.csvsubmission_bundle/manifest.json
If prior batch outputs already exist, running --atlas-bundle can parse those
existing CSV outputs and generate the bundle without recomputing the KNF pipeline.
Legacy batch CSV names are still supported for upgrade compatibility.
After bundle creation, submission runs clean up auxiliary analysis/index artifacts in the same results root to keep exports lightweight.
atlas_submission.csv includes:
molecule_name,charge,spinf1..f9,SNCI,SCDI,SCDI_variancebackend,device,xtb_version,knf_core_versionnci_grid_spacing,nci_grid_padding,water_modeKUID_raw,KUID_ClusterKUID_Intensive_raw,KUID_Intensive_Clusterinstance_hash(sha256(f1..f9,charge,spin,xtb_version,nci_grid_spacing,nci_grid_padding)[:8])
Incremental Resume
When batch_knf_unified.csv already exists (legacy names are also supported,
including older atlas_submission.csv), and --force is not set, existing rows
are reused and only new files are processed.
Docker
Container workflows are documented in README.DOCKER.md.
Releasing
Release steps are documented in RELEASE.md.
License
MIT (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.8.tar.gz.
File metadata
- Download URL: knf-1.0.8.tar.gz
- Upload date:
- Size: 85.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cb82ff0ab763a19388ee04d1e31018bc8def06e5ac55f5c53fc9576dfcfc645
|
|
| MD5 |
944ae1e831a7b57755a89d855345550c
|
|
| BLAKE2b-256 |
6a093c9b7130674f26c2b65b98966a1c7e8f24edc7a93d0b064bcdf8b25ea00c
|
File details
Details for the file knf-1.0.8-py3-none-any.whl.
File metadata
- Download URL: knf-1.0.8-py3-none-any.whl
- Upload date:
- Size: 95.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a18870d1062c66e7601920ee8b63339e8f414f8be1051a3794a61d3b893ab0a9
|
|
| MD5 |
adbd41dc79b3bd017d7086c6c4e252d1
|
|
| BLAKE2b-256 |
73914b14df1a7aa9f4b86fd076ca0b98a4a532b6ad68def75da6014b5915227b
|