Skip to main content

Automated Descriptor Engine for SNCI, SCDI, and 9D KNF

Project description

NCIForge2_trans

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.7
Release milestone tag: v1

What It Covers

  • Generate KNF feature vectors (f1..f9) for single files and batches
  • Generate full KUID identifiers (instance-level)
  • Generate KUID-Intensive identifiers (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:
    • xtb
    • obabel
  • Multiwfn only when using --nci-backend multiwfn

Optional:

  • torch for 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: global or local virtual environment
  • PyTorch mode: cpu, gpu, or skip
  • whether to auto-setup external dependencies (xtb, obabel, etc.)
  • whether to install gxtb/dxtb helper packages

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 float32 by default.

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 (contains kuid and kuid_intensive sections)
  • kuid_calibration.json

Batch root outputs include:

  • batch_knf.json
  • batch_knf_unified.csv
  • kuid_calibration.json
  • kuid_intensive_calibration.json
  • kuid_prefix_index.json
  • kuid_topology_prefix_index.json
  • kuid_instance_prefix_index.json
  • kuid_full_topology_bridge.json
  • kuid_full_topology_bridge.csv
  • kuid_reverse_index.json
  • kuid_reverse_index.csv
  • kuid_topology_reverse_index.json
  • kuid_topology_reverse_index.csv
  • kuid_family_stats.json
  • kuid_family_stats.csv
  • kuid_intensive_family_distribution.csv
  • kuid_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.csv
  • submission_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, spin
  • f1..f9, SNCI, SCDI, SCDI_variance
  • backend, device, xtb_version, knf_core_version
  • nci_grid_spacing, nci_grid_padding, water_mode
  • KUID_raw, KUID_Cluster
  • KUID_Intensive_raw, KUID_Intensive_Cluster
  • instance_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

knf-1.0.7.tar.gz (84.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

knf-1.0.7-py3-none-any.whl (93.5 kB view details)

Uploaded Python 3

File details

Details for the file knf-1.0.7.tar.gz.

File metadata

  • Download URL: knf-1.0.7.tar.gz
  • Upload date:
  • Size: 84.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for knf-1.0.7.tar.gz
Algorithm Hash digest
SHA256 d4da9efec1db0ad4adee6168339623ca5ec52a1b67710cead7c41b494cd0aca3
MD5 6e9ec45ee62ed2b3ce20523d17f65a97
BLAKE2b-256 bec6b67e46aee6cf7fff6a7f8dea92923efcd275b0a2a81e3d378dc250c07a5d

See more details on using hashes here.

File details

Details for the file knf-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: knf-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 93.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for knf-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 0a048581dbff40b1ea1ad11051f09bd499e74640936c26340b9513ab13566502
MD5 68a651b9d5344b2a35caa10465910253
BLAKE2b-256 ad224535d58a57baa01c895fcf43f241615218ad3744c31344a0c9ec6d473c34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page