Description:
This task overhauls the forge module to support heterogeneous charge distribution strategies, a critical requirement for accurate protein-ligand modeling. The current uniform QEq approach is replaced with a component-aware system that applies standard force field charges (AMBER/CHARMM via ffcharge) to proteins and nucleic acids, while utilizing cheq v0.5.0 to compute environmentally polarized charges for ligands. This "electrostatic embedding" approach allows dreid-forge to generate simulation parameters where the ligand's electronic structure dynamically responds to the protein's electrostatic field. The engine will now intelligently discriminate between macromolecular residues, ions, and arbitrary ligands to apply the most physically appropriate electrostatic model to each component of the system.
Tasks:
Description:
This task overhauls the
forgemodule to support heterogeneous charge distribution strategies, a critical requirement for accurate protein-ligand modeling. The current uniform QEq approach is replaced with a component-aware system that applies standard force field charges (AMBER/CHARMM viaffcharge) to proteins and nucleic acids, while utilizingcheqv0.5.0 to compute environmentally polarized charges for ligands. This "electrostatic embedding" approach allowsdreid-forgeto generate simulation parameters where the ligand's electronic structure dynamically responds to the protein's electrostatic field. The engine will now intelligently discriminate between macromolecular residues, ions, and arbitrary ligands to apply the most physically appropriate electrostatic model to each component of the system.Tasks:
Phase 1: Dependencies and Configuration Update
cheqto v0.5.0 inCargo.toml.ffchargev0.2.0 as a new dependency.src/forge/config.rs:ChargeMethodenum to support new variants:Amber(with version selection),Charmm(with version selection), andHybrid(custom composite strategies).ForgeConfigto handle component-specific charge settings.Phase 2: Component Segmentation Logic
src/forge/intermediate.rs:IntermediateAtomorIntermediateSystemto explicitly track component categories (Protein, Nucleic, Ion, Ligand) derived from inputBioMetadata.Phase 3: Force Field Charge Integration
src/forge/charge.rs:ffcharge: Map internal residues (ALA, TRP...) and atom names toffchargelookups.Phase 4: Polarized Ligand Charge Calculation
src/forge/charge.rs:cheq::PointChargeobjects.cheq::ExternalPotentialfrom the environment.solver.solve_in_field()for ligand atoms when the hybrid mode is active.Phase 5: Pipeline Orchestration & API
src/forge/mod.rs:forgefunction to execute the charge phases in order: Fixed Components (Protein/Ions) -> Environment Construction -> Variable Components (Ligand QEq).