5#ifndef GEMMI_CALCULATE_HPP_
6#define GEMMI_CALCULATE_HPP_
14 for (
const auto&
child :
obj.children())
26 for (
const auto&
child :
obj.children())
36 for (
const auto&
child :
obj.children())
52 for (
const auto&
child :
obj.children()) {
64 for (
const auto&
child :
obj.children())
82 for (
const Model& model :
st.models)
83 for (
const Chain& chain : model.chains)
84 for (
const Residue& res : chain.residues)
85 for (
const Atom& atom : res.atoms)
86 box.extend(
st.cell.fractionalize(atom.pos));
115 double y = u.cross(w).dot(
b1);
116 double x = u.dot(w) *
b1.length();
117 return std::atan2(y, x);
123 if (a && b && c &&
d)
163 const std::array<double, 4>&
coeff) {
double calculate_b_est(const Atom &atom)
double calculate_mass(const T &obj)
double calculate_chiral_volume(const Position &actr, const Position &a1, const Position &a2, const Position &a3)
size_t count_hydrogen_sites(const T &obj)
deprecated, use has_hydrogen() or count_atom_sites(..., Selection("[H,D]")
CenterOfMass calculate_center_of_mass(const T &obj)
void expand_box(const T &obj, Box< Position > &box)
double calculate_omega(const Residue &res, const Residue &next)
Box< Position > calculate_box(const Structure &st, double margin=0.)
bool is_peptide_bond_cis(const Atom *ca1, const Atom *c, const Atom *n, const Atom *ca2)
GEMMI_DLL std::array< double, 4 > find_best_plane(const std::vector< Atom * > &atoms)
double get_distance_from_plane(const Position &pos, const std::array< double, 4 > &coeff)
double calculate_dihedral(const Position &p0, const Position &p1, const Position &p2, const Position &p3)
bool has_hydrogen(const T &obj)
double calculate_angle(const Position &p0, const Position &p1, const Position &p2)
Box< Fractional > calculate_fractional_box(const Structure &st, double margin=0.)
constexpr double rad(double angle)
std::array< double, 2 > calculate_phi_psi(const Residue *prev, const Residue &res, const Residue *next)
double calculate_dihedral_from_atoms(const Atom *a, const Atom *b, const Atom *c, const Atom *d)
the return value is in the same range as that of atan2(), i.e. [-pi, pi]
constexpr double u_to_b()
Represents atom site in macromolecular structure (~100 bytes).
Coordinates in Angstroms - orthogonal (Cartesian) coordinates.
const Atom * get_ca() const
const Atom * get_c() const
const Atom * get_n() const
std::array< double, 3 > calculate_eigenvalues() const
Based on https://en.wikipedia.org/wiki/Eigenvalue_algorithm To calculate both eigenvalues and eigenve...