#include <spacegroup.h>
Public Types | |
enum | TYPE { Hall, HM, 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 | |
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 Protected Attributes | |
static char | pref_12 = '1' |
static char | pref_hr = 'H' |
preferred origin and hex/romb symbols | |
Classes | |
class | Symop_codes |
Vector of symop codes and associated methods. More... |
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.
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::Number |
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'. |