/Users/bernard/b20/bsoft/src/rwparam/rwmodel_param.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/rwparam/rwmodel_param.cpp - Library routines to read and write model dynamics parameters in STAR format.

SYNOPSIS

#include 'rwmodel_param.h'
#include 'rwstar.h'
#include 'linked_list.h'
#include 'utilities.h'

  Functions
Bmodparam * model_param_init (int num)
Initializes a model parameter structure and allocates memory.
int model_param_kill (Bmodparam *mp)
Deallocates memory for a model parameter structure.
Bmodparam * model_param_read (Bstring &filename)
Reads a model parameter file.
int model_param_write (Bstring &filename, Bmodparam *mp)
Writes a model parameter file.
int model_param_display (Bmodparam *mp)
Displays a model parameter in the shell.
Bmodparam * model_param_generate (Bmodel *model)
Generates a model parameter file from a model.
int model_param_set_type_indices (Bmodel *model, Bmodparam *mp)
Sets the component type indices from the model parameters.

  Variables
int verbose

Detailed Description

Library routines to read and write model dynamics parameters in STAR format.

Author:
    Bernard Heymann

Date:
    Created: 20100305

    Modified: 20110810

Definition in file rwmodel_param.cpp.

Function Documentation

  int model_param_display (Bmodparam * mp)

Displays a model parameter in the shell.

Parameters:
    *mp model parameter structure.

Returns:
    int 0.

Definition at line 303 of file rwmodel_param.cpp.

  Bmodparam* model_param_generate (Bmodel * model)

Generates a model parameter file from a model.

All the types in a list of models are collated into a string list of
types for a new model parameter structure.
The distances between component types in the matrix is set to the
smallest such distance between components of the relevant types.
The distance constant is set to 1.
The distance potential type is set to 2 (soft sphere).

Parameters:
    *model linked list of models.

Returns:
    Bmodparam* new model parameter structure.

Definition at line 374 of file rwmodel_param.cpp.

  Bmodparam* model_param_init (int num)

Initializes a model parameter structure and allocates memory.

Parameters:
    num number of component types.

Returns:
    Bmodparam* new distance matrix structure.

Definition at line 23 of file rwmodel_param.cpp.

  int model_param_kill (Bmodparam * mp)

Deallocates memory for a model parameter structure.

Parameters:
    *mp model parameter structure.

Returns:
    int 0.

Definition at line 50 of file rwmodel_param.cpp.

  Bmodparam* model_param_read (Bstring & filename)

Reads a model parameter file.

The only format supported is a STAR format.

Parameters:
    &filename file name.

Returns:
    Bmodparam* new model parameter structure.

Definition at line 79 of file rwmodel_param.cpp.

  int model_param_set_type_indices (Bmodel * model, Bmodparam * mp)

Sets the component type indices from the model parameters.

The position of a type in the distance matrix type list determines
the type index within the distance matrix itself.
The indices of the component types within each model is then set
to the corresponding index for the distance matrix.
If the type is not represented in the distance matrix, its index
is set to -1.

Parameters:
    *model linked list of models.
    *mp model parameter structure.

Returns:
    int 0.

Definition at line 491 of file rwmodel_param.cpp.

  int model_param_write (Bstring & filename, Bmodparam * mp)

Writes a model parameter file.

The only format supported is a STAR format.

Parameters:
    &filename file name.
    *mp model parameter structure.

Returns:
    int 0.

Definition at line 233 of file rwmodel_param.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.