pub(crate) fn protein_code_for_residue(name: &str) -> Option<char> {
    match name.trim().to_ascii_uppercase().as_str() {
        "ALA" => Some('A'),
        "ARG" => Some('R'),
        "ASN" => Some('N'),
        "ASP" => Some('D'),
        "CYS" => Some('C'),
        "GLN" => Some('Q'),
        "GLU" => Some('E'),
        "GLY" => Some('G'),
        "HIS" => Some('H'),
        "ILE" => Some('I'),
        "LEU" => Some('L'),
        "LYS" => Some('K'),
        "MET" => Some('M'),
        "PHE" => Some('F'),
        "PRO" => Some('P'),
        "SER" => Some('S'),
        "THR" => Some('T'),
        "TRP" => Some('W'),
        "TYR" => Some('Y'),
        "VAL" => Some('V'),
        "ASX" => Some('B'),
        "GLX" => Some('Z'),
        "SEC" => Some('U'),
        "PYL" => Some('O'),
        "XLE" => Some('J'),
        "UNK" => Some('X'),
        _ => None,
    }
}
