bio-forge 0.4.1

A pure Rust library and CLI for the automated repair, preparation, and topology construction of biological macromolecules.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::{Context, Result};
use clap::Args;

use bio_forge::Structure;
use bio_forge::ops::repair_structure;

use crate::commands::run_with_spinner;

/// Repairs standard residues by rebuilding missing heavy atoms and termini.
#[derive(Debug, Default, Args)]
pub struct RepairArgs {}

/// Invokes the repair pipeline on the provided structure.
pub fn run(structure: &mut Structure, _args: &RepairArgs) -> Result<()> {
    run_with_spinner("Repairing structure", || {
        repair_structure(structure).context("Failed to repair structure")
    })
}