Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Implement Rotamer Library Module for Conformation Management #13

@TKanX

Description

@TKanX

Description:

Implement the rotamers module within the scream-core crate. This module serves as the conformational data hub for the application, responsible for loading, parsing, managing, and providing access to sidechain rotamer conformations. It will replace the legacy .lib and .cnn file formats with a modern, structured TOML-based system. The final module will be capable of loading a complete, parameterized, and ready-to-use rotamer library for the main placement algorithm.

Tasks:

  • Data Structures (rotamers/rotamer.rs, rotamers/library.rs)

    • Define Rotamer and RotamerAtom Structs: Create Rust structs that can be directly deserialized from the new TOML format using serde. These will represent a single rotamer conformation and its constituent atoms.
    • Define RotamerLibrary Struct: Create the main RotamerLibrary struct to hold the entire library in memory, likely using a HashMap<ResidueType, Vec<Rotamer>> to allow for efficient lookup.
    • Define RotamerConnectivity Struct: Create a struct to hold the parsed information from the .cnn files, including anchor points, sidechain atom lists, and internal bond connectivity.
  • Library Loading & Parsing (rotamers/library.rs)

    • Implement .cnn Parser: Create a function to parse the cnn files and populate a HashMap<ResidueType, RotamerConnectivity>. This map will serve as a "blueprint" for understanding the rotamers.
    • Implement RotamerLibrary::load Method: This core method will:
      • Take a path to a specific TOML library file (e.g., .../charmm/rmsd-1.0.toml).
      • Use serde and toml to deserialize the file into a HashMap<String, Vec<Rotamer>>.
      • Convert the string-based keys (e.g., "ALA") into strongly-typed ResidueType keys.
      • Return a populated RotamerLibrary instance.
    • Write Unit Tests for Loading: Test the ability to load a sample TOML file and correctly deserialize it into the expected Rust structs.
  • Integration with Forcefield Module

    • Parameterize Rotamers: After loading, each Rotamer's Atoms must be parameterized. This involves using the Parameterizer module to:
      • Assign vdw_radius, vdw_well_depth, and hbond_type_id based on the atom's force_field_type.
      • Assign the delta value based on the atom's residue type and name.
      • Note: The partial charge is already present from the TOML file and does not need to be reassigned by the main charge scheme.
    • Apply Connectivity: Use the information from the loaded RotamerConnectivity to establish the internal bonds between atoms within each Rotamer instance.

Metadata

Metadata

Assignees

Labels

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions