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.
- Charge
Calc - Charge calculation builder.
- Charge
Result - Result of a charge calculation.
- Multi
Bead - Multi-bead coarse-graining: one backbone bead + optional sidechain bead per titratable residue.
- Multipole
- Multipole moments: net charge and dipole with their squares.
- Residue
Key - Unique residue key for grouping atoms, used in the
CoarseGraintrait. - Single
Bead - Single-bead coarse-graining: one bead per residue. Titratable residues get
BeadType::Titratable.
Enums§
- Bead
Type - Classification of a coarse-grained bead.
Traits§
- Coarse
Grain - 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).