EMAN2
Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions
EMAN::Icosahedral2Sym Class Reference

An encapsulation of icosahedral symmetry 222. More...

#include <symmetry.h>

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

List of all members.

Public Member Functions

 Icosahedral2Sym ()
 Constructor calls PlatonicSym::init.
virtual ~Icosahedral2Sym ()
virtual string get_name () const
 Return IcosahedralSym::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 an icosahedron.
virtual int get_nsym () const
 Gets the total number of unique roational symmetry operations associated with this symmetry For icosahedral symmetry, this is 60.
virtual float get_az_alignment_offset () const
 Get the azimuth alignment offset required to ensure that orientations align correctly with symmetric axes of the icosahedron.

Static Public Member Functions

static Symmetry3DNEW ()
 Factory support function NEW.

Static Public Attributes

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

Private Member Functions

 Icosahedral2Sym (const Icosahedral2Sym &)
 Disallow copy construction.
Icosahedral2Symoperator= (const Icosahedral2Sym &)
 Disallow assignment.

Detailed Description

An encapsulation of icosahedral symmetry 222.

Definition at line 919 of file symmetry.h.


Constructor & Destructor Documentation

EMAN::Icosahedral2Sym::Icosahedral2Sym ( ) [inline]

Constructor calls PlatonicSym::init.

Definition at line 924 of file symmetry.h.

Referenced by NEW().

{ }
virtual EMAN::Icosahedral2Sym::~Icosahedral2Sym ( ) [inline, virtual]

Definition at line 925 of file symmetry.h.

References EMAN::PlatonicSym::init().

{ init(); }
EMAN::Icosahedral2Sym::Icosahedral2Sym ( const Icosahedral2Sym ) [private]

Disallow copy construction.


Member Function Documentation

float Icosahedral2Sym::get_az_alignment_offset ( ) const [virtual]

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

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 1835 of file symmetry.cpp.

{ return 234.0; } // This offset positions a 3 fold axis on the positive x axis (??? copied from IcosahedralSym)
virtual string EMAN::Icosahedral2Sym::get_desc ( ) const [inline, virtual]

Get a description.

Returns:
a clear desciption of this class

Implements EMAN::FactoryBase.

Definition at line 943 of file symmetry.h.

{ return "Icosahedral 2 symmetry support"; }
virtual int EMAN::Icosahedral2Sym::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 icosahedral symmetry, this number is 2

Implements EMAN::Symmetry3D.

Definition at line 949 of file symmetry.h.

{ return 2; }
virtual string EMAN::Icosahedral2Sym::get_name ( ) const [inline, virtual]

Return IcosahedralSym::NAME.

Returns:
the unique name of this class

Implements EMAN::FactoryBase.

Definition at line 938 of file symmetry.h.

References NAME.

{ return NAME; };
virtual int EMAN::Icosahedral2Sym::get_nsym ( ) const [inline, virtual]

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

Returns:
60

Implements EMAN::Symmetry3D.

Definition at line 963 of file symmetry.h.

{ return 60; };
Transform Icosahedral2Sym::get_sym ( const int  n) const [virtual]

This function provides access to the unique rotational symmetries of an icosahedron.

We have placed the icosahedral symmetry group with a face along the z-axis. In all, there are 60 (accessed by get_nysm) unique rotational symmetric operations for the icosahedron.

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

Implements EMAN::Symmetry3D.

Definition at line 1837 of file symmetry.cpp.

References matrix().

