FFCharge banner

FFCharge

1 devlogs
21h 0m 8s

FFCharge is a lightweight, pure Rust library for fast, residue-based force field partial charge assignment in molecular modeling pipelines. It provides pre-computed atomic partial charges from AMBER and CHARMM force fields for proteins, nucleic acids, water, and ions.

Designed with no_std support and zero runtime dependencies, FFCharge is ideal for high-performance molecular dynamics preprocessing, biomolecular structure analysis, and integration into existing simulation workflows.

Demo Repository

Loading README...

Tony Kan

v0.1.0

๐Ÿš€ Features

  1. Comprehensive Force Field Support

    • Extensive Coverage: Provides atomic partial charges for Proteins (29 residues), Nucleic Acids (DNA/RNA), Water (5 models), and Ions (66 types).
    • Multi-Scheme Compatibility: Supports major force fields including AMBER (ff99SB, ff14SB, ff19SB, ff03) and CHARMM (C22, C27, C36, C36m).
    • Terminal Awareness: Correctly handles N-/C-terminal protein residues (including protonation states) and 5โ€™/3โ€™-terminal nucleic acids.
  2. High-Performance Architecture

    • O(1) Lookups: Utilizes Perfect Hash Functions (PHF) for constant-time charge retrieval, eliminating runtime hash map overhead.
    • Zero Allocation: Designed for stack-only usage with no dynamic memory allocation, ideal for high-throughput simulations.
    • Compile-Time Generation: All data is baked into the binary from CSV sources at compile time, ensuring zero startup cost and maximum optimization.
  3. Portability & Usability

    • no_std Support: Fully compatible with bare-metal, embedded, and WebAssembly (WASM) environments.
    • Type-Safe API: Leverages Rustโ€™s strong type system with enums for Schemes and Positions to prevent invalid queries at compile time.
    • Zero Dependencies: Requires no runtime dependencies (other than the lightweight phf crate), keeping the dependency tree minimal.

New Contributors

  • @TKanX Lead Developer

Full Changelog: https://github.com/TKanX/ffcharge/commits/v0.1.0

Attachment
0