identify_chains

Function identify_chains 

Source
pub fn identify_chains(structure: &PDB) -> Vec<String>
Expand description

Identifies all chain IDs in the given PDB structure.

This function iterates over all chains in a PDB structure and collects their IDs into a vector of strings.

§Arguments

  • structure - A reference to a pdbtbx::PDB structure representing the PDB file to be analyzed.

§Returns

A Vec<String> containing the IDs of all chains present in the PDB structure.

§Example

use pdbtbx::PDB;
use pdb_handler::identify_chains;

let (mut pdb, _errors) = pdbtbx::open("example-pdbs/1crn.pdb").unwrap();
let chains = identify_chains(&pdb);

for chain_id in chains {
    println!("Chain ID: {}", chain_id);
}