• Retrieves the character for a given residue name.

    Besides amino acids, this function also supports charm forcefield, amber forcefield, DNA nucleotides and RNA nucleotides.

    Parameters

    • resname: string

      The residue name to retrieve the abbreviated name for.

    Returns
        | "A"
        | "T"
        | "G"
        | "C"
        | "H"
        | "R"
        | "K"
        | "I"
        | "F"
        | "L"
        | "W"
        | "M"
        | "P"
        | "N"
        | "V"
        | "S"
        | "Q"
        | "Y"
        | "D"
        | "E"
        | "U"
        | "O"

    The abbreviated name for the given resource name, or "X" if no abbreviation is found.

    import { getResName1 } from "@i-vresse/haddock3-ui/getResName1";
    getResName1("ALA"); // "A"
    getResName1("DA"); // "A"
    getResName1("A"); // "A"
    getResName1("UNK"); // "X"