Bsoft 2.1.4
Bernard's software package
symmetry.h File Reference

Header file for general symmetry functions. More...

#include "View.h"
#include "Bstring.h"

Classes

class  Bsymop
 
struct  Bsymmetry
 

Macros

#define _Bsymmetry_
 

Functions

string symmetry_helical_label (double helix_rise, double helix_angle, int dyad_axis, int cyclic, double seam_shift)
 Returns the label for helical symmetry. More...
 
View view_symmetry_reference (Bsymmetry &sym)
 Returns an asymmetric unit reference point. More...
 
Matrix3 symmetry_rotate_to_axis (Bsymmetry &sym, long axis, long axis_flag)
 Rotation matrix to orient a symmetry axis on the z axis. More...
 
vector< Vector3< double > > symmetry_get_axes (Bsymmetry &sym)
 Get all symmetry axes. More...
 
Viewsymmetry_get_all_views (Bsymmetry &sym, View asu_view)
 Get all symmetry-related views of one given view. More...
 
Viewsymmetry_get_all_views (Bsymmetry &sym, View *views)
 
vector< Matrix3symmetry_get_all_matrices (Bsymmetry &sym)
 Get all symmetry-related views of one given view. More...
 
Viewasymmetric_unit_views (Bsymmetry &sym, double theta_step, double phi_step, int flag)
 Initializes a well-distributed set of views in an asymmetric unit. More...
 
Viewasymmetric_unit_views (Bsymmetry &sym, double theta_step, double phi_step, double alpha_step, int flag)
 
Viewside_views (Bsymmetry &sym, double side_ang, double theta_step, double phi_step)
 Initializes a set of views around the z-axis for helical projection. More...
 
Viewside_views (Bsymmetry &sym, double side_ang, double theta_step, double phi_step, double alpha_step)
 
int change_views_to_asymmetric_unit (Bsymmetry &sym, View *view)
 Change the views to those in the asymmetric unit. More...
 
View find_asymmetric_unit_view (Bsymmetry &sym, View theview)
 Finds the corresponding view in the asymmetric unit. More...
 
View find_closest_symmetric_view (Bsymmetry &sym, View view_ref, View view)
 Finds the closest symmetric match between two views. More...
 
Viewreference_asymmetric_unit_views (Bsymmetry &sym)
 Returns a reference view for each asymmetric unit. More...
 
View random_symmetric_view (View &asu_view, Bsymmetry &sym)
 Returns a randomly picked symmetry view. More...
 
int test_asymmetric_unit_view (View theview, Bsymmetry &sym)
 Returns an asymmetric unit index number. More...
 
int sym_show_matrices (Bsymmetry &sym)
 Show symmetry matrices. More...
 
int sym_show_operational_matrices (Bsymmetry &sym)
 Show symmetry matrices associated with each symmetry operator. More...
 
int sym_show_pdb_matrices (Bsymmetry &sym)
 Show PDB format symmetry matrices associated with each symmetry operator. More...
 

Detailed Description

Header file for general symmetry functions.

Author
Bernard Heymann
Date
Created: 20010420
Modified: 20220104

Macro Definition Documentation

◆ _Bsymmetry_

#define _Bsymmetry_

Function Documentation

◆ asymmetric_unit_views() [1/2]

View * asymmetric_unit_views ( Bsymmetry sym,
double  theta_step,
double  phi_step,
double  alpha_step,
int  flag 
)

◆ asymmetric_unit_views() [2/2]

View * asymmetric_unit_views ( Bsymmetry sym,
double  theta_step,
double  phi_step,
int  flag 
)

Initializes a well-distributed set of views in an asymmetric unit.

Parameters
&symsymmetry structure.
theta_stepangular step size from primary symmetry axis (radians).
phi_stepangular step size around primary symmetry axis (radians).
flagflag: 0=half, 1=full, 2=no in-plane.
Returns
View* a linked list of views.
A set of views is calculated with tesselation within each asymmetric
unit such that the views are well-distributed.
Flag bits:
    1: both halves of the asymmetric unit are covered.
    2: no in-plane rotations are applied.

◆ change_views_to_asymmetric_unit()

int change_views_to_asymmetric_unit ( Bsymmetry sym,
View view 
)

Change the views to those in the asymmetric unit.

Parameters
&symsymmetry structure.
*viewlist of views (replaced).
Returns
int 0.
The view is replaced with the one in the standard asymmetric unit.

◆ find_asymmetric_unit_view()

View find_asymmetric_unit_view ( Bsymmetry sym,
View  theview 
)

Finds the corresponding view in the asymmetric unit.

Parameters
&symsymmetry structure.
theviewview.
Returns
View the asymmetric unit view.
The asymmetric unit view is found and the the new view with the 
link from the old view is returned.

