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.
    • 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/

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.7-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ i686

fbtk-0.9.7-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARMv7l

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

Uploaded PyPymanylinux: glibc 2.17+ ARM64

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

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fbtk-0.9.7-cp38-abi3-win_amd64.whl (926.5 kB view details)

Uploaded CPython 3.8+Windows x86-64

fbtk-0.9.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view details)

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

fbtk-0.9.7-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.7-cp38-abi3-macosx_11_0_arm64.whl (1.0 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fbtk-0.9.7-cp38-abi3-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file fbtk-0.9.7-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

  • Download URL: fbtk-0.9.7-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
  • Upload date:
  • Size: 1.2 MB
  • Tags: PyPy, manylinux: glibc 2.17+ i686
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fbtk-0.9.7-pp311-pypy311_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4dc2468ba5a2400b63bcec357c61a60fd0f1839b1863224d6efd5eada06ab170
MD5 a037c80fb040b86ce158c59137bcea7c
BLAKE2b-256 b2a6935484f2734814dcc1b33d86021f8bcdd9a89478957aa235fc0fcbf3ba66

See more details on using hashes here.

File details

Details for the file fbtk-0.9.7-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

  • Download URL: fbtk-0.9.7-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: PyPy, manylinux: glibc 2.17+ ARMv7l
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fbtk-0.9.7-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 f54d8dce0e3f0f16967253dca1cdc10836c59a2edb0caa1e138426af37b10987
MD5 d2f0371cd5dcbbc3b7e7794806148971
BLAKE2b-256 749d05b6b24c61ca5c0c6b4451da69fcb8abe4a48334d1fdaaffc548c30201ff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b1e26f23183a36d2e924f62bf46d596f06f18c8caaf3b4ff1ecb37180337fc1a
MD5 e0ab07b467223d7b936f56ce326af470
BLAKE2b-256 f554ec7edbc864db065fec6d383586281dda2d2204aa6a6268e3ef9dab9923d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 c3ac347458002267750e3ce9331caa2c81f8975d9af285068e7aeffabeb7191b
MD5 0c03300de4ed908c3ea85317abbc3b2d
BLAKE2b-256 91c17f673eab4b18dc286fd48538f0eeeaa2a1509efe5f5833d3111abd490adb

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fbtk-0.9.7-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 fc44094aece16e71e15f4a4f7cde793bd548d548de1eab31c43f8a6456788aab
MD5 e5f68dce00eded32302d815807d789da
BLAKE2b-256 b2f72998f2b8f3eeba6504b3914cabc8b9ca648f0588ada4153bdadc34bbc63d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 15f4abdb20de04eb8f12697a3129191f1c7869a624ae15db4a07de0385c40e5b
MD5 7315d9c0e4f36233945cf3f2c0f6eab8
BLAKE2b-256 af9cc3848e178b90b70c21e49e6eca4a5701615be4454a3334f4ceb999be40ab

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8bd1cab64103b3622e58d7c54ce951cd2abe83e567f5dd8922abd2334b6acee6
MD5 ef0be88e1791f3aa18261508245be0a6
BLAKE2b-256 f3a2747e6533b3d5eda2ed104c56fc08c6265c9e1df51fe79f9a0d8a42953dbf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3b7c7930deb5b68f32ec596ccc4b32a2574fe077fe247a120583c8e22cbe4af2
MD5 9d28e23ab86c2e74e70832d252aa8b53
BLAKE2b-256 864c6ba30981e758b3372cfa32b398844a3daa05fcba6280c3f9ac976ba3ecad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.7-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f76c49ae22870bff4e0b87792dcb6c6c127129020a17213611de66454f5c601b
MD5 1b6ac4f98482d7635058c30d8fbdc7b8
BLAKE2b-256 6315e7bc861cebbc5e3eb39c18e1bac08c8a66839f2143ebb37b9a2860cb4254

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