/Users/bernard/b20/bsoft/include/model_util.h(3)

NAME
/Users/bernard/b20/bsoft/include/model_util.h - Library routines used for model processing.

SYNOPSIS

#include 'rwmodel.h'
#include 'rwmolecule.h'
#include 'Bstring.h'

  Functions
long models_process (Bmodel *model, long(modfunc)(Bmodel *))
Process a list of models using the specified function.
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 model_list (Bmodel *model)
Lists models in table form.
long model_list_comp (Bmodel *model)
Lists models with component counts in table form.
long model_replace_components (Bmodel *model, Bmodel *modref)
Replaces all components in a model with reference components.
long model_merge (Bmodel *model)
Merges components from all models into one.
long model_number_ids (Bmodel *model)
Add a number to each model id.
long model_rename_components (Bmodel *model)
Rename components.
double model_mass (Bmodel *model)
Calculates the mass of a model from component masses.
long model_mass_all (Bmodel *model)
Calculates the masses of all the models in the list.
Vector3< double > model_center_of_mass (Bmodel *model)
double model_gyration_radius (Bmodel *model)
Calculates the radius of gyration for a model.
Vector3< double > model_principal_axes (Bmodel *model, Vector3< double > *eigenvec)
Calculates the principal axes of a model.
long model_principal_axes (Bmodel *model)
long model_radial_distribution (Bmodel *model, double interval)
Calculates the radial distribution function of a model.
Bmolgroup * model_assemble (Bmodel *model, Bstring &paramfile, int separate)
Concatenates selected molecules into one group.
Bmodel * model_generate_com (Bmolgroup *molgroup)
Calculates the centers-of-mass of molecule group components and generates a new model.
long model_update_centers_of_mass (Bmodel *model, Bmolgroup *molgroup)
Updates the centers-of-mass of molecule group components.
long model_average_components (Bmodel *model, int number)
Averages sequential components.
Bcomponent ** component_get_array (Bmodel *model, long &ncomp)
Generates an array of pointers to component structures.
Vector3< double > component_plane (Bcomponent **comparray, double &offset)
Calculates a plane through an array of components.

Detailed Description

Library routines used for model processing.

Author:
    Bernard Heymann

Date:
    Created: 20060908

    Modified: 20190125

Definition in file model_util.h.

Function Documentation

  Bcomponent** component_get_array (Bmodel * model, long & n)

Generates an array of pointers to component structures.

Parameters:
    *model model structure.
    &n pointer to number of comps found.

Returns:
    Bcomponent** array of pointers to components.

Definition at line 903 of file model_util.cpp.

  Vector3<double> component_plane (Bcomponent ** comparray, double & offset)

Calculates a plane through an array of components.

Parameters:
    **comparray array of components.
    &offset offset from plane.

Returns:
    Vector3<double> plane normal.

    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.

Definition at line 933 of file model_util.cpp.

  Bmolgroup* model_assemble (Bmodel * model, Bstring & paramfile, int separate)

Concatenates selected molecules into one group.

Parameters:
    *model model parameters.
    &paramfile atomic parameter file.
    separate flag to generate separate molecule groups.

Returns:
    Bmolgroup* list of molecule groups.

    Only the first model in the linked list is processed.

Definition at line 688 of file model_util.cpp.

  long model_average_components (Bmodel * model, int number)

Averages sequential components.

Parameters:
    *model model structure to be modified.
    number number of components to average.

Returns:
    long number of remaining components.

    Only the first component in each set with modified coordinates is kept.

Definition at line 866 of file model_util.cpp.

  Vector3<double> model_center_of_mass (Bmodel * model)

Definition at line 475 of file model_util.cpp.

  Bmodel* model_generate_com (Bmolgroup * molgroup)

Calculates the centers-of-mass of molecule group components and generates a new model.

Parameters:
    *molgroup list of molecule groups.

Returns:
    Bmodel* new model.

    Each molecule is assumed to be a component.

Definition at line 790 of file model_util.cpp.

  double model_gyration_radius (Bmodel * model)

