|
void | copy_metadata_from (const GridMeta &g) |
| copy unit_cell, spacegroup, nu, nv, nw, axis_order and set spacing
|
|
void | calculate_spacing () |
| set spacing and orth_n
|
|
double | min_spacing () const |
|
void | set_size_without_checking (int nu_, int nv_, int nw_) |
|
void | set_size (int nu_, int nv_, int nw_) |
|
void | set_size_from_spacing (double approx_spacing, GridSizeRounding rounding) |
|
void | set_unit_cell (double a, double b, double c, double alpha, double beta, double gamma) |
|
void | set_unit_cell (const UnitCell &cell) |
|
template<typename S > |
void | setup_from (const S &st, double approx_spacing) |
|
size_t | index_s (int u, int v, int w) const |
| Returns index in data array for (u,v,w). Safe but slower than index_q().
|
|
T | get_value (int u, int v, int w) const |
| returns data[index_s(u, v, w)]
|
|
void | set_value (int u, int v, int w, T x) |
|
Point | get_point (int u, int v, int w) |
| Point stores normalizes indices (not the original u,v,w).
|
|
Point | get_nearest_point (const Fractional &f) |
|
Point | get_nearest_point (const Position &pos) |
|
size_t | get_nearest_index (const Fractional &f) |
|
Fractional | point_to_fractional (const Point &p) const |
| Point stores normalized indices, so fractional coordinates are in [0,1).
|
|
Position | point_to_position (const Point &p) const |
|
T | interpolate_value (double x, double y, double z) const |
| https://en.wikipedia.org/wiki/Trilinear_interpolation x,y,z are grid coordinates (x=1.5 is between 2nd and 3rd grid point).
|
|
T | interpolate_value (const Fractional &fctr) const |
|
T | interpolate_value (const Position &ctr) const |
|
double | tricubic_interpolation (double x, double y, double z) const |
| https://en.wikipedia.org/wiki/Tricubic_interpolation x,y,z are grid coordinates (x=1.5 is between 2nd and 3rd grid point).
|
|
double | tricubic_interpolation (const Fractional &fctr) const |
|
double | tricubic_interpolation (const Position &ctr) const |
|
std::array< double, 4 > | tricubic_interpolation_der (double x, double y, double z) const |
| returns the same as above + derivatives df/dx, df/dy, df/dz
|
|
std::array< double, 4 > | tricubic_interpolation_der (const Fractional &fctr) const |
|
T | interpolate (const Fractional &f, int order) const |
|
void | get_subarray (T *dest, std::array< int, 3 > start, std::array< int, 3 > shape) const |
|
void | set_subarray (const T *src, std::array< int, 3 > start, std::array< int, 3 > shape) |
|
template<bool UsePbc> |
void | check_size_for_points_in_box (int &du, int &dv, int &dw, bool fail_on_too_large_radius) const |
|
template<bool UsePbc, typename Func > |
void | do_use_points_in_box (const Fractional &fctr, int du, int dv, int dw, Func &&func, double radius=INFINITY) |
|
template<bool UsePbc, typename Func > |
void | use_points_in_box (const Fractional &fctr, int du, int dv, int dw, Func &&func, bool fail_on_too_large_radius=true, double radius=INFINITY) |
|
template<bool UsePbc, typename Func > |
void | use_points_around (const Fractional &fctr, double radius, Func &&func, bool fail_on_too_large_radius=true) |
|
void | set_points_around (const Position &ctr, double radius, T value, bool use_pbc=true) |
|
void | change_values (T old_value, T new_value) |
|
template<typename Func > |
void | symmetrize (Func func) |
| Use.
|
|
template<typename Func > |
void | symmetrize_using_ops (const std::vector< GridOp > &ops, Func func) |
|
void | symmetrize_min () |
|
void | symmetrize_max () |
|
void | symmetrize_abs_max () |
|
void | symmetrize_sum () |
| multiplies grid points on special position
|
|
void | symmetrize_nondefault (T default_) |
|
void | symmetrize_avg () |
|
void | normalize () |
| scale the data to get mean == 0 and rmsd == 1 (doesn't work for T=complex)
|
|
void | resample_to (Grid< T > &dest, int order) const |
|
void | check_not_empty () const |
|
void | set_size_without_checking (int nu_, int nv_, int nw_) |
|
T | get_value_q (int u, int v, int w) const |
|
size_t | point_to_index (const Point &p) const |
|
Point | index_to_point (size_t idx) |
|
void | fill (T value) |
|
Tsum | sum () const |
|
iterator | begin () |
|
iterator | end () |
|
size_t | point_count () const |
|
Fractional | get_fractional (int u, int v, int w) const |
| u,v,w are not normalized here
|
|
Position | get_position (int u, int v, int w) const |
|
std::vector< GridOp > | get_scaled_ops_except_id () const |
|
size_t | index_q (int u, int v, int w) const |
| Quick(est) index function, but works only if 0 <= u < nu , etc.
|
|
size_t | index_n (int u, int v, int w) const |
| Faster than index_s(), but works only if -nu <= u < 2*nu , etc.
|
|
size_t | index_n_ref (int &u, int &v, int &w) const |
| The same as index_n(), but modifies arguments.
|
|
size_t | index_near_zero (int u, int v, int w) const |
| Faster than index_n(), but works only if -nu <= u < nu, etc.
|
|
template<
typename T = float>
struct gemmi::Grid< T >
Real-space grid.
For simplicity, some operations work only if the grid covers whole unit cell and axes u,v,w correspond to a,b,c in the unit cell.
Definition at line 302 of file grid.hpp.