Clipper
|
spacegroup description More...
#include <spacegroup.h>
Classes | |
class | Symop_codes |
Vector of symop codes and associated methods. More... | |
Public Types | |
enum | TYPE { Hall, HM, XHM, Symops, Number, Unknown } |
Public Member Functions | |
Spgr_descr () | |
null constructor | |
Spgr_descr (const String &symb, TYPE type=Unknown) | |
constructor: from symbol or operators. | |
Spgr_descr (const int &num) | |
constructor: from number. | |
int | spacegroup_number () const |
return the spacegroup number | |
String | symbol_hall () const |
return the Hall symbol | |
String | symbol_hm () const |
return the H-M symbol | |
String | symbol_xhm () const |
return the extended H-M symbol | |
String | symbol_hm_ext () const |
return the extension H-M symbol | |
Spgr_descr (const Symop_codes &ops) | |
constructor: from symop list. | |
const Symop_codes & | generator_ops () const |
return the generators for the spacegroup | |
const unsigned int & | hash () const |
return the hash code for the spacegroup | |
Static Public Member Functions | |
static void | set_preferred (const char &c) |
set preferred default spacegroup choice | |
Protected Attributes | |
unsigned int | hash_ |
hash code of spacegroup | |
Symop_codes | generators_ |
codes for symop generators | |
static char | pref_hr = 'H' |
preferred origin and hex/romb symbols | |
Static Protected Attributes | |
static char | pref_12 = '1' |
spacegroup description
The spacegroup description is a compact description of a spacegroup. It may be initialised from Hall or H-M symbols, a string of symops or a number. Internally a hash code is used to refer to the spacegroup, so this object is only 32 bits in size.
For more details of spacegroup symbols, see Sydney R. Hall & Ralf W. Grosse-Kunstleve 'Concise Space-Group Symbols', http://www.kristall.ethz.ch/LFK/software/sginfo/hall_symbols.html
clipper::Spgr_descr::Spgr_descr | ( | ) |
null constructor
Construct a null description spacegroup. The result is initialised to an invalid spacegroup code.
References hash_.
Referenced by clipper::Spacegroup::Spacegroup().
clipper::Spgr_descr::Spgr_descr | ( | const String & | symb, |
TYPE | type = Unknown |
||
) | [explicit] |
constructor: from symbol or operators.
Construct a spacegroup description from a text description, i.e. a symbol or operators. This may be one of the following:
It is best to specify the type of symbol being used, however if this parameter is omitted a guess will be made. Unfortunately, Hall and H-M symbols may be ambiguous. Any ambiguity may be removed by appending parentheses "()" to the end of the Hall symbol, otherwise the symbol will be interpreted as an H-M symbol, and a Hall symbol if that fails.
H-M symbols and spacegroup numbers may correspond to 2 different entries in international tables. The choice between 2 origin settings or hexagonal/rhomohedral settings is made using the set_preferred() method.
name | The spacegroup symbol or operators. |
type | The type of symbol: Spacegroup::Symops, Spacegroup::Hall, Spacegroup::HM, Spacegroup::XHM, Spacegroup::Number |
References clipper::Spgr_descr::Symop_codes::generator_ops(), generators_, clipper::Spgr_descr::Symop_codes::hash(), hash_, clipper::String::i(), clipper::Spgr_descr::Symop_codes::init_hall(), clipper::Spgr_descr::Symop_codes::init_symops(), clipper::Message::message(), pref_hr, and clipper::String::trim().
clipper::Spgr_descr::Spgr_descr | ( | const int & | num | ) | [explicit] |
constructor: from number.
See previous constuctor.
num | The spacegroup number. |
References clipper::Spgr_descr::Symop_codes::expand(), clipper::Spgr_descr::Symop_codes::generator_ops(), generators_, clipper::Spgr_descr::Symop_codes::hash(), hash_, clipper::Spgr_descr::Symop_codes::init_hall(), clipper::Message::message(), and pref_hr.
clipper::Spgr_descr::Spgr_descr | ( | const Symop_codes & | ops | ) | [explicit] |
constructor: from symop list.
This is not normally used, except in conjunction with Spgr_desc::generator_ops() to derive one group from another.
References clipper::Spgr_descr::Symop_codes::generator_ops(), generators_, clipper::Spgr_descr::Symop_codes::hash(), and hash_.
int clipper::Spgr_descr::spacegroup_number | ( | ) | const |
return the spacegroup number
The spacegroup number is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve.
Reimplemented in clipper::Spacegroup.
References hash_.
String clipper::Spgr_descr::symbol_hall | ( | ) | const |
return the Hall symbol
The Hall symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve.
Reimplemented in clipper::Spacegroup.
References hash_.
Referenced by clipper::Xmap_cacheobj::format().
String clipper::Spgr_descr::symbol_hm | ( | ) | const |
return the H-M symbol
The H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve.
Reimplemented in clipper::Spacegroup.
References hash_.
String clipper::Spgr_descr::symbol_xhm | ( | ) | const |
return the extended H-M symbol
The extended H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve.
References hash_.
String clipper::Spgr_descr::symbol_hm_ext | ( | ) | const |
return the extension H-M symbol
The extension H-M symbol is only available if the spacegroup exists in the internal table, see Hall & Grosse-Kunstleve.
References hash_.
void clipper::Spgr_descr::set_preferred | ( | const char & | c | ) | [static] |
set preferred default spacegroup choice
Sets the preferred origin or setting for initialising all Spgr_descr objects using H-M symbols or Spacegroup numbers. cctbx uses origin choice '1' by default, CCP4 uses '2'. Both packages use 'H' in preference to 'R'. Preferred values are stored for both. Defaults are '1' and 'H'.
CCP4 users may wish to add the following before using H-M codes or numbers.
c | Either '1' or '2', 'H' or 'R'. |
References pref_hr.