EMAN::TetrahedralSym Class Reference

An encapsulation of tetrahedral symmetry Doctor Phil has this to say about tetrahedral symmetry: " Each Platonic Solid has 2E symmetry elements. More...

#include <symmetry.h>

Inheritance diagram for EMAN::TetrahedralSym:

Inheritance graph
[legend]
Collaboration diagram for EMAN::TetrahedralSym:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TetrahedralSym ()
 Constructor calls PlatonicSym::init.
virtual ~TetrahedralSym ()
virtual string get_name () const
 Return TetrahedralSym::NAME.
virtual string get_desc () const
 Get a description.
virtual int get_max_csym () const
 Gets the maximum symmetry of this object.
virtual Transform get_sym (const int n) const
 This function provides access to the unique rotational symmetries of a tetrahedron.
virtual bool is_in_asym_unit (const float &altitude, const float &azimuth, const bool inc_mirror) const
 In tetrahedral symmetry special consideration must be taken when generating orientations in the asymmetric unit.
virtual int get_nsym () const
 Gets the total number of unique roational symmetry operations associated with this symmetry For tetrahedral symmetry symmetry, this is 12.
virtual float get_az_alignment_offset () const
 Get the azimuth alignment offset required to ensure that orientations align correctly with symmetric axes of the tetrahedron.
virtual vector< Vec3fget_asym_unit_points (bool inc_mirror=false) const
virtual bool is_tet_sym () const
 A function that is used to determine if this is the tetrahedral symmetry object.

Static Public Member Functions

static Symmetry3DNEW ()
 Factory support function NEW.

Static Public Attributes

static const string NAME = "tet"
 The name of this class - used to access it from factories etc. Should be "tet".

Private Member Functions

 TetrahedralSym (const TetrahedralSym &)
 Disallow copy construction.
TetrahedralSymoperator= (const TetrahedralSym &)
 Disallow assignment.

Detailed Description

An encapsulation of tetrahedral symmetry Doctor Phil has this to say about tetrahedral symmetry: " Each Platonic Solid has 2E symmetry elements.

The tetrahedron has n=m=3; F=4, E=6=nF/2, V=4=nF/m. It is composed of four triangles."

Author:
David Woolford (based on previous work by Phil Baldwin and Steve Ludtke)
Date:
Feb 2008

Definition at line 678 of file symmetry.h.


Constructor & Destructor Documentation

EMAN::TetrahedralSym::TetrahedralSym (  )  [inline]

Constructor calls PlatonicSym::init.

Definition at line 683 of file symmetry.h.

References EMAN::PlatonicSym::init().

Referenced by NEW().

00683 {init();}

virtual EMAN::TetrahedralSym::~TetrahedralSym (  )  [inline, virtual]

Definition at line 684 of file symmetry.h.

00684 {}

EMAN::TetrahedralSym::TetrahedralSym ( const TetrahedralSym  )  [private]

Disallow copy construction.


Member Function Documentation

vector< Vec3f > TetrahedralSym::get_asym_unit_points ( bool  inc_mirror = false  )  const [virtual]

Parameters:
inc_mirror whether or not to include the mirror portion of the asymmetric unit
Returns:
a cyclic set of points which can be connected using great arcs on the unit sphere to demarcate the asymmetric unit. The last should may be connected to the first.

Reimplemented from EMAN::PlatonicSym.

Definition at line 1887 of file symmetry.cpp.

References b, get_az_alignment_offset(), EMAN::Vec3< Type >::normalize(), EMAN::PlatonicSym::platonic_params, and t.

