![]() |
Bsoft 2.1.4
Bernard's software package
|
Library routines used for atomic coordinate transformations. More...
#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. More... | |
int | mol_coor_shift (Bmolecule *mol, Vector3< double > shift) |
Translates a molecule. More... | |
int | molgroup_coor_rotate (Bmolgroup *molgroup, Transform t) |
Rotates and translates a molecule group. More... | |
int | mol_coor_rotate (Bmolecule *mol, Transform t) |
Rotates and translates a molecule. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
int | molgroup_coor_transform (Bmolgroup *molgroup, Transform t) |
Rotates and translates a molecule group. More... | |
int | mol_coor_transform (Bmolecule *mol, Transform t) |
Rotates and translates a molecule. More... | |
int | molgroup_coor_invert (Bmolgroup *molgroup, Vector3< double > point) |
Inverts the coordinates of a molecule through a given point. More... | |
int | molgroup_resolve_pbc (Bmolgroup *molgroup) |
Recombines coordinates split across periodic box boundaries. More... | |
int | molgroup_pack_in_periodic_box (Bmolgroup *molgroup) |
Distributes coordinates across periodic box boundaries. More... | |
int | molgroup_coor_shift_PBC (Bmolgroup *molgroup, Vector3< double > shift) |
Translates a molecule within a periodic box. More... | |
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. More... | |
int | molgroup_shift_to_center_of_mass (Bmolgroup *molgroup) |
Translates a set of coordinates to the center of mass. More... | |
int | mol_shift_to_center_of_mass (Bmolecule *mol) |
Translates a set of coordinates to the center of mass. More... | |
int | molgroup_place_at_coordinates (Bmolgroup *molgroup, Vector3< double > location) |
Translates a set of coordinates to a defined center-of-mass. More... | |
Variables | |
int | verbose |
Library routines used for atomic coordinate transformations.
Rotates and translates a molecule.
The new coordinates are: coord_new = (coord - origin)*rot_mat + origin + shift.
*mol | molecule structure. |
t | transform structure. |
Translates a molecule.
*mol | molecule structure. |
shift | three-valued translation vector. |
Rotates and translates a molecule.
The new coordinates are: coord_new = (coord - origin)*rot_mat + origin + shift.
*mol | molecule structure. |
t | transform structure. |
Bmolecule * mol_rotate | ( | Bmolecule * | mol, |
Matrix3 | mat, | ||
Vector3< double > | origin, | ||
Vector3< double > | trans | ||
) |
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.
*mol | molecule structure (unmodified). |
view | view to rotate from. |
origin | origin of rotation. |
trans | 3-valued translation vector. |
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.
*mol | molecule structure (unmodified). |
view | view to rotate to. |
origin | origin of rotation. |
trans | 3-valued translation vector. |
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.
*mol | molecule structure. |
Inverts the coordinates of a molecule through a given point.
*molgroup | molecule group structure. |
point | 3-valued inversion point. |
Rotates and translates a molecule group.
The new coordinates are: coord_new = (coord - origin)*rot_mat + origin + shift.
*molgroup | molecule group structure. |
t | transform structure. |
Translates a molecule group.
*molgroup | molecule group structure. |
shift | three-valued translation vector. |
Translates a molecule within a periodic box.
The periodic box is defined in the molecule group structure.
*molgroup | molecule group structure. |
shift | three-valued translation vector. |
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.
*molgroup | molecule group structure. |
origin | 3-valued origin for rotation. |
mat | 3x3 rotation matrix. |
shift | 3-valued translation vector. |
Rotates and translates a molecule group.
The new coordinates are: coord_new = (coord - origin)*rot_mat + origin + shift.
*molgroup | molecule group structure. |
t | transform structure. |
int molgroup_pack_in_periodic_box | ( | Bmolgroup * | molgroup | ) |
Distributes coordinates across periodic box boundaries.
*molgroup | molecule group structure. |
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.
*molgroup | molecule group structure. |
location | desired center-of-mass coordinates. |
int molgroup_resolve_pbc | ( | Bmolgroup * | molgroup | ) |
Recombines coordinates split across periodic box boundaries.
*molgroup | molecule group structure. |
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.
Bmolgroup * molgroup_rotate | ( | Bmolgroup * | molgroup, |
Matrix3 | mat, | ||
Vector3< double > | origin, | ||
Vector3< double > | trans | ||
) |
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.
*molgroup | molecule group structure (unmodified). |
view | view to rotate from. |
origin | origin of rotation. |
trans | 3-valued translation vector. |
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.
*molgroup | molecule group structure (unmodified). |
view | view to rotate to. |
origin | origin of rotation. |
trans | 3-valued translation vector. |
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.
*molgroup | molecule group structure. |
|
extern |