Loading...
Searching...
No Matches
SpaceGroups Class Reference

The Spacegroups class stores basic data about crystal spacegroups. More...

`#include <avogadro/core/spacegroups.h>`

## Static Public Member Functions

static unsigned short | hallNumber (const std::string &spaceGroup)
static CrystalSystem | crystalSystem (unsigned short hallNumber)
static unsigned short | internationalNumber (unsigned short hallNumber)
static const char * | schoenflies (unsigned short hallNumber)
static const char * | hallSymbol (unsigned short hallNumber)
static const char * | international (unsigned short hallNumber)
static const char * | internationalFull (unsigned short hallNumber)
static const char * | internationalShort (unsigned short hallNumber)
static const char * | setting (unsigned short hallNumber)
static unsigned short | transformsCount (unsigned short hallNumber)
static Array< Vector3 > | getTransforms (unsigned short hallNumber, const Vector3 &v)
static void | fillUnitCell (Molecule &mol, unsigned short hallNumber, double cartTol=1e-5, bool wrapToCell=true, bool allCopies=false)
static void | fillTranslationalCopies (Molecule &mol, double cartTol=1e-5)
static void | reduceToAsymmetricUnit (Molecule &mol, unsigned short hallNumber, double cartTol=1e-5)
static Array< Index > | translationalUniqueAtoms (const Molecule &mol, double tolerance=0.001)

## Detailed Description

The spacegroups class gives a simple interface to basic data about crystal spacegroups. The data is generated from information in spglib.

## Member Function Documentation

## hallNumber()

unsigned short hallNumber | ( | const std::string & | spaceGroup | ) |

static

Returns
  The hall number of the matching space group string or 0 if not found

## crystalSystem()

CrystalSystem crystalSystem | ( | unsigned short | hallNumber | ) |

static

Returns
  an enum representing the crystal system for a given hall number. If an invalid hall number is given, None will be returned.

## internationalNumber()

unsigned short internationalNumber | ( | unsigned short | hallNumber | ) |

static

Returns
  the international number for a given hall number. If an invalid hall number is given, 0 will be returned.

## schoenflies()

const char * schoenflies | ( | unsigned short | hallNumber | ) |

static

Returns
  the Schoenflies symbol for a given hall number. If an invalid hall number is given, an empty string will be returned.

## hallSymbol()

const char * hallSymbol | ( | unsigned short | hallNumber | ) |

static

Returns
  the Hall symbol for a given hall number. '=' is used instead of '"'. If an invalid hall number is given, an empty string will be returned.

## international()

const char * international | ( | unsigned short | hallNumber | ) |

static

Returns
  the international symbol for a given hall number. If an invalid hall number is given, an empty string will be returned.

## internationalFull()

const char * internationalFull | ( | unsigned short | hallNumber | ) |

static

Returns
  the full international symbol for a given hall number. If an invalid hall number is given, an empty string will be returned.

## internationalShort()

const char * internationalShort | ( | unsigned short | hallNumber | ) |

static

Returns
  the short international symbol for a given hall number. If an invalid hall number is given, an empty string will be returned.

## setting()

const char * setting | ( | unsigned short | hallNumber | ) |

static

Returns
  the setting for a given hall number. If an invalid hall number is given, an empty string will be returned. An empty string may also be returned if there are no settings for this space group.

## transformsCount()

unsigned short transformsCount | ( | unsigned short | hallNumber | ) |

static

Returns
  the number of transforms for a given hall number. If an invalid hall number is given, 0 will be returned.

## getTransforms()

Array< Vector3 > getTransforms | ( | unsigned short | hallNumber,
|  | const Vector3 & | v )

static

Returns
  an array of transforms for a given hall number and a vector v. The vector should be in fractional coordinates. If an invalid hall number is given, an empty array will be returned.

## fillUnitCell()

void fillUnitCell | ( | Molecule & | mol,
|  | unsigned short | hallNumber,
|  | double | cartTol = 1e-5,
|  | bool | wrapToCell = true,
|  | bool | allCopies = false )

static

Fill a crystal with atoms by using transforms from a hall number. Nothing will be done if the molecule does not have a unit cell. The cartesian tolerance is used to check if an atom is already present at that location. If there is another atom within that distance, the new atom will not be placed there.

## fillTranslationalCopies()

void fillTranslationalCopies | ( | Molecule & | mol,
|  | double | cartTol = 1e-5 )

static

Add translational copies of atoms on the unit cell boundary. For atoms at fractional coordinate ~0, a copy is placed at ~1 and vice versa, plus edge and corner combinations. No symmetry operations are applied.

## reduceToAsymmetricUnit()

void reduceToAsymmetricUnit | ( | Molecule & | mol,
|  | unsigned short | hallNumber,
|  | double | cartTol = 1e-5 )

static

Reduce a cell to its asymmetric unit. Nothing will be done if the molecule does not have a unit cell. The cartesian tolerance is used to check if an atom is present at a location within the tolerance distance. If an atom is present, the atom gets removed.

## translationalUniqueAtoms()

Array< Index > translationalUniqueAtoms | ( | const Molecule & | mol,
|  | double | tolerance = 0.001 )

static

Get indices of translationally unique atoms, filtering out duplicates. Atoms with fractional coordinates near 1.0 that duplicate atoms near 0.0 (due to periodic boundary conditions) are excluded.

Parameters

  mol | The molecule with a unit cell
  tolerance | Fractional coordinate tolerance for duplicate detection

Returns
  Array of atom indices to include (empty if no unit cell)

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

- spacegroups.h