#include <symmetry.h>
Inheritance diagram for EMAN::TetrahedralSym:
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< Vec3f > | get_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 Symmetry3D * | NEW () |
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. | |
TetrahedralSym & | operator= (const TetrahedralSym &) |
Disallow assignment. |
The tetrahedron has n=m=3; F=4, E=6=nF/2, V=4=nF/m. It is composed of four triangles."
Definition at line 677 of file symmetry.h.
|
Constructor calls PlatonicSym::init.
Definition at line 682 of file symmetry.h. References EMAN::PlatonicSym::init(). Referenced by NEW(). 00682 {init();}
|
|
Definition at line 683 of file symmetry.h.
|
|
Disallow copy construction.
|
|
Reimplemented from EMAN::PlatonicSym. Definition at line 1858 of file symmetry.cpp. References b, get_az_alignment_offset(), EMAN::Vec3< Type >::normalize(), EMAN::PlatonicSym::platonic_params, and t. 01859 { 01860 vector<Vec3f> ret; 01861 01862 Vec3f b = Vec3f(0,0,1); 01863 ret.push_back(b); 01864 float theta_c_on_two = (float)platonic_params["theta_c_on_two"]; // already in radians 01865 float theta_c = 2*theta_c_on_two; 01866 01867 Vec3f c_on_two = Vec3f(0,-sin(theta_c_on_two),cos(theta_c_on_two)); 01868 Vec3f c = Vec3f(0,-sin(theta_c),cos(theta_c)); 01869 ret.push_back(c_on_two); 01870 float cap_sig = platonic_params["az_max"]; 01871 if ( inc_mirror ) { 01872 Vec3f a = Vec3f(sin(theta_c)*sin(cap_sig),-sin(theta_c)*cos(cap_sig),cos(theta_c)); 01873 01874 Vec3f f = a+b+c; 01875 f.normalize(); 01876 01877 ret.push_back(f); 01878 } 01879 01880 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)); 01881 ret.push_back(a_on_two); 01882 01883 01884 if ( get_az_alignment_offset() != 0 ) { 01885 Dict d("type","eman"); 01886 d["az"] = get_az_alignment_offset(); 01887 d["phi"] = 0.0f; 01888 d["alt"] = 0.0f; 01889 Transform t(d); 01890 for (vector<Vec3f>::iterator it = ret.begin(); it != ret.end(); ++it ) 01891 { 01892 *it = (*it)*t; 01893 } 01894 } 01895 01896 return ret; 01897 }
|
|
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 1795 of file symmetry.cpp. Referenced by get_asym_unit_points().
|
|
Get a description.
Implements EMAN::FactoryBase. Definition at line 702 of file symmetry.h.
|
|
Gets the maximum symmetry of this object. This is used by OrientationGenerators, and is probably not something a general user would utilize.
Implements EMAN::Symmetry3D. Definition at line 708 of file symmetry.h.
|
|
Return TetrahedralSym::NAME.
Implements EMAN::FactoryBase. Definition at line 696 of file symmetry.h. References NAME. 00696 { return NAME; }
|
|
Gets the total number of unique roational symmetry operations associated with this symmetry For tetrahedral symmetry symmetry, this is 12.
Implements EMAN::Symmetry3D. Definition at line 738 of file symmetry.h.
|
|
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"
Implements EMAN::Symmetry3D. Definition at line 1830 of file symmetry.cpp. 01831 { 01832 // These rotations courtesy of Phil Baldwin 01833 // It has n=m=3; F=4, E=6=nF/2, V=4=nF/m 01834 static double lvl0=0; // There is a face along z 01835 static double lvl1=109.4712; // that is acos(-1/3) // There are 3 faces at this angle 01836 01837 static double TET[36] = {// This is with the face along z 01838 0,lvl0,0, 0,lvl0,120, 0,lvl0,240, 01839 0,lvl1,60, 0,lvl1,180, 0,lvl1,300, 01840 120,lvl1,60, 120,lvl1,180, 120,lvl1,300, 01841 240,lvl1,60, 240,lvl1,180, 240,lvl1,300 01842 }; 01843 // 01844 int idx = n % 12; 01845 // Transform3D ret; 01846 // ret.set_rotation((float)TET[idx * 3 ],(float)TET[idx * 3 + 1], (float)TET[idx * 3 + 2] ); 01847 // return ret; 01848 01849 Dict d("type","eman"); 01850 d["az"] = (float)TET[idx * 3 ]; 01851 d["alt"] = (float)TET[idx * 3 + 1]; 01852 d["phi"] = (float)TET[idx * 3 + 2]; 01853 return Transform(d); 01854 01855 }
|
|
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
Reimplemented from EMAN::PlatonicSym. Definition at line 1797 of file symmetry.cpp. References EMAN::EMConsts::deg2rad, EMAN::PlatonicSym::get_delimiters(), EMAN::PlatonicSym::platonic_alt_lower_bound(), and EMAN::PlatonicSym::platonic_params. 01798 { 01799 Dict d = get_delimiters(inc_mirror); 01800 float alt_max = d["alt_max"]; 01801 float az_max = d["az_max"]; 01802 01803 if ( altitude >= 0 && altitude <= alt_max && azimuth <= az_max && azimuth >= 0) { 01804 // convert azimuth to radians 01805 float tmpaz = (float)(EMConsts::deg2rad * azimuth); 01806 01807 float cap_sig = platonic_params["az_max"]; 01808 float alt_max = platonic_params["alt_max"]; 01809 if ( tmpaz > ( cap_sig/2.0f ) )tmpaz = cap_sig - tmpaz; 01810 01811 float lower_alt_bound = platonic_alt_lower_bound(tmpaz, alt_max ); 01812 01813 // convert altitude to radians 01814 float tmpalt = (float)(EMConsts::deg2rad * altitude); 01815 if ( lower_alt_bound > tmpalt ) { 01816 if ( !inc_mirror ) { 01817 float upper_alt_bound = platonic_alt_lower_bound( tmpaz, alt_max/2.0f); 01818 // you could change the "<" to a ">" here to get the other mirror part of the asym unit 01819 if ( upper_alt_bound < tmpalt ) return false; 01820 else return true; 01821 } 01822 else return true; 01823 } 01824 return false; 01825 } 01826 else return false; 01827 }
|
|
A function that is used to determine if this is the tetrahedral symmetry object.
Reimplemented from EMAN::Symmetry3D. Definition at line 760 of file symmetry.h.
|
|
Factory support function NEW.
Definition at line 688 of file symmetry.h. References TetrahedralSym(). 00689 { 00690 return new TetrahedralSym(); 00691 }
|
|
Disallow assignment.
|
|
The name of this class - used to access it from factories etc. Should be "tet".
Definition at line 749 of file symmetry.h. Referenced by get_name(). |