FFTmap: P1 map with symmetry used for calculating FFTs. More...
#include <fftmap.h>
FFTmap: P1 map with symmetry used for calculating FFTs.
The FFTmap is represented in P1 in memory. However, it also has a spacegroup, and the contained data remains consistent with this spacegroup at all times. It has three states - unassigned, real-space, and reciprocal space. In real space it contains real map data. In reciprocal space it holds a hemisphere of complex structure factors, with the Friedels duplicated on the zero section.
The user should be able to ignore all the issues of spacegroup symmetry, Friedel opposites, and storage order.
Default
Constructor: takes spacegroup, cell, grid.
Construct an FFTmap for a given spacegroup, cell, and grid. The map values are initialised to zero.
The FFTmap is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft.
References init(), and clipper::Message::message().
Default
initialiser
Initialise an FFTmap for a given spacegroup, cell, and grid. The map values are initialised to zero.
The FFTmap is initially in neither real nor reciprocal spce, however as soon as one of the 'set' methods is called, it will be defined as in either real or reciprocal space until the next fft.
References cell(), cell_, isymop, clipper::Spacegroup::num_symops(), spacegroup(), spacegroup_, and clipper::Spacegroup::symop().
Referenced by FFTmap().
Reset.
Reset the space and zero all the data, if necessary.
Reimplemented from clipper::FFTmap_p1.
References clipper::FFTmap_p1::datavec, and clipper::FFTmap_p1::mode.
Referenced by fft_map_to_rfl(), and fft_rfl_to_map().
Transform to real space.
The data is transformed from recirocal to real space. A scale factor of 1/v (where v is the cell volume) is applied. If the FFTmap is already in real space, no action is taken.
References cell(), and clipper::FFTmap_p1::mode.
Referenced by fft_rfl_to_map().
Transform to reciprocal space.
The data is transformed from real to recirocal space. A scale factor of v/n (where v is the cell volume and n the number of grid points) is applied. If the FFTmap is already in reciproal space, no action is taken.
References cell(), and clipper::FFTmap_p1::mode.
Referenced by fft_map_to_rfl().
get reciprocal space data
The data value for the given HKL, or the conjugate of its Friedel opposite if required, is returned. The symmetry related copies of the data are ignored.
ffttype References clipper::FFTmap_p1::get_hkl(), clipper::Message::message(), and clipper::FFTmap_p1::mode.
Referenced by fft_map_to_rfl().
set reciprocal space data
The data value for the given HKL, or the conjugate of its Friedel opposite if required, is set. All the symmetry related copies of the data, and any Friedel copies in the zero section, are also set.
ffttype References isymop, clipper::Message::message(), clipper::FFTmap_p1::mode, clipper::Spacegroup::num_primops(), clipper::FFTmap_p1::set_hkl(), spacegroup_, clipper::HKL::sym_phase_shift(), clipper::Spacegroup::symop(), and clipper::HKL::transform().
Referenced by fft_rfl_to_map().
get real space data
The data value for the given grid coordinate is returned. Symmetry related copies are ignored.
References clipper::FFTmap_p1::grid_real(), clipper::Message::message(), clipper::FFTmap_p1::mode, clipper::FFTmap_p1::real_data(), and clipper::Coord_grid::unit().
Referenced by fft_rfl_to_map().
set real space data
The data value for the given grid coordinate is set. All the symmetry related copies of the data are also set.
References clipper::FFTmap_p1::grid_sam_, isymop, clipper::Message::message(), clipper::FFTmap_p1::mode, clipper::FFTmap_p1::real_data(), clipper::Coord_grid::transform(), and clipper::Coord_grid::unit().
Referenced by fft_map_to_rfl().
get reciprocal space data (No error checking)
No error is produced if the space is wrong.
ffttype References clipper::FFTmap_p1::get_hkl().
[inline]
get real space data (No error checking)
No error is produced if the space is wrong.
ffttype References clipper::FFTmap_p1::grid_real(), clipper::FFTmap_p1::real_data(), and clipper::Coord_grid::unit().
calculate map-like object from reflection-like object
Fill this FFTmap object from a reflection object, transform it, and fill the given map object from the FFTmap. This will work for any reflection data object which implements a HKL_reference_index, and every map data object which implements a Map_reference_index.
For the results to be sensible, the spacegroup, cell and grids should match. (The map will be zeroed if necessary).
References fft_h_to_x(), get_real_data(), reset(), and set_recip_data().
calculate reflection-like object from map-like object
Fill this FFTmap object from a map object, transform it, and fill the given reflection object from the FFTmap. This will work for any reflection data object which implements a HKL_reference_index, and every map data object which implements a Map_reference_index.
For the results to be sensible, the spacegroup, cell and grids should match. (The map will be zeroed if necessary).
References fft_x_to_h(), get_recip_data(), reset(), and set_real_data().