clipper::FFTmap Class Reference

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

#include <fftmap.h>

Inheritance diagram for clipper::FFTmap:

clipper::FFTmap_p1

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

Cell cell_
 unit cell
Spacegroup spacegroup_
 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()

clipper::FFTmap::FFTmap ( const Spacegroup spacegroup,
const Cell cell,
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)


Member Function Documentation

void clipper::FFTmap::init ( const Spacegroup spacegroup,
const Cell cell,
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.

void clipper::FFTmap::reset (  ) 

Reset.

Reset the space and zero all the data, if necessary.

Reimplemented from clipper::FFTmap_p1.

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.

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.

template<class T >
void clipper::FFTmap::get_recip_data ( const HKL rfl,
datatypes::F_phi< T > &  fphi 
) const [inline]

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

template<class T >
void clipper::FFTmap::set_recip_data ( const HKL rfl,
const datatypes::F_phi< T > &  fphi 
) [inline]

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

template<class T >
void clipper::FFTmap::get_real_data ( const Coord_grid c,
T &  datum 
) const [inline]

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.

template<class T >
void clipper::FFTmap::set_real_data ( const Coord_grid c,
const T &  datum 
) [inline]

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.

datatypes::F_phi< ffttype > clipper::FFTmap::get_recip_data ( const HKL rfl  )  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

const ffttype & clipper::FFTmap::get_real_data ( const Coord_grid c  )  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

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

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.

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

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.


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

Generated on Fri Jun 12 18:03:40 2009 for Clipper by  doxygen 1.5.9