5#ifndef GEMMI_DENCALC_HPP_
6#define GEMMI_DENCALC_HPP_
16template<
int N,
typename Real>
37 while (
dy > 0 &&
x1 + 0.1f <
x2) {
64template <
typename Real>
66 return (8.5f + 0.075f * b) / (2.4f + 0.0045f * b);
72 for (
const Residue& residue : chain.residues)
73 for (
const Atom& atom : residue.atoms) {
74 if (atom.occ == 0)
continue;
75 double b = atom.b_iso;
76 if (atom.aniso.nonzero()) {
77 std::array<double,3>
eig = atom.aniso.calculate_eigenvalues();
94template <
typename Table,
typename GReal>
97 using CReal =
typename Table::Coef::coef_type;
139 template<
typename Coef>
160 CReal b_max = std::max(std::max(aniso_b.u11, aniso_b.u22), aniso_b.u33);
188 fail(
"initialize_grid(): d_min is not set");
194 for (
const Residue& res : chain.residues)
195 for (
const Atom& atom : res.atoms)
std::array< int, 3 > Miller
A synonym for convenient passing of hkl.
constexpr double mott_bethe_const()
double get_minimum_b(const Model &model)
Real determine_cutoff_radius(Real x1, const ExpSum< N, Real > &precal, Real cutoff_level)
constexpr float sq(float x)
void fail(const std::string &msg)
constexpr double u_to_b()
Real it92_radius_approx(Real b)
float get(Element el) const
Represents atom site in macromolecular structure (~100 bytes).
void set_grid_cell_and_spacegroup(const Structure &st)
double mott_bethe_factor(const Miller &hkl) const
void add_model_density_to_grid(const Model &model)
void set_refmac_compatible_blur(const Model &model)
void add_c_contribution_to_grid(const Atom &atom, float c)
typename Table::Coef::coef_type CReal
CReal estimate_radius(const ExpSum< N, CReal > &precal, CReal b) const
void put_model_density_on_grid(const Model &model)
double reciprocal_space_multiplier(double inv_d2) const
void add_atom_density_to_grid(const Atom &atom)
double requested_grid_spacing() const
void do_add_atom_density_to_grid(const Atom &atom, const Coef &coef, float addend)
void check_not_empty() const
double min_spacing() const
void set_size_from_spacing(double approx_spacing, GridSizeRounding rounding)
void symmetrize_sum()
multiplies grid points on special position
double spacing[3]
spacing between virtual planes, not between points
std::vector< Chain > chains
Coordinates in Angstroms - orthogonal (Cartesian) coordinates.
SMat33< Real > scaled(Real s) const
Fractional fractionalize(const Position &o) const
double calculate_1_d2(const Miller &hkl) const