Skip to content

Commit 905ef47

Browse files
committed
Updated amino acids table and implemented display for strictness level
1 parent 6253aa8 commit 905ef47

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

src/reference_tables.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ const REMARK_TYPES: [usize; 42] = [
7373
/// All amino acids. Includes Amber-specific naming conventions for (de-)protonated versions, CYS involved in
7474
/// disulfide bonding and the like.
7575
const AMINO_ACIDS: &[&str] = &[
76-
"ALA", "ARG", "ASH", "ASN", "ASP", "CYS", "CYX", "GLH", "GLN", "GLU", "GLY", "HID", "HIE",
77-
"HIM", "HIP", "HIS", "ILE", "LEU", "LYN", "LYS", "MET", "PHE", "PRO", "SER", "THR", "TRP",
78-
"TYR", "VAL",
76+
"ALA", "ARG", "ASH", "ASN", "ASP", "ASX", "CYS", "CYX", "GLH", "GLN", "GLU", "GLY", "HID",
77+
"HIE", "HIM", "HIP", "HIS", "ILE", "LEU", "LYN", "LYS", "MET", "PHE", "PRO", "SER", "THR",
78+
"TRP", "TYR", "VAL", "SEC", "PYL",
7979
];
8080

8181
/// The names of atom in the backbone of proteins

src/strictness_level.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::fmt::Display;
2+
13
#[cfg(doc)]
24
use crate::ErrorLevel;
35

@@ -11,3 +13,17 @@ pub enum StrictnessLevel {
1113
/// With `Loose` the program will allow [`ErrorLevel::GeneralWarning`] and [`ErrorLevel::LooseWarning`].
1214
Loose,
1315
}
16+
17+
impl Display for StrictnessLevel {
18+
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
19+
write!(
20+
f,
21+
"{}",
22+
match self {
23+
StrictnessLevel::Strict => "Strict",
24+
StrictnessLevel::Medium => "Medium",
25+
StrictnessLevel::Loose => "Loose",
26+
}
27+
)
28+
}
29+
}

0 commit comments

Comments
 (0)