/Users/bernard/b20/bsoft/src/mol/mol_transform.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/mol/mol_transform.cpp - Library routines used for atomic coordinate transformations.

SYNOPSIS

#include 'rwmolecule.h'
#include 'mol_transform.h'
#include 'mol_util.h'
#include 'linked_list.h'
#include 'utilities.h'

  Functions
Bmolgroup * molgroup_rotate (Bmolgroup *molgroup, Matrix3 mat, Vector3< double > origin, Vector3< double > trans)
Bmolecule * mol_rotate (Bmolecule *mol, Matrix3 mat, Vector3< double > origin, Vector3< double > trans)
int molgroup_coor_shift (Bmolgroup *molgroup, Vector3< double > shift)
Translates a molecule group.
int mol_coor_shift (Bmolecule *mol, Vector3< double > shift)
Translates a molecule.
int molgroup_coor_rotate (Bmolgroup *molgroup, Transform t)
Rotates and translates a molecule group.
int mol_coor_rotate (Bmolecule *mol, Transform t)
Rotates and translates a molecule.
Bmolgroup * molgroup_rotate_to_view (Bmolgroup *molgroup, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule group to a specified view and translates it afterwards.
Bmolgroup * molgroup_rotate_from_view (Bmolgroup *molgroup, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule group from a specified view and translates it afterwards.
Bmolecule * mol_rotate_to_view (Bmolecule *mol, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule to a specified view and translates it afterwards.
Bmolecule * mol_rotate_from_view (Bmolecule *mol, View view, Vector3< double > origin, Vector3< double > trans)
Rotates a molecule from a specified view and translates it afterwards.
int molgroup_coor_transform (Bmolgroup *molgroup, Transform t)
Rotates and translates a molecule group.
int mol_coor_transform (Bmolecule *mol, Transform t)
Rotates and translates a molecule.
int molgroup_coor_invert (Bmolgroup *molgroup, Vector3< double > point)
Inverts the coordinates of a molecule through a given point.
int molgroup_resolve_pbc (Bmolgroup *molgroup)
Recombines coordinates split across periodic box boundaries.
int molgroup_pack_in_periodic_box (Bmolgroup *molgroup)
Distributes coordinates across periodic box boundaries.
int molgroup_coor_shift_PBC (Bmolgroup *molgroup, Vector3< double > shift)
Translates a molecule within a periodic box.
int molgroup_coor_shift_rotate_PBC (Bmolgroup *molgroup, Vector3< double > origin, Matrix3 mat, Vector3< double > shift)
Translates and rotates a molecule within a periodic box.
int molgroup_shift_to_center_of_mass (Bmolgroup *molgroup)
Translates a set of coordinates to the center of mass.
int mol_shift_to_center_of_mass (Bmolecule *mol)
Translates a set of coordinates to the center of mass.
int molgroup_place_at_coordinates (Bmolgroup *molgroup, Vector3< double > location)
Translates a set of coordinates to a defined center-of-mass.

  Variables
int verbose

Detailed Description

Library routines used for atomic coordinate transformations.

Author:
    Bernard Heymann

Date:
    Created: 19980214

    Modified: 20070614

Definition in file mol_transform.cpp.

Function Documentation

  int mol_coor_rotate (Bmolecule * mol, Transform t)

Rotates and translates a molecule.

The new coordinates are:
    coord_new = (coord - origin)*rot_mat + origin + shift.

Parameters:
    *mol molecule structure.
    t transform structure.

Returns:
    int 0.

Definition at line 131 of file mol_transform.cpp.

  int mol_coor_shift (Bmolecule * mol, Vector3< double > shift)

Translates a molecule.

Parameters:
    *mol molecule structure.
    shift three-valued translation vector.

Returns:
    int 0.

Definition at line 56 of file mol_transform.cpp.

  int mol_coor_transform (Bmolecule * mol, Transform t)

Rotates and translates a molecule.

The new coordinates are:
    coord_new = (coord - origin)*rot_mat + origin + shift.

Parameters:
    *mol molecule structure.
    t transform structure.

Returns:
    int 0.

Definition at line 378 of file mol_transform.cpp.

  Bmolecule * mol_rotate (Bmolecule * mol, Matrix3 mat, Vector3< double > origin, Vector3< double > trans)

Definition at line 294 of file mol_transform.cpp.

  Bmolecule* mol_rotate_from_view (Bmolecule * mol, View view, Vector3< double > origin, Vector3< double > trans)

Rotates a molecule from a specified view and translates it afterwards.

A new rotated and translated molecule is generated.

Parameters:
    *mol molecule structure (unmodified).
    view view to rotate from.
    origin origin of rotation.
    trans 3-valued translation vector.

Returns:
    Bmolecule* new molecule group.

Definition at line 281 of file mol_transform.cpp.

  Bmolecule* mol_rotate_to_view (Bmolecule * mol, View view, Vector3< double > origin, Vector3< double > trans)

Rotates a molecule to a specified view and translates it afterwards.

A new rotated and translated molecule is generated.

Parameters:
    *mol molecule structure (unmodified).
    view view to rotate to.
    origin origin of rotation.
    trans 3-valued translation vector.

Returns:
    Bmolecule* new molecule group.

Definition at line 258 of file mol_transform.cpp.

  int mol_shift_to_center_of_mass (Bmolecule * mol)

Translates a set of coordinates to the center of mass.

The function mol_center_of_mass is used to calculate the center of mass.
The function mol_coor_shift is used to shift the coordinates.

Parameters:
    *mol molecule structure.

Returns:
    int 0.

Definition at line 645 of file mol_transform.cpp.

  int molgroup_coor_invert (Bmolgroup * molgroup, Vector3< double > point)

Inverts the coordinates of a molecule through a given point.

Parameters:
    *molgroup molecule group structure.
    point 3-valued inversion point.

Returns:
    int 0.

Definition at line 419 of file mol_transform.cpp.

  int molgroup_coor_rotate (Bmolgroup * molgroup, Transform t)

Rotates and translates a molecule group.

The new coordinates are:
    coord_new = (coord - origin)*rot_mat + origin + shift.

Parameters:
    *molgroup molecule group structure.
    t transform structure.

Returns:
    int 0.

Definition at line 87 of file mol_transform.cpp.

  int molgroup_coor_shift (Bmolgroup * molgroup, Vector3< double > shift)

Translates a molecule group.

Parameters:
    *molgroup molecule group structure.
    shift three-valued translation vector.

Returns:
    int 0.

Definition at line 28 of file mol_transform.cpp.

  int molgroup_coor_shift_PBC (Bmolgroup * molgroup, Vector3< double > shift)

Translates a molecule within a periodic box.

The periodic box is defined in the molecule group structure.

Parameters:
    *molgroup molecule group structure.
    shift three-valued translation vector.

Returns:
    int 0.

Definition at line 544 of file mol_transform.cpp.

  int molgroup_coor_shift_rotate_PBC (Bmolgroup * molgroup, Vector3< double > origin, Matrix3 mat, Vector3< double > shift)

Translates and rotates a molecule within a periodic box.

The molecule group is first rotated around the origin and then shifted.
The periodic box is defined in the molecule group structure.

Parameters:
    *molgroup molecule group structure.
    origin 3-valued origin for rotation.
    mat 3x3 rotation matrix.
    shift 3-valued translation vector.

Returns:
    int 0.

Definition at line 581 of file mol_transform.cpp.

  int molgroup_coor_transform (Bmolgroup * molgroup, Transform t)

Rotates and translates a molecule group.

The new coordinates are:
    coord_new = (coord - origin)*rot_mat + origin + shift.

Parameters:
    *molgroup molecule group structure.
    t transform structure.

Returns:
    int 0.

Definition at line 332 of file mol_transform.cpp.

  int molgroup_pack_in_periodic_box (Bmolgroup * molgroup)

Distributes coordinates across periodic box boundaries.

Parameters:
    *molgroup molecule group structure.

Returns:
    int 0.

Definition at line 513 of file mol_transform.cpp.

  int molgroup_place_at_coordinates (Bmolgroup * molgroup, Vector3< double > location)

Translates a set of coordinates to a defined center-of-mass.

The function molgroup_center_of_mass is used to calculate the center of mass.
The function molgroup_coor_shift is used to shift the coordinates.

Parameters:
    *molgroup molecule group structure.
    location desired center-of-mass coordinates.

Returns:
    int 0.

Definition at line 666 of file mol_transform.cpp.

  int molgroup_resolve_pbc (Bmolgroup * molgroup)

Recombines coordinates split across periodic box boundaries.

Parameters:
    *molgroup molecule group structure.

Returns:
    int 0.

    The center of mass of each molecule is calculated to determine the
    shift needed to be applied to get the center of mass within the box.

Definition at line 450 of file mol_transform.cpp.

  Bmolgroup * molgroup_rotate (Bmolgroup * molgroup, Matrix3 mat, Vector3< double > origin, Vector3< double > trans)

Definition at line 216 of file mol_transform.cpp.

  Bmolgroup* molgroup_rotate_from_view (Bmolgroup * molgroup, View view, Vector3< double > origin, Vector3< double > trans)

Rotates a molecule group from a specified view and translates it afterwards.

A new rotated and translated molecule group is generated.

Parameters:
    *molgroup molecule group structure (unmodified).
    view view to rotate from.
    origin origin of rotation.
    trans 3-valued translation vector.

Returns:
    Bmolgroup* new molecule group.

Definition at line 203 of file mol_transform.cpp.

  Bmolgroup* molgroup_rotate_to_view (Bmolgroup * molgroup, View view, Vector3< double > origin, Vector3< double > trans)

Rotates a molecule group to a specified view and translates it afterwards.

A new rotated and translated molecule group is generated.

Parameters:
    *molgroup molecule group structure (unmodified).
    view view to rotate to.
    origin origin of rotation.
    trans 3-valued translation vector.

Returns:
    Bmolgroup* new molecule group.

Definition at line 180 of file mol_transform.cpp.

  int molgroup_shift_to_center_of_mass (Bmolgroup * molgroup)

Translates a set of coordinates to the center of mass.

The function molgroup_center_of_mass is used to calculate the center of mass.
The function molgroup_coor_shift is used to shift the coordinates.

Parameters:
    *molgroup molecule group structure.

Returns:
    int 0.

Definition at line 625 of file mol_transform.cpp.

Variable Documentation

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.