01888 {
01889         vector<Vec3f> ret;
01890 
01891         Vec3f b = Vec3f(0,0,1);
01892         ret.push_back(b);
01893         float theta_c_on_two = (float)platonic_params["theta_c_on_two"]; // already in radians
01894         float theta_c = 2*theta_c_on_two;
01895 
01896         Vec3f c_on_two = Vec3f(0,-sin(theta_c_on_two),cos(theta_c_on_two));
01897         Vec3f c = Vec3f(0,-sin(theta_c),cos(theta_c));
01898         ret.push_back(c_on_two);
01899         float cap_sig = platonic_params["az_max"];
01900         if ( inc_mirror ) {
01901                 Vec3f a = Vec3f(sin(theta_c)*sin(cap_sig),-sin(theta_c)*cos(cap_sig),cos(theta_c));
01902 
01903                 Vec3f f = a+b+c;
01904                 f.normalize();
01905 
01906                 ret.push_back(f);
01907         }
01908 
01909         Vec3f a_on_two = Vec3f(sin(theta_c_on_two)*sin(cap_sig),-sin(theta_c_on_two)*cos(cap_sig),cos(theta_c_on_two));
01910         ret.push_back(a_on_two);
01911 
01912 
01913         if ( get_az_alignment_offset() != 0 ) {
01914                 Dict d("type","eman");
01915                 d["az"] = get_az_alignment_offset();
01916                 d["phi"] = 0.0f;
01917                 d["alt"] = 0.0f;
01918                 Transform t(d);
01919                 for (vector<Vec3f>::iterator it = ret.begin(); it != ret.end(); ++it )
01920                 {
01921                         *it = (*it)*t;
01922                 }
01923         }
01924 
01925         return ret;
01926 }

float TetrahedralSym::get_az_alignment_offset (  )  const [virtual]

Get the azimuth alignment offset required to ensure that orientations align correctly with symmetric axes of the tetrahedron.

This offset is directly related to the way the symmetric operations are generated by get_sym. All orientations generated as a result of using the delimiters supplied by this class should by offset by this azimuth to ensure proper alignment with tetrahedral objects in EMAN2

Reimplemented from EMAN::Symmetry3D.

Definition at line 1824 of file symmetry.cpp.

Referenced by get_asym_unit_points().

01824 { return  0.0; }

virtual string EMAN::TetrahedralSym::get_desc (  )  const [inline, virtual]

Get a description.

Returns:
a clear desciption of this class

Implements EMAN::FactoryBase.

Definition at line 703 of file symmetry.h.

00703 { return "Tetrahedral symmetry support"; }

virtual int EMAN::TetrahedralSym::get_max_csym (  )  const [inline, virtual]

Gets the maximum symmetry of this object.

This is used by OrientationGenerators, and is probably not something a general user would utilize.

Returns:
for tetrahedral symmetry, this number is 3

Implements EMAN::Symmetry3D.

Definition at line 709 of file symmetry.h.

00709 { return 3; }

virtual string EMAN::TetrahedralSym::get_name (  )  const [inline, virtual]

Return TetrahedralSym::NAME.

Returns:
the unique name of this class

Implements EMAN::FactoryBase.

Definition at line 697 of file symmetry.h.

References NAME.

00697 { return NAME; }

virtual int EMAN::TetrahedralSym::get_nsym (  )  const [inline, virtual]

Gets the total number of unique roational symmetry operations associated with this symmetry For tetrahedral symmetry symmetry, this is 12.

Returns:
12

Implements EMAN::Symmetry3D.

Definition at line 739 of file symmetry.h.

00739 { return 12; };

Transform TetrahedralSym::get_sym ( const int  n  )  const [virtual]

This function provides access to the unique rotational symmetries of a tetrahedron.

In this implementation, the tetrahedral symmetry group has a face along the z-axis. In all, there are 12 (accessed by get_nysm) unique rotational symmetric operations for the tetrahedron. In the terminology defined Append A (titled Symmetry Elements) in the manuscript Baldwin and Penczek, 2007. The Transform Class in SPARX and EMAN2. JSB 157(250-261), Doctor Phil has this to say: "B^3=A^3=1; BABA=1; implies A^2=BAB, ABA=B^2 , AB^2A = B^2AB^2 and 12 words with at most a single A 1 B BB A BA AB BBA BAB ABB BBAB BABB BBABB at most one A is necessary"

Parameters:
n the symmetric operation number
Returns:
a transform containing the correct rotational symmetry operation.

Implements EMAN::Symmetry3D.

Definition at line 1859 of file symmetry.cpp.

