Skip to main content

High-performance molecular simulation toolkit with Python bindings

Project description

FBTK: Forblaze Toolkit

PyPI - Version Documentation

High-performance molecular analysis and building tools powered by Rust. Designed as a "Transparent Accelerator" for Python (ASE/RDKit) workflows with a smart, object-oriented interface.

Features

  • 🚀 High Performance: Core logic written in Rust with parallel processing (Rayon).
  • 🏗️ Intelligent Builder:
    • Optimized Initial Packing: Grid-based placement with uniform density.
    • Polymer Synthesis: Automatic chain generation with leaving atom support.
    • Built-in 3D Generation: 3D coordinate generation from SMILES handled by internal VSEPR + UFF engine.
    • Fast Structural Relaxation: O(N) Cell-list optimization with the FIRE algorithm.
  • 🔍 Advanced Analysis:
    • Parallel RDF, MSD, COM (Center of Mass), Angles, Dihedrals.
    • O(N) Neighbor List search.
  • 📏 Robust Physics: Correct handling of PBC, Triclinic cells, and Minimum Image Convention (MIC).

Installation

Python Library (Recommended)

pip install fbtk

Requirements: Python 3.8+ and NumPy.

Standalone CLI (No Python Required)

For non-Python environments, pre-compiled standalone binaries for Linux, Windows, and macOS are available on the GitHub Releases page.

  • Download the archive for your platform (e.g., fbtk-cli-v0.9.1-linux-x86_64.tar.gz).
  • Requirements: None. These are self-contained binaries.

Usage

1. System Building

Build and relax a complex molecular system with just a few lines of code.

import fbtk

# 1. Setup Builder
builder = fbtk.Builder(density=0.8)
builder.add_molecule_smiles("ethanol", count=50, smiles="CCO")

# 2. Build and Relax
system = builder.build()
system.relax(steps=500)

# 3. Export to ASE
atoms = system.to_ase()
atoms.write("system.xyz")

2. RDF Analysis

Fast analysis of large trajectories using smart selection queries.

from ase.io import read
import fbtk

# Load trajectory (ASE list of Atoms)
traj = read('simulation.lammpstrj', index=':')

# Compute RDF using a simple query string
r, g_r = fbtk.compute_rdf(traj, query="O-H", r_max=10.0)

3. Command Line Interface (CLI)

FBTK provides standalone CLI tools for batch processing.

fbtk-build: Build from Recipe

# Run building and relaxation from a YAML recipe
fbtk-build --recipe recipe.yaml --relax --output system.mol2

Example recipe.yaml:

system:
  density: 0.8
  cell_shape: [20.0, 20.0, 20.0]
components:
  - name: "ethanol"
    role: "molecule"
    input:
      smiles: "CCO"
    count: 50

fbtk-analyze: Analyze Trajectory

# Compute RDF for a LAMMPS trajectory
fbtk-analyze rdf --input traj.lammpstrj --query "type 1 with type 2"

Selection Query Syntax

FBTK supports intuitive strings to select atoms for analysis:

  • Element: "O", "H", "element C"
  • Pairs (RDF): "O-H", "C - C"
  • Index Range: "index 0:100" (start:end)
  • Residue: "resname STY"

Author

Forblaze Project
Website: https://forblaze-works.com/

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

fbtk-0.9.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fbtk-0.9.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fbtk-0.9.3-cp38-abi3-win_amd64.whl (882.3 kB view details)

Uploaded CPython 3.8+Windows x86-64

fbtk-0.9.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

fbtk-0.9.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fbtk-0.9.3-cp38-abi3-macosx_11_0_arm64.whl (995.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fbtk-0.9.3-cp38-abi3-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file fbtk-0.9.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 25346c1cfb453a91d7ee8f96440f4d0c812babbc69c1754a334d14c922579a7f
MD5 208c1b9904e80fdd76046faa850bc691
BLAKE2b-256 72f6060a175c06c79b74cae4697f9bd789bf4ccf505f7b966878adfe6f8c12c6

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2271400ef12183542f8a593ca9e6ed93e16c52f415cbb33fc61983d371fe6d2c
MD5 e8164854d36b7fa6533b43d95fd3cf5f
BLAKE2b-256 077c7a3fd2fcd0e15fc49f789e58ad8427b8c492c9b21b7dbbe3d2128df9516c

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: fbtk-0.9.3-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 882.3 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.12.0

File hashes

Hashes for fbtk-0.9.3-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 cae3ebc7c041e1c91a22041486dacb8ad6f902104a0f5d494a09d597013869d9
MD5 3ff29966ca30c8d4ce45eece06aef597
BLAKE2b-256 5754cd68cf0995c78bcfebdd4b42ba0f2802a0fb81226aa414f4702d12d59019

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ee3f7cfa349e4c174066ad175ae2abd88630909e7bb391c4559ad0b8e424b76c
MD5 82d48b2f95d8f3fff7bb43e13d32d9a5
BLAKE2b-256 db67be01abe6d3e0066386c50f23d65218e069949a28b129b87f05a75c69d8b8

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a78be11c4bd1280e798badb1d76d7f71d775dfff050cc1889d2ff2a07411bcf1
MD5 85ac092ddb54a515df05482e262696f9
BLAKE2b-256 01b310b8c6ea548189e529bae5fd4d606e241cee9a5227e45f6571a8b9a5f267

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f57ba2a43c4c7b79b5fe375379775841d0ac67aa6670e35359f5eaf864d539fa
MD5 41dfd90c9b0ef64a056e1e8728e636f1
BLAKE2b-256 9ce19fb190f8f2ae11c588c72d42411477ca1ecb90d4a181b083359d7faf144a

See more details on using hashes here.

File details

Details for the file fbtk-0.9.3-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fbtk-0.9.3-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 68a7dc87200cba5e22dff21597feb70207dd36f202cca4568d4c08332f3b6e04
MD5 45811decbd2bf3849e6b4ec088b150ac
BLAKE2b-256 e81cf4e08b51b4a48183de60987964ef9f068736e591051deec8ae344c3b7372

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