Clipper
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Static Protected Attributes
clipper::Spgr_descr Class Reference

spacegroup description More...

#include <spacegroup.h>

Inheritance diagram for clipper::Spgr_descr:
clipper::Spacegroup clipper::CSpacegroup

List of all members.

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_codesgenerator_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'

Detailed Description

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


Constructor & Destructor Documentation

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:

  • Hall symbol, e.g. " P 2ac 2ab"
  • H-M symbol, e.g. "P 21 21 21"
  • Number, e.g. "19"
  • List of symmetry operators separated by semicolons, e.g. "x,y,z;-x+1/2,-y,z+1/2;x+1/2,-y+1/2,-z;-x,y+1/2,-z+1/2"

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.

Parameters:
nameThe spacegroup symbol or operators.
typeThe 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]
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_.


Member Function Documentation

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.

Returns:
The spacegroup number, or 0 if unavailable.

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.

Returns:
The Hall symbol, or "Unknown" if unavailable.

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.

Returns:
The H-M symbol, or "Unknown" if unavailable.

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.

Returns:
The extended H-M symbol, or "Unknown" if unavailable.

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.

Returns:
The extension H-M symbol, or ""

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.

Parameters:
cEither '1' or '2', 'H' or 'R'.

References pref_hr.


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