| Bsoft 2.0.5 Bernard's software package

Macros | Functions
molecule_to_map.h File Reference

Header file for functions to calculate a 3D map from atomic coordinates. More...

`#include "rwmolecule.h"`
`#include "rwimg.h"`
`#include "rwatomprop.h"`
`#include "symmetry.h"`

Go to the source code of this file.

## Macros
#define | POTPREFAC 47.87801

## Functions
Bimage * | img_from_molecule (Bmolgroup *molgroup, Vector3< double > origin, Vector3< long > size, Vector3< double > sam, double resolution, double Bfactor, int wrap, int gextype, int spacegroup, UnitCell unit_cell)
| Calculates a 3D density map from a set of atomic coordinates. More...
int | compare_mol_map (Bmolgroup *molgroup, Bimage *pcalc, Bimage *pimg)
| Compares reference and calculated maps and calculates an occupancy for every atom in the molecule set. More...
Bimage * | img_sf_from_molecule (Bmolgroup *molgroup, Vector3< double > origin, Vector3< long > size, Vector3< double > sam, double resolution, int spacegroup, UnitCell unit_cell, int wrap, double Bfactor, Bstring &paramfile)
| Calculates a 3D set of structure factors from a set of atomic coordinates. More...
double * | get_potential_curves (Batomtype *atompar, double interval)
double * | get_scattering_curves (Batomtype *atompar, double Bfactor, double recip_interval, long &nscat)
int | write_scattering_curves (Bstring &paramfile, Bstring &outfile, Bstring &selection)
| Calculates and writes atomic scattering profiles to a file. More...

## Detailed Description

Header file for functions to calculate a 3D map from atomic coordinates.

Author
  Bernard Heymann

Date
  Created: 19970914
  Modified: 20150128

Definition in file molecule_to_map.h.

## Macro Definition Documentation

## ◆ POTPREFAC

#define POTPREFAC 47.87801

Definition at line 14 of file molecule_to_map.h.

## Function Documentation

## ◆ compare_mol_map()

int compare_mol_map | ( | Bmolgroup * | molgroup,
|  | Bimage * | pcalc,
|  | Bimage * | p
| ) |  |

Compares reference and calculated maps and calculates an occupancy for every atom in the molecule set.

Parameters

  *molgroup | set of molecules with atomic coordinates.
  *pcalc | map calculated from the set of molecules.
  *p | reference map.

Returns
  int 0.

Definition at line 277 of file molecule_to_map.cpp.

## ◆ get_potential_curves()

double* get_potential_curves | ( | Batomtype * | atompar,
|  | double | interval
| ) |  |

Definition at line 658 of file molecule_to_map.cpp.

## ◆ get_scattering_curves()

double* get_scattering_curves | ( | Batomtype * | atompar,
|  | double | Bfactor,
|  | double | recip_interval,
|  | long & | nscat
| ) |  |

Definition at line 720 of file molecule_to_map.cpp.

## ◆ img_from_molecule()

Bimage* img_from_molecule | ( | Bmolgroup * | molgroup,
|  | Vector3< double > | origin,
|  | Vector3< long > | size,
|  | Vector3< double > | sampling,
|  | double | resolution,
|  | double | Bfactor,
|  | int | wrap,
|  | int | gextype,
|  | int | spacegroup,
|  | UnitCell | unit_cell
| ) |  |

Calculates a 3D density map from a set of atomic coordinates.

Parameters

  *molgroup | set of molecules with atomic coordinates.
  origin | 3-valued origin vector (angstrom).
  size | 3-valued size vector (voxels).
  sampling | sampling/voxel size (angstrom/voxel).
  resolution | resolution (angstrom).
  Bfactor | global B-factor to use, if 0, use individual atom B-factors
  wrap | wrapping flag.
  gextype | type of gaussian used: 0 = single, 1 = atomic potential
  spacegroup | crystal space group.
  unit_cell | 6-valued vector of unit cell parameters.

Returns
  Bimage* the new map.

      A 3D map is calculated from atomic coordinates by placing a gaussian
      sphere at each set of atomic coordinates. The resolution is set as
      twice the sigma coefficient of the gaussian function. The amplitude
      of the gaussian function is set so that the total density calculated
      equals the atomic mass. The resultant map therefore has the density
      units of Dalton/voxel.
      The statistics of the new image is calculated.

Definition at line 53 of file molecule_to_map.cpp.

## ◆ img_sf_from_molecule()

Bimage* img_sf_from_molecule | ( | Bmolgroup * | molgroup,
|  | Vector3< double > | origin,
|  | Vector3< long > | size,
|  | Vector3< double > | sampling,
|  | double | resolution,
|  | int | spacegroup,
|  | UnitCell | unit_cell,
|  | int | wrap,
|  | double | Bfactor,
|  | Bstring & | paramfile
| ) |  |

Calculates a 3D set of structure factors from a set of atomic coordinates.

Parameters

  *molgroup | set of molecules with atomic coordinates.
  origin | 3-valued origin vector (voxels).
  size | 3-valued size vector (voxels).
  sampling | sampling/voxel size (angstrom/voxel).
  resolution | resolution (angstrom).
  spacegroup | crystal space group.
  unit_cell | 6-valued vector of unit cell parameters.
  wrap | 0=cut atoms outside box, 1=wrap coordinates within unit cell.
  Bfactor | constant for decay curve.
  &paramfile | parameter file with scattering coefficients.

Returns
  Bimage* the new structure factors.

      All structure factors within a given resolution are calculated from
      all the selected atomic coordinates. The coordinates are fractionalized
      to fit into the given size box. If the size of the box is not given,
      it defaults to:
          x_size = (max(x_coor) - min(x_coor)) / x_sampling
      The atomic scattering profiles are read from the STAR database as the
      amplitudes and B-factors of reciprocal space gaussians. For each profile,
      a lookup table is calculated to speed up further calculations.
      The statistics of the new image is calculated.

Definition at line 355 of file molecule_to_map.cpp.

## ◆ write_scattering_curves()

int write_scattering_curves | ( | Bstring & | paramfile,
|  | Bstring & | outfile,
|  | Bstring & | selection
| ) |  |

Calculates and writes atomic scattering profiles to a file.

Parameters

  &paramfile | file with scattering coefficients.
  &outfile | file to write curves to.
  &selection | element selection.

Returns
  int 0.

      The scattering coefficients are obtained from an input parameter file.

Definition at line 803 of file molecule_to_map.cpp.