| Bsoft 2.0.5 Bernard's software package

Functions
model_links.h File Reference

Library routines used for model link processing. More...

`#include "rwmodel.h"`
`#include "Bstring.h"`

Go to the source code of this file.

## Functions
long | model_setup_links (Bmodel *model)
| Set up the link list for each component. More...
long | model_link_list_generate (Bmodel *model, double maxlength)
| Generates a link list for a model based on vertex separation. More...
long | model_set_link_length (Bmodel *model, double linklength)
| Sets the reference link lengths. More...
long | model_set_link_radius (Bmodel *model, double linkrad)
| Set the display radius for all links to a specific value. More...
long | model_reduce_linked (Bmodel *model, Bstring &submodname, int flags)
| Reduces a model to one component per linked set of components. More...
long | model_links_minimum_valency (Bmodel *model, long valency)
| Generates links such that each component has at least the given valency. More...

## Detailed Description

Library routines used for model link processing.

Author
  Bernard Heymann

Date
  Created: 20060908
  Modified: 20141029

Definition in file model_links.h.

## Function Documentation

## ◆ model_link_list_generate()

long model_link_list_generate | ( | Bmodel * | model,
|  | double | maxlength
| ) |  |

Generates a link list for a model based on vertex separation.

    Only the first model is processed.

Parameters

  *model | model parameters.
  maxlength | maximum link length.

Returns
  long number of links.

Definition at line 70 of file model_links.cpp.

## ◆ model_links_minimum_valency()

long model_links_minimum_valency | ( | Bmodel * | model,
|  | long | valency
| ) |  |

Generates links such that each component has at least the given valency.

Parameters

  *model | model structure.
  valency | the desired valency.

Returns
  long number of links.

      A distance matrix is calculated and a cutoff determined that ensures
      that each column has at least the given valency number below it.
      The links are then created based on the cutoff.
      Only the first model in the linked list is used.

Definition at line 294 of file model_links.cpp.

## ◆ model_reduce_linked()

long model_reduce_linked | ( | Bmodel * | model,
|  | Bstring & | submodname,
|  | int | flags
| ) |  |

Reduces a model to one component per linked set of components.

Parameters

  *model | model structure to be modified.
  &submodname | sub-model file name.
  flags | 1=generate averaged types.

Returns
  long number of new components.

      A new reduced set of components is generated.
      Each old set of linked components is saved as a sub-model and referenced as a type.
      Optionally, the old sets of components are averaged and the
      averaged model saved as a type.

Definition at line 194 of file model_links.cpp.

## ◆ model_set_link_length()

long model_set_link_length | ( | Bmodel * | model,
|  | double | linklength
| ) |  |

Sets the reference link lengths.

    Only the first model is processed.

Parameters

  *model | model parameters.
  linklength | reference link length.

Returns
  long number of links.

Definition at line 112 of file model_links.cpp.

## ◆ model_set_link_radius()

long model_set_link_radius | ( | Bmodel * | model,
|  | double | linkrad
| ) |  |

Set the display radius for all links to a specific value.

    Only the first model is processed.

Parameters

  *model | model parameters.
  linkrad | link display radius.

Returns
  long number of components selected.

Definition at line 139 of file model_links.cpp.

## ◆ model_setup_links()

long model_setup_links | ( | Bmodel * | model | ) |

Set up the link list for each component.

Parameters

  *model | model parameters.

Returns
  long total number of links.

      Only the first model is processed.

Definition at line 28 of file model_links.cpp.