5#ifndef GEMMI_SEQTOOLS_HPP_
6#define GEMMI_SEQTOOLS_HPP_
13constexpr double h2o_weight() {
return 2 * 1.00794 + 15.9994; }
18 for (
const std::string& item : seq) {
27 return weight - (seq.size() - 1) *
h2o_weight();
32 for (
const std::string& item : seq)
43 for (
const std::string& item : seq) {
46 if (
ri.is_standard() &&
ri.kind == kind)
47 r +=
ri.one_letter_code;
63 fail(
"sequence_kind(): unknown polymer type");
ResidueKind sequence_kind(PolymerType ptype)
used with expand_one_letter_sequence()
std::string pdbx_one_letter_code(const std::vector< std::string > &seq, ResidueKind kind)
Returns the format used in _entity_poly.pdbx_seq_one_letter_code, in which non-standard amino acids/n...
bool is_polypeptide(PolymerType pt)
GEMMI_DLL ResidueInfo & find_tabulated_residue(const std::string &name)
std::string one_letter_code(const std::vector< std::string > &seq)
GEMMI_DLL size_t find_tabulated_residue_idx(const std::string &name)
double calculate_sequence_weight(const std::vector< std::string > &seq, double unknown=100.)
void cat_to(std::string &)
constexpr double h2o_weight()
GEMMI_DLL ResidueInfo & get_residue_info(size_t idx)
void fail(const std::string &msg)
List of common residues with basic data.
static std::string first_mon(const std::string &mon_list)