![]() |
Bsoft 2.1.4
Bernard's software package
|
Library routines used for model processing. More...
#include "model_util.h"
#include "model_transform.h"
#include "model_select.h"
#include "model_links.h"
#include "mol_transform.h"
#include "mol_compare.h"
#include "mol_util.h"
#include "symmetry.h"
#include "matrix_linear.h"
#include "matrix_util.h"
#include "Matrix3.h"
#include "random_numbers.h"
#include "linked_list.h"
#include "utilities.h"
Functions | |
long | models_process (Bmodel *model, long(modfunc)(Bmodel *)) |
Process a list of models using the specified function. More... | |
long | models_process (Bmodel *model, long i, long(modfunc)(Bmodel *, long)) |
long | models_process (Bmodel *model, double d, long(modfunc)(Bmodel *, double)) |
long | models_process (Bmodel *model, Bstring &str, long(modfunc)(Bmodel *, Bstring &str)) |
long | models_process (Bmodel *model, string &str, long(modfunc)(Bmodel *, string &str)) |
long | model_list (Bmodel *model) |
Lists models in table form. More... | |
long | model_list_comp (Bmodel *model) |
Lists models with component counts in table form. More... | |
long | model_replace_components (Bmodel *model, Bmodel *modref) |
Replaces all components in a model with reference components. More... | |
long | model_merge (Bmodel *model) |
Merges components from all models into one. More... | |
long | model_number_ids (Bmodel *model) |
Add a number to each model id. More... | |
long | model_rename (Bmodel *model, char first_name) |
Rename models with alphabetical letters. More... | |
long | model_rename_components (Bmodel *model) |
Rename components. More... | |
double | model_mass (Bmodel *model) |
Calculates the mass of a model from component masses. More... | |
long | model_mass_all (Bmodel *model) |
Calculates the masses of all the models in the list. More... | |
Vector3< double > | model_center_of_mass (Bmodel *model) |
Calculates the center-of-mass of a model. More... | |
Vector3< double > | models_center_of_coordinates (Bmodel *model) |
Calculates the center-of-mass of a list of models. More... | |
double | model_distance_sum (Bmodel *model, Vector3< double > loc) |
Calculates the sum of distances of model components to a location. More... | |
Vector3< double > | model_geometric_median_estimate (Bmodel *model, Vector3< double > pgm) |
Calculates the geometric median estimate of model components. More... | |
Vector3< double > | model_geometric_median (Bmodel *model) |
Calculates the geometric median of model components. More... | |
double | model_gyration_radius (Bmodel *model) |
Calculates the radius of gyration for a model. More... | |
Vector3< double > | model_principal_axes (Bmodel *model, Vector3< double > *eigenvec) |
Calculates the principal axes of a model. More... | |
Vector3< double > | model_principal_axes (Bmodel *model, Matrix &eigenvec) |
long | model_principal_axes (Bmodel *model) |
long | model_radial_distribution (Bmodel *model, double interval) |
Calculates the radial distribution function of a model. More... | |
long | molgroup_write_into_grid (Bmolgroup *molgroup, Vector3< int > size, Vector3< double > min, double sampling, int *grid) |
Bmolgroup * | model_assemble (Bmodel *model, Bstring ¶mfile, int separate) |
Concatenates selected molecules into one group. More... | |
Bmodel * | model_generate_com (Bmolgroup *molgroup) |
Calculates the centers-of-mass of molecule group components and generates a new model. More... | |
long | model_update_centers_of_mass (Bmodel *model, Bmolgroup *molgroup) |
Updates the centers-of-mass of molecule group components. More... | |
long | model_average_components (Bmodel *model, int number) |
Averages sequential components. More... | |
Bcomponent ** | component_get_array (Bmodel *model, long &n) |
Generates an array of pointers to component structures. More... | |
Vector3< double > | component_plane (vector< Bcomponent * > &comparray, double &offset) |
Calculates a plane through an array of components. More... | |
vector< Vector3< double > > | models_calculate_bounds (Bmodel *model) |
Calculates the bounds of a list of models. More... | |
vector< vector< Bcomponent * > > | model_component_grid (Bmodel *model, Vector3< long > &size, Vector3< double > &origin, Vector3< double > &sampling) |
Generates lists of atoms based on a grid. More... | |
vector< Bcomponent * > | models_get_component_array (Bmodel *model) |
Generates an array of pointers to model components. More... | |
vector< vector< Bcomponent * > > | model_split_into_slices (Bmodel *model, double bottom, double top, double thickness) |
Splits the components of models into slices. More... | |
Variables | |
int | verbose |
Library routines used for model processing.
Bcomponent ** component_get_array | ( | Bmodel * | model, |
long & | n | ||
) |
Generates an array of pointers to component structures.
*model | model structure. |
&n | pointer to number of comps found. |
Vector3< double > component_plane | ( | vector< Bcomponent * > & | comparray, |
double & | offset | ||
) |
Calculates a plane through an array of components.
**comparray | array of components. |
&offset | offset from plane. |
A plane is fit through the polygon vertices and the normal calculated from: n•p = d where n is the normal vector, p is a point in the plane, and d is the offset. The polygon planarity is defined as the root-mean-square-deviation from the fitted plane.
Concatenates selected molecules into one group.
*model | model parameters. |
¶mfile | atomic parameter file. |
separate | flag to generate separate molecule groups. |
Only the first model in the linked list is processed.
long model_average_components | ( | Bmodel * | model, |
int | number | ||
) |
Averages sequential components.
*model | model structure to be modified. |
number | number of components to average. |
Only the first component in each set with modified coordinates is kept.
Calculates the center-of-mass of a model.
*model | model parameters. |
Only the first model in the list is processed.
vector< vector< Bcomponent * > > model_component_grid | ( | Bmodel * | model, |
Vector3< long > & | size, | ||
Vector3< double > & | origin, | ||
Vector3< double > & | sampling | ||
) |
Generates lists of atoms based on a grid.
*model | model list. |
size | size of grid. |
origin | origin of grid. |
sampling | spacing in each dimension. |
The goal is to fit all the components within the grid boundaries. Components located outside the grid will be added to the edges.
Calculates the sum of distances of model components to a location.
*model | model parameters. |
loc | reference location. |
Only the first model in the list is processed.
Calculates the centers-of-mass of molecule group components and generates a new model.
*molgroup | list of molecule groups. |
Each molecule is assumed to be a component.
Calculates the geometric median of model components.
*model | model parameters. |
Only the first model in the list is processed. Based on Weiszfeld’s method.
Calculates the geometric median estimate of model components.
*model | model parameters. |
pgm | previous geometric median estimate. |
Only the first model in the list is processed.
double model_gyration_radius | ( | Bmodel * | model | ) |
Calculates the radius of gyration for a model.
*model | model parameters. |
Only the first model in the list is processed.
long model_list | ( | Bmodel * | model | ) |
Lists models in table form.
*model | model parameters. |
long model_list_comp | ( | Bmodel * | model | ) |
Lists models with component counts in table form.
*model | model parameters. |
double model_mass | ( | Bmodel * | model | ) |
Calculates the mass of a model from component masses.
*model | model parameters. |
The component type masses must be provided. Only the first model in the list is processed.
long model_mass_all | ( | Bmodel * | model | ) |
Calculates the masses of all the models in the list.
*model | linked list of model parameters. |
The component type masses must be provided.
long model_merge | ( | Bmodel * | model | ) |
Merges components from all models into one.
*model | model parameters. |
long model_number_ids | ( | Bmodel * | model | ) |
Add a number to each model id.
*model | model parameters. |
The intention is to give unique id's to models.
long model_principal_axes | ( | Bmodel * | model | ) |
Calculates the principal axes of a model.
*model | model structure. |
*eigenvec | eigen vectors (can be NULL). |
Only the first model in the list is processed.
long model_radial_distribution | ( | Bmodel * | model, |
double | interval | ||
) |
Calculates the radial distribution function of a model.
*model | model structure. |
interval | interval between bins. |
Only the first model in the list is processed.
long model_rename | ( | Bmodel * | model, |
char | first_name | ||
) |
Rename models with alphabetical letters.
*model | model parameters. |
first_name | letter of first model. |
long model_rename_components | ( | Bmodel * | model | ) |
Rename components.
*model | model parameters. |
The number of links to a component determines its new name. Only the first model is processed.
Replaces all components in a model with reference components.
*model | model structure to be modified. |
*modref | reference model. |
Only the first model in the reference is used. All models will have identical sets of components.
vector< vector< Bcomponent * > > model_split_into_slices | ( | Bmodel * | model, |
double | bottom, | ||
double | top, | ||
double | thickness | ||
) |
Splits the components of models into slices.
*model | model. |
bottom | minimum coordinate in z. |
top | maximum coordinate in z. |
thickness | slice thickness. |
Updates the centers-of-mass of molecule group components.
*model | model parameters. |
*molgroup | list of molecule groups. |
The identifiers of the molecule groups must correspond to the component identifiers.
Calculates the bounds of a list of models.
*model | model list. |
Calculates the center-of-mass of a list of models.
*model | model parameters. |
vector< Bcomponent * > models_get_component_array | ( | Bmodel * | model | ) |
Generates an array of pointers to model components.
*model | model. |
Process a list of models using the specified function.
*model | list of models. |
modfunc | function to be called. |
long molgroup_write_into_grid | ( | Bmolgroup * | molgroup, |
Vector3< int > | size, | ||
Vector3< double > | min, | ||
double | sampling, | ||
int * | grid | ||
) |
|
extern |