5#ifndef GEMMI_CONTACT_HPP_
6#define GEMMI_CONTACT_HPP_
40 template<
typename Func>
49 std::vector<Result>
out;
51 int image_idx,
double dist_sq) {
52 out.push_back({cra1, cra2, image_idx, dist_sq});
58template<
typename Func>
61 fail(
ns.small_structure ?
"ContactSearch does not work with SmallStructure"
62 :
"NeighborSearch not initialized");
86 if (
m.image_idx == 0 &&
m.chain_idx ==
n_ch)
87 if (
m.residue_idx ==
n_res)
91 if (
m.image_idx == 0 &&
m.chain_idx ==
n_ch)
92 if (
m.residue_idx ==
n_res ||
98 if (
m.image_idx == 0 &&
m.chain_idx ==
n_ch)
102 if (
m.image_idx == 0)
107 if (!
radii.empty()) {
114 if (
m.chain_idx <
n_ch || (
m.chain_idx ==
n_ch &&
120 if (
m.chain_idx ==
n_ch &&
m.residue_idx ==
n_res &&
123 CRA cra2 =
m.to_cra(*
ns.model);
127 func(
CRA{&chain, &res, &atom}, cra2,
m.image_idx, dist_sq);
bool are_connected(const Residue &r1, const Residue &r2, PolymerType ptype)
check C-N or O3'-P distance
GEMMI_DLL PolymerType check_polymer_type(const ConstResidueSpan &span, bool ignore_entity_type=false)
void fail(const std::string &msg)
Represents atom site in macromolecular structure (~100 bytes).
ResidueSpan get_polymer()
std::vector< Residue > residues
std::vector< Atom > atoms