Skip to main content

Crate cgkitten

Crate cgkitten 

Source
Expand description

Convert mmCIF protein structures to coarse-grained xyzq representation.

Each amino acid residue is represented as a single bead at its center of mass. Titratable side-chains (ASP, GLU, HIS, CYS, TYR, LYS, ARG) generate an additional bead at the charge center. Charges are computed via ChargeCalc, which supports Henderson-Hasselbalch and Monte Carlo titration.

let cif_data = std::fs::read("structure.cif").unwrap();
let beads = cgkitten::coarse_grain(cif_data.as_slice());
let result = cgkitten::ChargeCalc::new()
    .ph(7.0)
    .mc(10000)
    .run(&beads);
let charged = result.apply(&beads);

Modules§

forcefield
Force field model definitions. Force field models for coarse-grained beads.
residue
Amino acid residue definitions and constants. Amino acid definitions and titratable side-chain groups.
topology
Topology type assignment for coarse-grained beads. Topology type assignment for coarse-grained beads.

Structs§

Bead
A coarse-grained bead with position and charge.
ChargeCalc
Charge calculation builder.
ChargeResult
Result of a charge calculation.
MultiBead
Multi-bead coarse-graining: one backbone bead + optional sidechain bead per titratable residue.
Multipole
Multipole moments: net charge and dipole with their squares.
ResidueKey
Unique residue key for grouping atoms, used in the CoarseGrain trait.
SingleBead
Single-bead coarse-graining: one bead per residue. Titratable residues get BeadType::Titratable.

Enums§

BeadType
Classification of a coarse-grained bead.

Traits§

CoarseGrain
Convert one amino acid residue into beads (backbone/sidechain only, not terminals).

Functions§

coarse_grain
Convert mmCIF data to coarse-grained beads using the default multi-bead policy.
coarse_grain_pdb_with
Convert PDB data to coarse-grained beads using the given policy.
coarse_grain_to_files
Run the full coarse-graining pipeline and write XYZ and topology YAML files.
coarse_grain_with
Convert mmCIF data to coarse-grained beads using the given policy.
filter_chains
Filter beads to keep only the requested chains.
format_topology
Format topology as YAML with unique atom types and optional force field parameters.
format_xyz
Format beads as plain XYZ string (name x y z).