Calculates the radius of gyration for a model.

Parameters:
    *model model parameters.

Returns:
    double radius of gyration.

    Only the first model in the list is processed.

Definition at line 503 of file model_util.cpp.

  long model_list (Bmodel * model)

Lists models in table form.

Parameters:
    *model model parameters.

Returns:
    long number of models.

Definition at line 127 of file model_util.cpp.

  long model_list_comp (Bmodel * model)

Lists models with component counts in table form.

Parameters:
    *model model parameters.

Returns:
    long number of models.

Definition at line 158 of file model_util.cpp.

  double model_mass (Bmodel * model)

Calculates the mass of a model from component masses.

Parameters:
    *model model parameters.

Returns:
    double model mass.

    The component type masses must be provided.
    Only the first model in the list is processed.

Definition at line 416 of file model_util.cpp.

  long model_mass_all (Bmodel * model)

Calculates the masses of all the models in the list.

Parameters:
    *model linked list of model parameters.

Returns:
    long number of selected models.

    The component type masses must be provided.

Definition at line 445 of file model_util.cpp.

  long model_merge (Bmodel * model)

Merges components from all models into one.

Parameters:
    *model model parameters.

Returns:
    long number of components.

Definition at line 299 of file model_util.cpp.

  long model_number_ids (Bmodel * model)

Add a number to each model id.

Parameters:
    *model model parameters.

Returns:
    long number of models.

    The intention is to give unique id's to models.

Definition at line 356 of file model_util.cpp.

  Vector3<double> model_principal_axes (Bmodel * model, Vector3< double > * eigenvec)

Calculates the principal axes of a model.

Parameters:
    *model model structure.
    *eigenvec eigen vectors (can be NULL).

Returns:
    Vector3<double> 3-valued vector of principal axes.

    Only the first model in the list is processed.

Definition at line 534 of file model_util.cpp.

  long model_principal_axes (Bmodel * model)

Definition at line 574 of file model_util.cpp.

  long model_radial_distribution (Bmodel * model, double interval)

Calculates the radial distribution function of a model.

Parameters:
    *model model structure.
    interval interval between bins.

Returns:
    long 0.

    Only the first model in the list is processed.

Definition at line 605 of file model_util.cpp.

  long model_rename_components (Bmodel * model)

Rename components.

Parameters:
    *model model parameters.

Returns:
    long number of components.

    The number of links to a component determines its new name.
    Only the first model is processed.

Definition at line 378 of file model_util.cpp.

  long model_replace_components (Bmodel * model, Bmodel * modref)

Replaces all components in a model with reference components.

Parameters:
    *model model structure to be modified.
    *modref reference model.

Returns:
    long number of components used in reference.

    Only the first model in the reference is used.
    All models will have identical sets of components.

Definition at line 227 of file model_util.cpp.

  long model_update_centers_of_mass (Bmodel * model, Bmolgroup * molgroup)

Updates the centers-of-mass of molecule group components.

Parameters:
    *model model parameters.
    *molgroup list of molecule groups.

Returns:
    long number of selected components.

    The identifiers of the molecule groups must correspond to the component identifiers.

Definition at line 839 of file model_util.cpp.

  long models_process (Bmodel * model, long(modfunc)(Bmodel *))

Process a list of models using the specified function.

Parameters:
    *model list of models.
    modfunc function to be called.

Returns:
    long aggregate number returned by function.

    The function called process only one model.

Definition at line 36 of file model_util.cpp.

  long models_process (Bmodel * model, long i, long(modfunc)(Bmodel *, long))

Definition at line 60 of file model_util.cpp.

  long models_process (Bmodel * model, double d, long(modfunc)(Bmodel *, double))

Definition at line 84 of file model_util.cpp.

  long models_process (Bmodel * model, Bstring & str, long(modfunc)(Bmodel *, Bstring &str))

Definition at line 108 of file model_util.cpp.

Author

Generated automatically by Doxygen for Bsoft from the source code.