| Bsoft 2.0.5 Bernard's software package

Functions | Variables
rwmodel_bild.cpp File Reference

Library routines to read and write Chimera BILD model parameters. More...

`#include "rwmodel.h"`
`#include "model_neighbors.h"`
`#include "model_poly.h"`
`#include "Color.h"`
`#include "utilities.h"`
`#include "timer.h"`
`#include <fstream>`

Go to the source code of this file.

## Functions
Bcomponent * | component_add_if_not_exist (Vector3< double > loc, Bcomponent **comp, int &number)
Bmodel * | read_model_bild (Bstring *file_list)
| Reads Chimera BILD model parameters. More...
void | bild_color (ofstream &fbld, RGB< float > rgb)
void | bild_color (ofstream &fbld, RGBA< float > rgba)
void | bild_sphere (ofstream &fbld, Vector3< double > loc, double radius)
void | bild_cylinder (ofstream &fbld, Vector3< double > start, Vector3< double > end, double radius)
void | bild_polygon_start (ofstream &fbld, Vector3< double > vertex)
void | bild_polygon_add (ofstream &fbld, Vector3< double > vertex)
void | bild_polygon_end (ofstream &fbld, Vector3< double > vertex)
void | bild_arrow (ofstream &fbld, Vector3< double > start, Vector3< double > end, double cylrad, double conerad, double rho)
int | write_model_bild (Bstring &filename, Bmodel *model)
| Writes Chimera BILD model parameters. More...
int | model_to_bild_orientations (Bstring &filename, Bmodel *model, int vec_type, int color_type)
| Converts a model into a representation with views. More...
int | model_to_bild_view_sphere (Bstring &filename, Bmodel *model, int color_type)
| Converts a model into a representation with views. More...
int | model_to_bild_view_polygons (Bstring &filename, Bmodel *model, int order, int color_type)
| Converts a model into a representation with view polygons. More...
int | model_to_bild_polygons (Bstring &filename, Bmodel *model, int color_type)
| Converts a model into a bild polygon representation. More...
int | model_to_bild_neighbor_planes (Bstring &filename, Bmodel *model, int color_type)
| Converts a model into a bild neighbor plane representation. More...

## Variables
int | verbose

## Detailed Description

Library routines to read and write Chimera BILD model parameters.

Author
  Bernard Heymann

Date
  Created: 20080521
  Modified: 20160616

Definition in file rwmodel_bild.cpp.

## Function Documentation

## ◆ bild_arrow()

void bild_arrow | ( | ofstream & | fbld,
|  | Vector3< double > | start,
|  | Vector3< double > | end,
|  | double | cylrad,
|  | double | conerad,
|  | double | rho
| ) |  |

Definition at line 219 of file rwmodel_bild.cpp.

## ◆ bild_color() [1/2]

void bild_color | ( | ofstream & | fbld,
|  | RGB< float > | rgb
| ) |  |

Definition at line 184 of file rwmodel_bild.cpp.

## ◆ bild_color() [2/2]

void bild_color | ( | ofstream & | fbld,
|  | RGBA< float > | rgba
| ) |  |

Definition at line 189 of file rwmodel_bild.cpp.

## ◆ bild_cylinder()

void bild_cylinder | ( | ofstream & | fbld,
|  | Vector3< double > | start,
|  | Vector3< double > | end,
|  | double | radius
| ) |  |

Definition at line 199 of file rwmodel_bild.cpp.

## ◆ bild_polygon_add()

void bild_polygon_add | ( | ofstream & | fbld,
|  | Vector3< double > | vertex
| ) |  |

Definition at line 210 of file rwmodel_bild.cpp.

## ◆ bild_polygon_end()

void bild_polygon_end | ( | ofstream & | fbld,
|  | Vector3< double > | vertex
| ) |  |

Definition at line 214 of file rwmodel_bild.cpp.

## ◆ bild_polygon_start()