◆ find_closest_symmetric_view()

View find_closest_symmetric_view ( Bsymmetry sym,
View  view_ref,
View  view 
)

Finds the closest symmetric match between two views.

Parameters
&symsymmetry structure.
view_refreference view.
viewtest view.
Returns
View matched symmetric version of test view.
A list of symmetry-related views of the test view is searched
for the closest to the reference view.
The matched view is returned.

◆ random_symmetric_view()

View random_symmetric_view ( View asu_view,
Bsymmetry sym 
)

Returns a randomly picked symmetry view.

Parameters
&asu_viewasymmetric unit view.
&symsymmetry structure.
Returns
View picked view.

◆ reference_asymmetric_unit_views()

View * reference_asymmetric_unit_views ( Bsymmetry sym)

Returns a reference view for each asymmetric unit.

Parameters
&symsymmetry structure.
Returns
View* reference views.

◆ side_views() [1/2]

View * side_views ( Bsymmetry sym,
double  side_ang,
double  theta_step,
double  phi_step 
)

Initializes a set of views around the z-axis for helical projection.

Parameters
&symsymmetry structure.
side_angstarting angle (radians).
theta_stepangular step size perpendicular to equator (radians).
phi_stepangular step size around equator (radians).
Returns
View* a set of 4-value views.
A set of views is calculated corresponding to views around the z-axis
including some tilting to account for oblique views.

◆ side_views() [2/2]

View * side_views ( Bsymmetry sym,
double  side_ang,
double  theta_step,
double  phi_step,
double  alpha_step 
)

◆ sym_show_matrices()

int sym_show_matrices ( Bsymmetry sym)

Show symmetry matrices.

Parameters
&symsymmetry structure.
Returns
int number of symmetry matrices.

◆ sym_show_operational_matrices()

int sym_show_operational_matrices ( Bsymmetry sym)

Show symmetry matrices associated with each symmetry operator.

Parameters
&symsymmetry structure.
Returns
int number of symmetry matrices.

◆ sym_show_pdb_matrices()

int sym_show_pdb_matrices ( Bsymmetry sym)

Show PDB format symmetry matrices associated with each symmetry operator.

Parameters
&symsymmetry structure.
Returns
int number of symmetry matrices.

◆ symmetry_get_all_matrices()

vector< Matrix3 > symmetry_get_all_matrices ( Bsymmetry sym)

Get all symmetry-related views of one given view.

Parameters
&symsymmetry structure.
Returns
vector<Matrix3> array of matrices.
The number of views generated for a point group symmetry is
calculated as the product of the order fields in the symmetry
structure.

◆ symmetry_get_all_views() [1/2]

View * symmetry_get_all_views ( Bsymmetry sym,
View views 
)

◆ symmetry_get_all_views() [2/2]

View * symmetry_get_all_views ( Bsymmetry sym,
View  asu_view 
)

Get all symmetry-related views of one given view.

Parameters
&symsymmetry structure.
asu_viewasymmetric unit vector and rotation angle.
Returns
View* linked list of views.
The number of views generated for a point group symmetry is
calculated as the product of the order fields in the symmetry
structure.

◆ symmetry_get_axes()

vector< Vector3< double > > symmetry_get_axes ( Bsymmetry sym)

Get all symmetry axes.

Parameters
&symsymmetry structure.
Returns
vector<Vector3<double>> array of axes.

◆ symmetry_helical_label()

string symmetry_helical_label ( double  helix_rise,
double  helix_angle,
int  dyad_axis,
int  cyclic,
double  seam_shift 
)

Returns the label for helical symmetry.

Parameters
helix_risehelical rise (angstroms).
helix_anglehelical rotation angle (radians).
dyad_axispresence of dyad axis (1/2).
cycliccyclic symmetry.
seam_shiftfractional shift for seamed helices.
Returns
string label.
Thge symmetry order is defined as the product of all the individual
orders of the symmetry operations, or alternatively, the number of views.

◆ symmetry_rotate_to_axis()

Matrix3 symmetry_rotate_to_axis ( Bsymmetry sym,
long  axis,
long  axis_flag 
)

Rotation matrix to orient a symmetry axis on the z axis.

Parameters
&symsymmetry structure.
axisdesired symmetry axis order.
axis_flagview modifier.
Returns
Matrix3 new rotation matrix.

◆ test_asymmetric_unit_view()

int test_asymmetric_unit_view ( View  theview,
Bsymmetry sym 
)

Returns an asymmetric unit index number.

Parameters
theviewview to test.
&symsymmetry structure.
Returns
int view number.

◆ view_symmetry_reference()

View view_symmetry_reference ( Bsymmetry sym)

Returns an asymmetric unit reference point.

Parameters
&symsymmetry structure.
Returns
View reference view.