Skip to main content

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.
    • Tacticity Control: Supports Isotactic, Syndiotactic, and Atactic arrangements via center-of-mass analysis and mirroring.
    • 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+ (Zero external dependencies).

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.6-linux-x86_64.tar.gz).
  • Requirements: None. These are self-contained binaries.

Key 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 terminal capping (hydrogen addition).
    • Tacticity Control: Supports Isotactic, Syndiotactic, and Atactic arrangements.
    • Charge Assignment: Automatic partial charge calculation via Gasteiger method.
    • 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.
  • 📏 Robust Physics: Correct handling of PBC, Triclinic cells, and Minimum Image Convention (MIC).
  • 📦 Zero Dependency: No RDKit, no NumPy, no SciPy required for the core engine. Perfect for clean deployment.

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/en/

Metadata

Release files for fbtk 0.9.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for fbtk 0.9.8
File
fbtk-0.9.8-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl PyPy 3.10 PyPy 3.10 7.3 Linux glibc 2.17+ ARM64 Details
fbtk-0.9.8-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl PyPy 3.9 PyPy 3.9 7.3 Linux glibc 2.17+ ARM64 Details
fbtk-0.9.8-cp38-abi3-win_amd64.whl CPython 3.8 abi3 Windows x86-64 Details
fbtk-0.9.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 abi3 Linux glibc 2.17+ x86-64 Details
fbtk-0.9.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.8 abi3 Linux glibc 2.17+ ARM64 Details
fbtk-0.9.8-cp38-abi3-macosx_11_0_arm64.whl CPython 3.8 abi3 macOS 11.0+ ARM64 Details
fbtk-0.9.8-cp38-abi3-macosx_10_12_x86_64.whl CPython 3.8 abi3 macOS 10.12+ x86-64 Details

Total release size: 8.2 MB

Release files / fbtk-0.9.8-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fbtk-0.9.8-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3
SHA-256 checksum
How to use checksums
b1854b0cc49b85fe5d722b215afa114071397b1d7f2651579e49a65196174c7e
BLAKE2b-256 checksum
How to use checksums
3fcf65d204645462b91a153632a0f8af3556a70653ecaef8e2e52c5d2e00a77c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fbtk-0.9.8-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3
SHA-256 checksum
How to use checksums
3cb9d8072e856c536e7aa35a9dec47970a6ebb56c9aa2e97321b9d3723749f73
BLAKE2b-256 checksum
How to use checksums
dcfbad37fd81bd7703db7a1af49b5a44c8c6333f7a98259989b961cc899d51ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-cp38-abi3-win_amd64.whl

Download URL fbtk-0.9.8-cp38-abi3-win_amd64.whl
Size 996.2 kB
Tags CPython 3.8 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
223b195c4354c944217ad247d8a563cfb501e4e5e28f124895585dc9f39b3f6d
BLAKE2b-256 checksum
How to use checksums
e4506acbaca1f3b8ad9eb4200553969b1247b3d7cd446f80fda5883193a7d2d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fbtk-0.9.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 1.3 MB
Tags CPython 3.8 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
422154dbfb785cd25481669157a0a9059eb13744bf4f125f657e5ca425f2b0cf
BLAKE2b-256 checksum
How to use checksums
3a3221485d4c7dcc4449ffc9d400a921704a4707f58bdd4024163b05a3e21e82
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fbtk-0.9.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 1.2 MB
Tags CPython 3.8 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
60b841559764631f414390fccfbc48a19a6e1a242d05f48bb478a4894d60d6b6
BLAKE2b-256 checksum
How to use checksums
8e19e622c4ad9fe5ae3c37c0b86ae703953e21aa648230c578907a861fcbf9b8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-cp38-abi3-macosx_11_0_arm64.whl

Download URL fbtk-0.9.8-cp38-abi3-macosx_11_0_arm64.whl
Size 1.1 MB
Tags CPython 3.8 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e22b4cbd99452bc8801bc5c7ec814df7f959ebd159bc8cd61c4a8586e43083a4
BLAKE2b-256 checksum
How to use checksums
a174429532af45ffa0187e744c3094b8a5998a1d8f95ab426445700542ec9067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release files / fbtk-0.9.8-cp38-abi3-macosx_10_12_x86_64.whl

Download URL fbtk-0.9.8-cp38-abi3-macosx_10_12_x86_64.whl
Size 1.2 MB
Tags CPython 3.8 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
bf851a8ea952cc7636bf8beb675b9e2fe2e336428879ba2a3353ce65e18a0878
BLAKE2b-256 checksum
How to use checksums
6a99186ee8c897333b925275991257153a5fad1146b3d3264aebc7f95e223973
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.12.6

Release history Release notifications | RSS feed

This release

0.9.8 This release

7 release files

0.9.7

9 release files

0.9.6

8 release files

0.9.5

15 release files

0.9.4

7 release files

0.9.3

7 release files

0.9.2

16 release files

0.9.1

26 release files

0.9.0

26 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page