01860 {
01861         // These rotations courtesy of Phil Baldwin
01862          // It has n=m=3; F=4, E=6=nF/2, V=4=nF/m
01863         static double lvl0=0;         // There is a face along z
01864         static double lvl1=109.4712;  //  that is acos(-1/3)  // There  are 3 faces at this angle
01865 
01866         static double TET[36] = {// This is with the face along z
01867                 0,lvl0,0,   0,lvl0,120,    0,lvl0,240,
01868   0,lvl1,60,   0,lvl1,180,    0,lvl1,300,
01869   120,lvl1,60, 120,lvl1,180,  120,lvl1,300,
01870   240,lvl1,60, 240,lvl1,180,  240,lvl1,300
01871         };
01872         //
01873         int idx = n % 12;
01874 //      Transform3D ret;
01875 //      ret.set_rotation((float)TET[idx * 3 ],(float)TET[idx * 3 + 1], (float)TET[idx * 3 + 2] );
01876 //      return ret;
01877 
01878         Dict d("type","eman");
01879         d["az"] = (float)TET[idx * 3 ];
01880         d["alt"] = (float)TET[idx * 3 + 1];
01881         d["phi"] = (float)TET[idx * 3 + 2];
01882         return Transform(d);
01883 
01884 }

bool TetrahedralSym::is_in_asym_unit ( const float &  altitude,
const float &  azimuth,
const bool  inc_mirror 
) const [virtual]

In tetrahedral symmetry special consideration must be taken when generating orientations in the asymmetric unit.

This function is a specialization of the functionality in PlatonicSym::is_in_asym_unit

Parameters:
altitude the EMAN style altitude of the 3D orientation in degrees
azimuth the EMAN style azimuth of the 3D orientation in degrees
inc_mirror whether or not to include orientations if they are in the mirror portion of the asymmetric unit
Returns:
true or false, depending on whether or not the orientation is within the asymmetric unit

Reimplemented from EMAN::PlatonicSym.

Definition at line 1826 of file symmetry.cpp.

References EMAN::EMConsts::deg2rad, EMAN::PlatonicSym::get_delimiters(), EMAN::PlatonicSym::platonic_alt_lower_bound(), and EMAN::PlatonicSym::platonic_params.

01827 {
01828         Dict d = get_delimiters(inc_mirror);
01829         float alt_max = d["alt_max"];
01830         float az_max = d["az_max"];
01831 
01832         if ( altitude >= 0 &&  altitude <= alt_max && azimuth <= az_max && azimuth >= 0) {
01833                 // convert azimuth to radians
01834                 float tmpaz = (float)(EMConsts::deg2rad * azimuth);
01835 
01836                 float cap_sig = platonic_params["az_max"];
01837                 float alt_max = platonic_params["alt_max"];
01838                 if ( tmpaz > ( cap_sig/2.0f ) )tmpaz = cap_sig - tmpaz;
01839 
01840                 float lower_alt_bound = platonic_alt_lower_bound(tmpaz, alt_max );
01841 
01842                 // convert altitude to radians
01843                 float tmpalt = (float)(EMConsts::deg2rad * altitude);
01844                 if ( lower_alt_bound > tmpalt ) {
01845                         if ( !inc_mirror ) {
01846                                 float upper_alt_bound = platonic_alt_lower_bound( tmpaz, alt_max/2.0f);
01847                                 // you could change the "<" to a ">" here to get the other mirror part of the asym unit
01848                                 if ( upper_alt_bound < tmpalt ) return false;
01849                                 else return true;
01850                         }
01851                         else return true;
01852                 }
01853                 return false;
01854         }
01855         else return false;
01856 }

virtual bool EMAN::TetrahedralSym::is_tet_sym (  )  const [inline, virtual]

A function that is used to determine if this is the tetrahedral symmetry object.

Returns:
true - indicating that this is not a tetrahedral symmetry object

Reimplemented from EMAN::Symmetry3D.

Definition at line 761 of file symmetry.h.

00761 { return true; }

static Symmetry3D* EMAN::TetrahedralSym::NEW (  )  [inline, static]

Factory support function NEW.

Returns:
a newly instantiated class of this type

Definition at line 689 of file symmetry.h.

References TetrahedralSym().

00690                 {
00691                         return new TetrahedralSym();
00692                 }

TetrahedralSym& EMAN::TetrahedralSym::operator= ( const TetrahedralSym  )  [private]

Disallow assignment.


Member Data Documentation

const string TetrahedralSym::NAME = "tet" [static]

The name of this class - used to access it from factories etc. Should be "tet".

Definition at line 750 of file symmetry.h.

Referenced by get_name().


The documentation for this class was generated from the following files:
Generated on Tue Jul 12 13:50:21 2011 for EMAN2 by  doxygen 1.4.7