void bild_polygon_start | ( | ofstream & | fbld,
|  | Vector3< double > | vertex
| ) |  |

Definition at line 206 of file rwmodel_bild.cpp.

## ◆ bild_sphere()

void bild_sphere | ( | ofstream & | fbld,
|  | Vector3< double > | loc,
|  | double | radius
| ) |  |

Definition at line 194 of file rwmodel_bild.cpp.

## ◆ component_add_if_not_exist()

Bcomponent* component_add_if_not_exist | ( | Vector3< double > | loc,
|  | Bcomponent ** | comp,
|  | int & | number
| ) |  |

Definition at line 21 of file rwmodel_bild.cpp.

## ◆ model_to_bild_neighbor_planes()

int model_to_bild_neighbor_planes | ( | Bstring & | filename,
|  | Bmodel * | model,
|  | int | color_type
| ) |  |

Converts a model into a bild neighbor plane representation.

Parameters

  &filename | bild format file name.
  *model | model structure.
  color_type | flag to color planes.

Returns
  int 0, <0 on error.

      Color scheme types:
          1   spectrum/rainbow.
          2   fom.

Definition at line 593 of file rwmodel_bild.cpp.

## ◆ model_to_bild_orientations()

int model_to_bild_orientations | ( | Bstring & | filename,
|  | Bmodel * | model,
|  | int | vec_type,
|  | int | color_type
| ) |  |

Converts a model into a representation with views.

Parameters

  &filename | bild format file name.
  *model | model structure.
  vec_type | 0=views, 1=vectors, 2=velocity vectors.
  color_type | flag to color components.

Returns
  int 0, <0 on error.

      A sphere is drawn for every component with a cylinder indicating its view.

Definition at line 275 of file rwmodel_bild.cpp.

## ◆ model_to_bild_polygons()

int model_to_bild_polygons | ( | Bstring & | filename,
|  | Bmodel * | model,
|  | int | color_type
| ) |  |

Converts a model into a bild polygon representation.

Parameters

  &filename | bild format file name.
  *model | model structure.
  color_type | flag to color polygons.

Returns
  int 0, <0 on error.

      Color scheme types:
          1   spectrum/rainbow.
          2   fom.

Definition at line 523 of file rwmodel_bild.cpp.

## ◆ model_to_bild_view_polygons()

int model_to_bild_view_polygons | ( | Bstring & | filename,
|  | Bmodel * | model,
|  | int | order,
|  | int | color_type
| ) |  |

Converts a model into a representation with view polygons.

Parameters

  &filename | bild format file name.
  *model | model structure.
  order | polygon order.
  color_type | flag to color components.

Returns
  int 0, <0 on error.

      A sphere is drawn for every component with a cylinder indicating its view.

Definition at line 444 of file rwmodel_bild.cpp.

## ◆ model_to_bild_view_sphere()

int model_to_bild_view_sphere | ( | Bstring & | filename,
|  | Bmodel * | model,
|  | int | color_type
| ) |  |

Converts a model into a representation with views.

Parameters

  &filename | bild format file name.
  *model | model structure.
  color_type | flag to color components.

Returns
  int 0, <0 on error.

      A sphere is drawn for every component with a cylinder indicating its view.

Definition at line 362 of file rwmodel_bild.cpp.

## ◆ read_model_bild()

Bmodel* read_model_bild | ( | Bstring * | file_list | ) |

Reads Chimera BILD model parameters.

Parameters

  *file_list | list of model parameter file names.

Returns
  Bmodel* model parameters.

Definition at line 43 of file rwmodel_bild.cpp.

## ◆ write_model_bild()

int write_model_bild | ( | Bstring & | filename,
|  | Bmodel * | model
| ) |  |

Writes Chimera BILD model parameters.

Parameters

  &filename | model parameter file name.
  *model | model parameters.

Returns
  int models written.

Definition at line 232 of file rwmodel_bild.cpp.

## Variable Documentation

## ◆ verbose

int verbose