Skip to main content

A neural network for predicting Fukui indices using Kernel-based Attention Networks (KAN) with Chebyshev graph convolutions

Project description


license: mit language:

  • en tags:
  • chemistry
  • biology
  • DFT
  • molecular-property-prediction
  • graph-neural-networks
  • fukui-indices
  • reactivity
  • pytorch library_name: transformers

Fukui_Net

Neural network for predicting Fukui indices using Kernel-based Attention Networks (KAN) with Chebyshev graph convolutions.

Installation

# Clone and install
git clone https://huggingface.co/Nikolenko-Sergei/FukuiNet
cd FukuiNet
uv sync

Usage

CLI Interface

The CLI provides a simple interface for molecular analysis:

# Check available devices and model info
uv run fukui_net info

# Predict single molecule
uv run fukui_net predict "CCO" --device cuda:1

# Batch prediction from CSV file
uv run fukui_net predict --csv molecules.csv --output predictions.csv --device cuda:1

CLI Options:

  • --device: Specify device (cpu, cuda:0, cuda:1, etc.)
  • --csv: Input CSV file with SMILES column
  • --output: Output CSV file for batch predictions
  • --column: Name of SMILES column in CSV (default: "smiles")

Input CSV format:

smiles,name
CCO,Ethanol
c1ccccc1,Benzene

Output CSV format:

smiles,fukui_indices
CCO,"[-0.322, -0.122, -0.935, ...]"
c1ccccc1,"[-0.280, -0.280, ...]"

Python API

from transformers import AutoModel

# Load model from Hugging Face Hub
model = AutoModel.from_pretrained(
    "Nikolenko-Sergei/FukuiNet",
    trust_remote_code=True
)

# Predict Fukui indices
fukui_indices = model.predict("CCO")
print(f"Fukui indices: {fukui_indices}")

# Batch prediction
results = model.predict_batch(["CCO", "c1ccccc1"])

Direct Usage

from fukui_net.predictor import FukuiNetPredictor

# Load predictor
predictor = FukuiNetPredictor("models/final_model.ckpt", device="cuda:1")

# Predict
fukui_indices = predictor.predict_smiles("CCO")

Model Architecture

  • Graph Neural Network: Molecular structure as graphs
  • Kernel-based Attention Networks (KAN): Advanced attention mechanisms
  • Chebyshev Convolutions: Efficient graph operations
  • RDKit Integration: Molecular featurization

Input/Output Format

Input: SMILES strings (e.g., "CCO", "c1ccccc1")

Output: List of Fukui indices for each atom

  • Positive values: Electrophilic sites
  • Negative values: Nucleophilic sites
  • Magnitude: Reactivity strength

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

fukui_net-0.1.0.tar.gz (16.6 MB view details)

Uploaded Source

Built Distribution

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

fukui_net-0.1.0-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file fukui_net-0.1.0.tar.gz.

File metadata

  • Download URL: fukui_net-0.1.0.tar.gz
  • Upload date:
  • Size: 16.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for fukui_net-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c45ba6dd2a6129edbf1ff8f5c45eca6d726ec111aa0c1a01147b2107b258c16e
MD5 c298aa3d219116c5b475a37a4fd26ae3
BLAKE2b-256 7c81a3e4ee90e695637f279ba2220f70487b510f3303eabbdb76982d0e98bef1

See more details on using hashes here.

File details

Details for the file fukui_net-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fukui_net-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for fukui_net-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 00c7538f0bcdf23fa4a19b4f60441844ff10af5523844bbc547e611decd53652
MD5 2581909a243d620619ca8a1fc505f0a8
BLAKE2b-256 0ba4f578986a25b86b7e97e7cf00848dc2f14e772797cf381fea41e56a3579f5

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