#include <symmetry.h>
Inheritance diagram for EMAN::EvenOrientationGenerator:


Public Member Functions | |
| EvenOrientationGenerator () | |
| virtual | ~EvenOrientationGenerator () |
| virtual string | get_name () const |
| Return "even". | |
| virtual string | get_desc () const |
| Get a description. | |
| virtual TypeDict | get_param_types () const |
| Get a dictionary containing the permissable parameters of this class. | |
| virtual vector< Transform > | gen_orientations (const Symmetry3D *const sym) const |
| Generate even distributed orientations in the asymmetric unit of the symmetry. | |
Static Public Member Functions | |
| OrientationGenerator * | NEW () |
| Factory support function NEW. | |
Static Public Attributes | |
| const string | NAME = "even" |
| The name of this class - used to access it from factories etc. Should be "icos". | |
Private Member Functions | |
| EvenOrientationGenerator (const EvenOrientationGenerator &) | |
| Disallow copy construction. | |
| EvenOrientationGenerator & | operator= (const EvenOrientationGenerator &) |
| Disallow assignment. | |
| virtual int | get_orientations_tally (const Symmetry3D *const sym, const float &delta) const |
| This function returns how many orientations will be generated for a given delta (angular spacing) It does this by simulated gen_orientations. | |
Penczek, R.A. Grassucci and J. Frank, The ribosome at improved resolution: new techniques for merging and orientation refinement in 3D cryo-electron microscopy of biological particles, Ultramicroscopy 53 (1994).
This is a proportional approach very similar to the eman approach - the differences between these two approaches is mostly visible near altitude=0
Definition at line 1167 of file symmetry.h.
|
|
Definition at line 1170 of file symmetry.h. 01170 {}
|
|
|
Definition at line 1171 of file symmetry.h. 01171 {}
|
|
|
Disallow copy construction.
|
|
|
Generate even distributed orientations in the asymmetric unit of the symmetry.
Implements EMAN::OrientationGenerator. Definition at line 561 of file symmetry.cpp. References EMAN::OrientationGenerator::add_orientation(), EMAN::Symmetry3D::get_az_alignment_offset(), EMAN::Symmetry3D::get_delimiters(), EMAN::OrientationGenerator::get_optimal_delta(), InvalidParameterException, EMAN::Symmetry3D::is_h_sym(), EMAN::Symmetry3D::is_in_asym_unit(), EMAN::Symmetry3D::is_platonic_sym(), and EMAN::Dict::set_default(). 00562 {
00563 float delta = params.set_default("delta", 0.0f);
00564 int n = params.set_default("n", 0);
00565
00566 if ( delta <= 0 && n <= 0 ) throw InvalidParameterException("Error, you must specify a positive non-zero delta or n");
00567 if ( delta > 0 && n > 0 ) throw InvalidParameterException("Error, the delta and the n arguments are mutually exzclusive");
00568
00569 if ( n > 0 ) {
00570 delta = get_optimal_delta(sym,n);
00571 }
00572
00573 bool inc_mirror = params.set_default("inc_mirror",false);
00574 Dict delimiters = sym->get_delimiters(inc_mirror);
00575 float altmax = delimiters["alt_max"];
00576 float azmax = delimiters["az_max"];
00577
00578 float altmin = 0.0f;
00579 // If it's a h symmetry then the alt iterator starts at very close
00580 // to the altmax... the object is a h symmetry then it knows its alt_min...
00581 if (sym->is_h_sym()) altmin = delimiters["alt_min"];
00582
00583 vector<Transform> ret;
00584
00585 for (float alt = altmin; alt <= altmax; alt += delta) {
00586 float detaz;
00587 int lt;
00588 if ((0.0f == alt)||(180.0f == alt)) {
00589 detaz = 360.0f;
00590 lt = 1;
00591 } else {
00592 detaz = delta/(float)sin(alt*EMConsts::deg2rad);
00593 lt = int(azmax/detaz)-1;
00594 if (lt < 1) lt = 1;
00595 detaz = azmax/(float)lt;
00596 }
00597 // bool d_odd_mirror_flag = false;
00598 // get_az_max(sym,altmax, inc_mirror,alt, lt,d_odd_mirror_flag, detaz);
00599
00600 for (int i = 0; i < lt; i++) {
00601 float az = (float)i*detaz;
00602 if (sym->is_platonic_sym()) {
00603 if ( sym->is_in_asym_unit(alt, az,inc_mirror) == false ) continue;
00604 else {
00605 az += sym->get_az_alignment_offset(); // Align to the symmetry axes
00606 }
00607 }
00608 add_orientation(ret,az,alt);
00609 if ( sym->is_h_sym() && inc_mirror && alt != altmin ) {
00610 add_orientation(ret,az,2.0f*altmin-alt);
00611 }
00612 }
00613 }
00614
00615 return ret;
00616 }
|
|
|
Get a description.
Implements EMAN::FactoryBase. Definition at line 1190 of file symmetry.h. 01190 { return "Generate quasi-evenly distributed orientations within an asymmetric unit using Penczek's (94) approach"; }
|
|
|
Return "even".
Implements EMAN::FactoryBase. Definition at line 1185 of file symmetry.h. 01185 { return NAME; }
|
|
||||||||||||
|
This function returns how many orientations will be generated for a given delta (angular spacing) It does this by simulated gen_orientations.
Implements EMAN::OrientationGenerator. Definition at line 518 of file symmetry.cpp. References EMAN::Symmetry3D::get_delimiters(), EMAN::Symmetry3D::is_h_sym(), EMAN::Symmetry3D::is_in_asym_unit(), EMAN::Symmetry3D::is_platonic_sym(), and EMAN::Dict::set_default(). 00519 {
00520 bool inc_mirror = params.set_default("inc_mirror",false);
00521 Dict delimiters = sym->get_delimiters(inc_mirror);
00522 float altmax = delimiters["alt_max"];
00523 float azmax = delimiters["az_max"];
00524
00525 float altmin = 0.0f;
00526 // #If it's a h symmetry then the alt iterator starts at very close
00527 // #to the altmax... the object is a h symmetry then it knows its alt_min...
00528 if (sym->is_h_sym()) altmin = delimiters["alt_min"];
00529
00530 int tally = 0;
00531
00532 for (float alt = altmin; alt <= altmax; alt += delta) {
00533 float detaz;
00534 int lt;
00535 if ((0.0f == alt)||(180.0f == alt)) {
00536 detaz = 360.0f;
00537 lt = 1;
00538 } else {
00539 detaz = delta/(float)sin(alt*EMConsts::deg2rad);
00540 lt = int(azmax/detaz)-1;
00541 if (lt < 1) lt = 1;
00542 detaz = azmax/(float)lt;
00543 }
00544 // bool d_odd_mirror_flag = false;
00545 // get_az_max(sym,altmax, inc_mirror,alt, lt,d_odd_mirror_flag, detaz);
00546 for (int i = 0; i < lt; i++) {
00547 float az = (float)i*detaz;
00548 if (sym->is_platonic_sym()) {
00549 if ( sym->is_in_asym_unit(alt, az,inc_mirror) == false ) continue;
00550 }
00551 tally++;
00552 if ( sym->is_h_sym() && inc_mirror && alt != altmin ) {
00553 tally++;
00554 }
00555 }
00556 }
00557
00558 return tally;
00559 }
|
|
|
Get a dictionary containing the permissable parameters of this class.
Reimplemented from EMAN::OrientationGenerator. Definition at line 1196 of file symmetry.h. References EMAN::TypeDict::put(). 01197 {
01198 TypeDict d = OrientationGenerator::get_param_types();
01199 d.put("delta", EMObject::FLOAT, "The angular separation of orientations in degrees. This option is mutually exclusively of the n argument.");
01200 d.put("inc_mirror", EMObject::BOOL, "Indicates whether or not to include the mirror portion of the asymmetric unit. Default is false.");
01201 d.put("n", EMObject::INT, "The number of orientations to generate. This option is mutually exclusively of the delta argument.Will attempt to get as close to the number specified as possible.");
01202 return d;
01203 }
|
|
|
Factory support function NEW.
Definition at line 1176 of file symmetry.h. 01177 {
01178 return new EvenOrientationGenerator();
01179 }
|
|
|
Disallow assignment.
|
|
|
The name of this class - used to access it from factories etc. Should be "icos".
Definition at line 48 of file symmetry.cpp. |
1.3.9.1