Clipper
Public Member Functions | Protected Attributes
clipper::FFTmap Class Reference

FFTmap: P1 map with symmetry used for calculating FFTs. More...

#include <fftmap.h>

Inheritance diagram for clipper::FFTmap:

List of all members.

Public Member Functions

  FFTmap ()
  Null constructor.
  FFTmap (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling grid_sam, const FFTtype type=Default)
  Constructor: takes spacegroup, cell, grid.
void  init (const Spacegroup &spacegroup, const Cell &cell, const Grid_sampling grid_sam, const FFTtype type=Default)
  initialiser
void  reset ()
  Reset.
const Cellcell () const
  get the cell
const Spacegroupspacegroup () const
  get the spacegroup
const Grid_samplinggrid_sampling () const
  get the cell grid
void  fft_h_to_x ()
  Transform to real space.
void  fft_x_to_h ()
  Transform to reciprocal space.
template<class T >
void  get_recip_data (const HKL &rfl, datatypes::F_phi< T > &fphi) const
  get reciprocal space data
template<class T >
void  set_recip_data (const HKL &rfl, const datatypes::F_phi< T > &fphi)
  set reciprocal space data
template<class T >
void  get_real_data (const Coord_grid &c, T &datum) const
  get real space data
template<class T >
void  set_real_data (const Coord_grid &c, const T &datum)
  set real space data
datatypes::F_phi< ffttype >  get_recip_data (const HKL &rfl) const
  get reciprocal space data (No error checking)
const ffttype &  get_real_data (const Coord_grid &c) const
  get real space data (No error checking)
template<class H , class X >
void  fft_rfl_to_map (const H &h, X &x)
  calculate map-like object from reflection-like object
template<class H , class X >
void  fft_map_to_rfl (const X &x, H &h)
  calculate reflection-like object from map-like object
void  debug () const

Protected Attributes

  unit cell
  spacegroup
std::vector< Isymopisymop
  Integerised symops.

Detailed Description

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.


Constructor & Destructor Documentation

clipper::FFTmap::FFTmap ( )

Null constructor.

For later initialisation: see init()

References clipper::Message::message().

clipper::FFTmap::FFTmap ( const Spacegroupspacegroup,
const Cellcell,
const Grid_sampling  grid_sam,
const FFTtype  type = 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.

Parameters:
spacegroup The spacegroup.
cell The cell, used for scaling.
grid_sam The grid sampling of the unit cell.
precalc Perform slow precalculation to get faster FFT. (default: no)

References init(), and clipper::Message::message().


Member Function Documentation

void clipper::FFTmap::init ( const Spacegroupspacegroup,
const Cellcell,
const Grid_sampling  grid_sam,
const FFTtype  type = 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.

Parameters:
spacegroup The spacegroup.
cell The cell, used for scaling.
grid_sam The grid sampling of the unit cell.
precalc Perform slow precalculation to get faster FFT. This adds a penalty of about 4s on Linux for the first FFT of any grid and direction. Subsequent FFTs will be faster. Set to true for programs which will use many FFTs. default: false.

References cell(), cell_, isymop, clipper::Spacegroup::num_symops(), spacegroup(), spacegroup_, and clipper::Spacegroup::symop().

Referenced by FFTmap().

void clipper::FFTmap::reset ( )

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().

void clipper::FFTmap::fft_h_to_x ( )

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().

void clipper::FFTmap::fft_x_to_h ( )

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().

template<class T >
void clipper::FFTmap::get_recip_data ( const HKLrfl,
datatypes::F_phi< T > &  fphi 
) const

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.

Parameters:
rfl The HKL of the data to be returned.
fphi The value, as a magnitude and phase of type ffttype

References clipper::FFTmap_p1::get_hkl(), clipper::Message::message(), and clipper::FFTmap_p1::mode.

Referenced by fft_map_to_rfl().

template<class T >
template void clipper::FFTmap::set_recip_data< ftype64 > ( const HKLrfl,
const datatypes::F_phi< T > &  fphi 
)

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.

Parameters:
rfl The HKL of the data to be set.
fphi The value, as a magnitude and phase of type 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().

template<class T >
void clipper::FFTmap::get_real_data ( const Coord_gridc,
T &  datum 
) const

get real space data

The data value for the given grid coordinate is returned. Symmetry related copies are ignored.

Parameters:
c The coordinate of the data to be returned.
datum The value of the data.

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().

template<class T >
template void clipper::FFTmap::set_real_data< ftype64 > ( const Coord_gridc,
const T &  datum 
)

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.

Parameters:
c The coordinate of the data to be set.
datum The value of the data.

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().

datatypes::F_phi< ffttype > clipper::FFTmap::get_recip_data ( const HKLrfl ) const

get reciprocal space data (No error checking)

No error is produced if the space is wrong.

Parameters:
rfl The HKL of the data to be returned.
Returns:
The value, as magnitude and phase of type ffttype

References clipper::FFTmap_p1::get_hkl().

const ffttype & clipper::FFTmap::get_real_data ( const Coord_gridc ) const [inline]

get real space data (No error checking)

No error is produced if the space is wrong.

Parameters:
c The grid coordinate of the data to be returned.
Returns:
The value, as type ffttype

References clipper::FFTmap_p1::grid_real(), clipper::FFTmap_p1::real_data(), and clipper::Coord_grid::unit().

template<class H , class X >
void clipper::FFTmap::fft_rfl_to_map ( const H &  h,
X &  x 
)

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).

Parameters:
h The source reflection data object.
x The target map object.

References fft_h_to_x(), get_real_data(), reset(), and set_recip_data().

template<class H , class X >
void clipper::FFTmap::fft_map_to_rfl ( const X &  x,
H &  h 
)

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).

Parameters:
x The source map object.
h The target reflection data object.

References fft_x_to_h(), get_recip_data(), reset(), and set_real_data().


The documentation for this class was generated from the following files:

Generated on Tue Oct 28 2014 for Clipper by  doxygen 1.7.4

AltStyle によって変換されたページ (->オリジナル) /