![]() |
Bsoft 2.1.4
Bernard's software package
|
Headers of functions using a monte carlo metroplis algorithm to energy minimize molecular positions. More...
Functions | |
Bmolgroup * | monte_carlo_metropolis (Bmolgroup *molgroup, Bmd *md, Bimage *map, double beta, double max_angle, double max_shift, long max_iter, int rigid, double(Efunc)(Bmolgroup *, Bimage *, Bmd *), int(Tfunc)(Bmolgroup *, double, double)) |
Bmolgroup * | molgroup_generate_masked_grid_list (Bmolgroup *molgroup, Bimage *pmask, Vector3< double > grid_sampling, Bstring filename) |
Generates multiple versions of a molecule at different locations. More... | |
Bmodel * | molgroup_generate_masked_grid_list (Bmolgroup *molgroup, Vector3< double > grid_sampling, Bimage *pmask) |
Bmolgroup * | molgroup_generate_orientation_list (Bmolgroup *molgroup, double angle_step, Bstring filename, int whole) |
Generates multiple versions of a molecule at different locations. More... | |
Bmodel * | molgroup_generate_orientation_list (Bmolgroup *molgroup, double angle_step) |
Bmolgroup * | mcm_molecule_list (Bmolgroup *molgroup, Bmd *md, Bimage *map, double beta, double max_angle, double max_shift, long max_iter, int rigid) |
int | mcm_molecule_groups (Bmolgroup *molgroup, Bmodel *model, Bmd *md, Bimage *map, double beta, double max_angle, double max_shift, long max_iter, int rigid) |
Monte Carlo fit of a set of molecule groups. More... | |
int | mcm_molecule_list (Bmolgroup *molgroup, Bmodel *model, Bmd *md, Bimage *map, double beta, double max_angle, double max_shift, long max_iter, int rigid) |
Monte Carlo fit of a molecule to a list of locations and orientations. More... | |
int | molgroup_set_box_to_map_boundaries (Bmolgroup *molgroup, Bimage *map) |
Sets the box in a molgroup to that defined by the map boundaries. More... | |
long | molgroup_test_if_within_box (Bmolgroup *molgroup, Vector3< double > min, Vector3< double > max) |
Tests if a molecule overlaps with a defined box. More... | |
double | monte_rigid_body_fit_energy (Bmolgroup *molgroup, Bimage *map, Bmd *md) |
Calculates the potential energy for rigid body fitting. More... | |
double | monte_atom_fit_energy (Bmolgroup *molgroup, Bimage *map, Bmd *md) |
Calculates the potential energy for fitting atoms to a map. More... | |
double | monte_bond_fit_energy (Bmolgroup *molgroup, Bimage *map, Bmd *md) |
Calculates the potential energy for fitting bonds to a map. More... | |
double | molgroup_atom_overlap (Bmolgroup *molgroup, Bmd *md) |
Calculates an energy term based on atom overlap. More... | |
int | molgroup_rigid_body_transform (Bmolgroup *molgroup, double max_angle, double shift_std) |
Randomly transforms a molecule or molecule group. More... | |
int | molgroup_move_atoms_down_energy (Bmolgroup *molgroup, double max_angle, double max_shift) |
Move atoms random distances down the energy gradient. More... | |
Headers of functions using a monte carlo metroplis algorithm to energy minimize molecular positions.
int mcm_molecule_groups | ( | Bmolgroup * | molgroup, |
Bmodel * | model, | ||
Bmd * | md, | ||
Bimage * | map, | ||
double | beta, | ||
double | max_angle, | ||
double | max_shift, | ||
long | max_iter, | ||
int | rigid | ||
) |
Monte Carlo fit of a set of molecule groups.
*molgroup | molecule group. |
*model | model parameters (modified). |
*md | molecular dynamics structure. |
*map | map. |
beta | equivalent of 1/kT. |
max_angle | maximum allowed angular step size. |
max_shift | maximum allowed shift. |
max_iter | maximum number of iterations. |
rigid | selection of mode. |
For each model, the molecule group is first transformed to the model location and orientation. The whole ensemble is then refined with the Monte Carlo Metropolis algorithm and the model parameters updated.
Bmolgroup * mcm_molecule_list | ( | Bmolgroup * | molgroup, |
Bmd * | md, | ||
Bimage * | map, | ||
double | beta, | ||
double | max_angle, | ||
double | max_shift, | ||
long | max_iter, | ||
int | rigid | ||
) |
int mcm_molecule_list | ( | Bmolgroup * | molgroup, |
Bmodel * | model, | ||
Bmd * | md, | ||
Bimage * | map, | ||
double | beta, | ||
double | max_angle, | ||
double | max_shift, | ||
long | max_iter, | ||
int | rigid | ||
) |
Monte Carlo fit of a molecule to a list of locations and orientations.
*molgroup | molecule group. |
*model | model parameters (modified). |
*md | molecular dynamics structure. |
*map | map. |
beta | equivalent of 1/kT. |
max_angle | maximum allowed angular step size. |
max_shift | maximum allowed shift. |
max_iter | maximum number of iterations. |
rigid | selection of mode. |
For each model, the molecule group is first transformed to the model location and orientation. This is then refined with the Monte Carlo Metropolis algorithm and the model parameters updated.
Calculates an energy term based on atom overlap.
*molgroup | molecular structure. |
*md | molecular dynamics structure. |
The energy is defined as linear decay to the reference separation distance and zero beyond: Esep = Ksep * (1 - d/dsep) for d < dsep, zero otherwise
Bmolgroup * molgroup_generate_masked_grid_list | ( | Bmolgroup * | molgroup, |
Bimage * | pmask, | ||
Vector3< double > | grid_sampling, | ||
Bstring | filename | ||
) |
Generates multiple versions of a molecule at different locations.
*molgroup | molecule group. |
*pmask | mask to get limit grid positions. |
grid_sampling | sampling for grid search. |
filename | output base file name. |
The locations of the molecules are defined on the intersection of a grid and a user-defined mask. The numbered output filename is also set. Note: the molecule group minima and maxima should be set to the volume to be searched before calling this function.
Bmodel * molgroup_generate_masked_grid_list | ( | Bmolgroup * | molgroup, |
Vector3< double > | grid_sampling, | ||
Bimage * | pmask | ||
) |
Bmolgroup * molgroup_generate_orientation_list | ( | Bmolgroup * | molgroup, |
double | angle_step, | ||
Bstring | filename, | ||
int | whole | ||
) |
Generates multiple versions of a molecule at different locations.
*molgroup | molecule group. |
angle_step | angular step size in radians. |
filename | output base file name. |
whole | treat the whole ensemble as a rigid body. |
The molecule group is rotated in place to give all orientations with a given angle step size between the views. The numbered output filename is also set.
int molgroup_move_atoms_down_energy | ( | Bmolgroup * | molgroup, |
double | max_angle, | ||
double | max_shift | ||
) |
Move atoms random distances down the energy gradient.
*molgroup | molecular structure. |
max_angle | (not used). |
max_shift | maximum shift for each atom. |
The distance of movement is limited to the maximum shift.
int molgroup_rigid_body_transform | ( | Bmolgroup * | molgroup, |
double | max_angle, | ||
double | shift_std | ||
) |
Randomly transforms a molecule or molecule group.
*molgroup | molecular structure. |
max_angle | maximum rotation angle. |
shift_std | gaussian length for shift vector. |
The transformation is calculted as a random angular rotation and a random shift. The shift is sampled from a random vector with a gaussian length distribution.
Sets the box in a molgroup to that defined by the map boundaries.
*molgroup | molecule group. |
*map | map to get boundaries from. |
long molgroup_test_if_within_box | ( | Bmolgroup * | molgroup, |
Vector3< double > | min, | ||
Vector3< double > | max | ||
) |
Tests if a molecule overlaps with a defined box.
*molgroup | molecule group. |
min | start of box. |
max | end of box. |
Calculates the potential energy for fitting atoms to a map.
*molgroup | molecular structure. |
*map | density map. |
*md | molecular dynamics structure. |
The energy is the sum of the bond, angle, and map energies.
Calculates the potential energy for fitting bonds to a map.
*molgroup | molecular structure. |
*map | density map. |
*md | molecular dynamics structure. |
The energy is the sum of the bond, angle, and map energies.
Bmolgroup * monte_carlo_metropolis | ( | Bmolgroup * | molgroup, |
Bmd * | md, | ||
Bimage * | map, | ||
double | beta, | ||
double | max_angle, | ||
double | max_shift, | ||
long | max_iter, | ||
int | rigid, | ||
double(Efunc)(Bmolgroup *, Bimage *, Bmd *) | , | ||
int(Tfunc)(Bmolgroup *, double, double) | |||
) |
Calculates the potential energy for rigid body fitting.
*molgroup | molecular structure. |
*map | density map. |
*md | molecular dynamics structure. |
The energy is the sum of the overlap, map, and point force energies.