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) {
22 return weight - (seq.size() - 1) *
h2o_weight();
27 for (
const std::string& item : seq)
38 for (
const std::string& item : seq) {
41 if (
ri.is_standard() &&
ri.kind == kind)
42 r +=
ri.one_letter_code;
58 fail(
"sequence_kind(): unknown polymer type");
ResidueKind sequence_kind(PolymerType ptype)
used with expand_one_letter_sequence()
double calculate_sequence_weight(const std::vector< std::string > &seq, double unknown=0.)
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)
std::string one_letter_code(const std::vector< std::string > &seq)
void cat_to(std::string &)
constexpr double h2o_weight()
void fail(const std::string &msg)
GEMMI_DLL ResidueInfo find_tabulated_residue(const std::string &name)
static std::string first_mon(const std::string &mon_list)