Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
rvhonorato committed Feb 17, 2025
1 parent af73917 commit f751191
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions src/structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ impl<'a> Finder<'a> {
///
/// This method initializes the `Finder` struct by extracting the chain and residue information from the provided `PDB` reference. It constructs two hashmaps: `chain_lookup` (for mapping atom serial numbers to chain IDs) and `residue_lookup` (for mapping atom serial numbers to residue serial numbers).
///
/// # Parameters
/// - `pdb`: A reference to a `PDB` object that contains the protein structure data.
///
/// # Returns
/// A new instance of `Finder` initialized with the provided `PDB`.
fn new(pdb: &'a PDB) -> Self {
let chain_lookup = pdb
.chains()
Expand Down Expand Up @@ -85,14 +80,6 @@ impl<'a> Finder<'a> {
///
/// This method looks up the chain ID for an atom based on its serial number. If no chain is found, the default value "A" is returned.
///
/// # Parameters
/// - `atom`: A reference to an `Atom` whose chain ID is to be found.
///
/// # Returns
/// A `String` representing the chain ID associated with the atom.
///
/// # Panics
/// This method will panic if the atom's serial number is not found in the `chain_lookup` map (should not happen under normal circumstances).
fn find_chain_id(&self, atom: &Atom) -> String {
self.chain_lookup
.get(&atom.serial_number())
Expand All @@ -104,14 +91,6 @@ impl<'a> Finder<'a> {
///
/// This method looks up the residue serial number for an atom based on its serial number. If no residue number is found, the default value `0` is returned.
///
/// # Parameters
/// - `atom`: A reference to an `Atom` whose residue serial number is to be found.
///
/// # Returns
/// An `isize` representing the residue serial number associated with the atom.
///
/// # Panics
/// This method will panic if the atom's serial number is not found in the `residue_lookup` map (should not happen under normal circumstances).
fn find_residue_number(&self, atom: &Atom) -> isize {
*self.residue_lookup.get(&atom.serial_number()).unwrap_or(&0)
}
Expand Down

0 comments on commit f751191

Please sign in to comment.