5#ifndef GEMMI_SEQID_HPP_
6#define GEMMI_SEQID_HPP_
43 explicit operator int()
const {
return value; }
65 throw std::invalid_argument(
"Not a seqid: " +
str);
70 return num ==
o.num && ((
icode ^
o.icode) & ~0x20) == 0;
74 return (*
num * 256 +
icode) < (*
o.num * 256 +
o.icode);
79 std::string
str()
const {
106inline std::string
atom_str(
const std::string& chain_name,
108 const std::string& atom_name,
110 std::string
r = chain_name;
132 const std::string& atom,
char alt=
'\0')
135 const std::string& atom,
char alt=
'\0')
150template <>
struct hash<
gemmi::ResidueId> {
153 return seqid_hash ^ hash<string>()(r.
segment) ^ hash<string>()(r.
name);
std::string atom_str(const Chain &chain, const ResidueId &res_id, const Atom &atom)
std::string cat(Args const &... args)
AtomAddress(const std::string &ch, const ResidueId &resid, const std::string &atom, char alt='\0')
AtomAddress(const std::string &ch, const SeqId &seqid, const std::string &res, const std::string &atom, char alt='\0')
bool operator==(const AtomAddress &o) const
std::string str(char null='?') const
bool operator==(int n) const
bool operator!=(const OptionalInt &o) const
OptionalInt & operator-=(int n)
bool operator==(const OptionalInt &o) const
const int & operator*() const
OptionalInt operator+(OptionalInt o) const
bool operator<(const OptionalInt &o) const
OptionalInt & operator=(int n)
bool operator!=(int n) const
OptionalInt & operator+=(int n)
OptionalInt operator-(OptionalInt o) const
bool operator==(const ResidueId &o) const
bool matches(const ResidueId &o) const
bool matches_noseg(const ResidueId &o) const
SeqId(int num_, char icode_)
bool operator==(const SeqId &o) const
SeqId(OptionalNum num_, char icode_)
bool operator<(const SeqId &o) const
bool operator!=(const SeqId &o) const
SeqId(const std::string &str)
size_t operator()(const gemmi::ResidueId &r) const