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.8-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fbtk-0.9.8-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded PyPymanylinux: glibc 2.17+ ARM64

fbtk-0.9.8-cp38-abi3-win_amd64.whl (996.2 kB view details)

Uploaded CPython 3.8+Windows x86-64

fbtk-0.9.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

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

fbtk-0.9.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

fbtk-0.9.8-cp38-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

fbtk-0.9.8-cp38-abi3-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b1854b0cc49b85fe5d722b215afa114071397b1d7f2651579e49a65196174c7e
MD5 7cb6212a0d7806e673e91bbe4c9368e1
BLAKE2b-256 3fcf65d204645462b91a153632a0f8af3556a70653ecaef8e2e52c5d2e00a77c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3cb9d8072e856c536e7aa35a9dec47970a6ebb56c9aa2e97321b9d3723749f73
MD5 60235c763812f1d649d5297077b33f29
BLAKE2b-256 dcfbad37fd81bd7703db7a1af49b5a44c8c6333f7a98259989b961cc899d51ed

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fbtk-0.9.8-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 223b195c4354c944217ad247d8a563cfb501e4e5e28f124895585dc9f39b3f6d
MD5 296d9daf5716c704eccd3e18ea4473d6
BLAKE2b-256 e4506acbaca1f3b8ad9eb4200553969b1247b3d7cd446f80fda5883193a7d2d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 422154dbfb785cd25481669157a0a9059eb13744bf4f125f657e5ca425f2b0cf
MD5 76df10c12ba653c0af32c6c42f60ea94
BLAKE2b-256 3a3221485d4c7dcc4449ffc9d400a921704a4707f58bdd4024163b05a3e21e82

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 60b841559764631f414390fccfbc48a19a6e1a242d05f48bb478a4894d60d6b6
MD5 ce816dc5c334486b1eb2cd0e9e80cb4f
BLAKE2b-256 8e19e622c4ad9fe5ae3c37c0b86ae703953e21aa648230c578907a861fcbf9b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e22b4cbd99452bc8801bc5c7ec814df7f959ebd159bc8cd61c4a8586e43083a4
MD5 fde4d633e1bc33042ae642200f0283db
BLAKE2b-256 a174429532af45ffa0187e744c3094b8a5998a1d8f95ab426445700542ec9067

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fbtk-0.9.8-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bf851a8ea952cc7636bf8beb675b9e2fe2e336428879ba2a3353ce65e18a0878
MD5 70fddb358763b0e7dd51d817e93b2ef8
BLAKE2b-256 6a99186ee8c897333b925275991257153a5fad1146b3d3264aebc7f95e223973

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