{
        static float matrices[60*9] = {
                1, 0, 0, 0, 1, 0, 0, 0, 1,
                0.30902, -0.80902, 0.5, 0.80902, 0.5, 0.30902, -0.5, 0.30902, 0.80902,
                -0.80902, -0.5, 0.30902, 0.5, -0.30902, 0.80902, -0.30902, 0.80902, 0.5,
                -0.80902, 0.5, -0.30902, -0.5, -0.30902, 0.80902, 0.30902, 0.80902, 0.5,
                0.30902, 0.80902, -0.5, -0.80902, 0.5, 0.30902, 0.5, 0.30902, 0.80902,
                -1, 0, 0, 0, -1, 0, 0, 0, 1,
                -0.30902, -0.80902, 0.5, 0.80902, -0.5, -0.30902, 0.5, 0.30902, 0.80902,
                0.30902, 0.80902, 0.5, -0.80902, 0.5, -0.30902, -0.5, -0.30902, 0.80902,
                -0.30902, 0.80902, 0.5, -0.80902, -0.5, 0.30902, 0.5, -0.30902, 0.80902,
                -0.5, 0.30902, 0.80902, 0.30902, -0.80902, 0.5, 0.80902, 0.5, 0.30902,
                0.5, -0.30902, 0.80902, -0.30902, 0.80902, 0.5, -0.80902, -0.5, 0.30902,
                0.80902, 0.5, 0.30902, -0.5, 0.30902, 0.80902, 0.30902, -0.80902, 0.5,
                0.80902, -0.5, -0.30902, 0.5, 0.30902, 0.80902, -0.30902, -0.80902, 0.5,
                0.5, 0.30902, -0.80902, 0.30902, 0.80902, 0.5, 0.80902, -0.5, 0.30902,
                -0.5, -0.30902, -0.80902, -0.30902, -0.80902, 0.5, -0.80902, 0.5, 0.30902,
                -0.30902, -0.80902, -0.5, 0.80902, -0.5, 0.30902, -0.5, -0.30902, 0.80902,
                0.30902, -0.80902, -0.5, 0.80902, 0.5, -0.30902, 0.5, -0.30902, 0.80902,
                -0.30902, 0.80902, -0.5, -0.80902, -0.5, -0.30902, -0.5, 0.30902, 0.80902,
                0.5, -0.30902, -0.80902, -0.30902, 0.80902, -0.5, 0.80902, 0.5, 0.30902,
                -0.5, 0.30902, -0.80902, 0.30902, -0.80902, -0.5, -0.80902, -0.5, 0.30902,
                -0.80902, -0.5, -0.30902, 0.5, -0.30902, -0.80902, 0.30902, -0.80902, 0.5,
                0.80902, 0.5, -0.30902, -0.5, 0.30902, -0.80902, -0.30902, 0.80902, 0.5,
                0.80902, -0.5, 0.30902, 0.5, 0.30902, -0.80902, 0.30902, 0.80902, 0.5,
                -0.80902, 0.5, 0.30902, -0.5, -0.30902, -0.80902, -0.30902, -0.80902, 0.5,
                -0.5, -0.30902, 0.80902, -0.30902, -0.80902, -0.5, 0.80902, -0.5, 0.30902,
                0.5, 0.30902, 0.80902, 0.30902, 0.80902, -0.5, -0.80902, 0.5, 0.30902,
                0, 0, 1, 1, 0, 0, 0, 1, 0,
                0, 1, 0, 0, 0, 1, 1, 0, 0,
                0, -1, 0, 0, 0, 1, -1, 0, 0,
                0, 0, -1, -1, 0, 0, 0, 1, 0,
                0, -1, 0, 0, 0, -1, 1, 0, 0,
                0, 1, 0, 0, 0, -1, -1, 0, 0,
                -0.80902, -0.5, 0.30902, -0.5, 0.30902, -0.80902, 0.30902, -0.80902, -0.5,
                0.80902, -0.5, -0.30902, -0.5, -0.30902, -0.80902, 0.30902, 0.80902, -0.5,
                0.5, 0.30902, -0.80902, -0.30902, -0.80902, -0.5, -0.80902, 0.5, -0.30902,
                -0.30902, -0.80902, -0.5, -0.80902, 0.5, -0.30902, 0.5, 0.30902, -0.80902,
                -0.80902, 0.5, -0.30902, 0.5, 0.30902, -0.80902, -0.30902, -0.80902, -0.5,
                -0.5, -0.30902, -0.80902, 0.30902, 0.80902, -0.5, 0.80902, -0.5, -0.30902,
                -0.5, 0.30902, -0.80902, -0.30902, 0.80902, 0.5, 0.80902, 0.5, -0.30902,
                0, 0, -1, 1, 0, 0, 0, -1, 0,
                -0.80902, 0.5, 0.30902, 0.5, 0.30902, 0.80902, 0.30902, 0.80902, -0.5,
                0.80902, 0.5, -0.30902, 0.5, -0.30902, 0.80902, 0.30902, -0.80902, -0.5,
                -0.30902, 0.80902, -0.5, 0.80902, 0.5, 0.30902, 0.5, -0.30902, -0.80902,
                0.5, -0.30902, -0.80902, 0.30902, -0.80902, 0.5, -0.80902, -0.5, -0.30902,
                -0.80902, -0.5, -0.30902, -0.5, 0.30902, 0.80902, -0.30902, 0.80902, -0.5,
                -0.30902, -0.80902, 0.5, -0.80902, 0.5, 0.30902, -0.5, -0.30902, -0.80902,
                -0.30902, 0.80902, 0.5, 0.80902, 0.5, -0.30902, -0.5, 0.30902, -0.80902,
                1, 0, 0, 0, -1, 0, 0, 0, -1,
                0.30902, 0.80902, -0.5, 0.80902, -0.5, -0.30902, -0.5, -0.30902, -0.80902,
                0.30902, -0.80902, -0.5, -0.80902, -0.5, 0.30902, -0.5, 0.30902, -0.80902,
                -1, 0, 0, 0, 1, 0, 0, 0, -1,
                0.80902, 0.5, 0.30902, 0.5, -0.30902, -0.80902, -0.30902, 0.80902, -0.5,
                0.30902, -0.80902, 0.5, -0.80902, -0.5, -0.30902, 0.5, -0.30902, -0.80902,
                -0.5, 0.30902, 0.80902, -0.30902, 0.80902, -0.5, -0.80902, -0.5, -0.30902,
                0, 0, 1, -1, 0, 0, 0, -1, 0,
                0.5, -0.30902, 0.80902, 0.30902, -0.80902, -0.5, 0.80902, 0.5, -0.30902,
                0.30902, 0.80902, 0.5, 0.80902, -0.5, 0.30902, 0.5, 0.30902, -0.80902,
                0.80902, -0.5, 0.30902, -0.5, -0.30902, 0.80902, -0.30902, -0.80902, -0.5,
                -0.5, -0.30902, 0.80902, 0.30902, 0.80902, 0.5, -0.80902, 0.5, -0.30902,
                0.5, 0.30902, 0.80902, -0.30902, -0.80902, 0.5, 0.80902, -0.5, -0.30902
        };

        int idx = n % 60;

        std::vector<float> matrix(12, 0);
        for (int r = 0; r < 3; ++r) {
                for (int c = 0; c < 3; ++c) {
                        matrix[r*4 + c] = matrices[idx*9 + r*3 + c];
                }
        }

        Transform t3d(matrix);
        return t3d;
}
static Symmetry3D* EMAN::Icosahedral2Sym::NEW ( ) [inline, static]

Factory support function NEW.

Returns:
a newly instantiated class of this type

Definition at line 930 of file symmetry.h.

References Icosahedral2Sym().

                {
                        return new Icosahedral2Sym();
                }
Icosahedral2Sym& EMAN::Icosahedral2Sym::operator= ( const Icosahedral2Sym ) [private]

Disallow assignment.


Member Data Documentation

const string Icosahedral2Sym::NAME = "icos2" [static]

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

Definition at line 974 of file symmetry.h.

Referenced by get_name().


The documentation for this class was generated from the following files: