Loading...
Searching...
No Matches
AvoSpglib Class Reference

The AvoSpglib class provides an interface between Avogadro and Spglib.

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

## Static Public Member Functions

static unsigned short | getHallNumber (Molecule &mol, double cartTol=1e-5)
static bool | reduceToPrimitive (Molecule &mol, double cartTol=1e-5)
static bool | conventionalizeCell (Molecule &mol, double cartTol=1e-5)
static bool | symmetrize (Molecule &mol, double cartTol=1e-5)

## Member Function Documentation

## getHallNumber()

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

static

Use spglib to find the Hall number for a crystal. If the unit cell does not exist or if the algorithm fails, 0 will be returned.

If the algorithm succeeds, the hall number will be set in the molecule.

Parameters

  mol | The molecule to be handled.
  cartTol | The cartesian tolerance for spglib.

Returns
  The Hall number for the crystal.

## reduceToPrimitive()

bool reduceToPrimitive | ( | Molecule & | mol,
|  | double | cartTol = 1e-5 )

static

Use spglib to reduce the crystal to a primitive cell. Unless the molecule is missing its unit cell, it will be edited by spglib. Positions are not idealized.

If the algorithm succeeds, the hall number will be set in the molecule.

Parameters

  mol | The molecule to be reduced to its primitive cell.
  cartTol | The cartesian tolerance for spglib.

Returns
  False if the molecule has no unit cell or if the spglib algorithm failed. True otherwise.

## conventionalizeCell()

bool conventionalizeCell | ( | Molecule & | mol,
|  | double | cartTol = 1e-5 )

static

Use spglib to refine the crystal to its conventional cell. Unless the molecule is missing its unit cell, it will be edited by spglib. Positions are idealized.

If the algorithm succeeds, the hall number will be set in the molecule.

Parameters

  mol | The molecule to be conventionalized.
  cartTol | The cartesian tolerance for spglib.

Returns
  False if the molecule has no unit cell or if the spglib algorithm failed. True otherwise.

## symmetrize()

bool symmetrize | ( | Molecule & | mol,
|  | double | cartTol = 1e-5 )

static

Use spglib to symmetrize the crystal. Unless the molecule is missing its unit cell, it will be edited by spglib. It will be reduced to its primitive form, and positions will be idealized.

If the algorithm succeeds, the hall number will be set in the molecule.

Parameters

  mol | The molecule to be conventionalized.
  cartTol | The cartesian tolerance for spglib.

Returns
  False if the molecule has no unit cell or if the spglib algorithm failed. True otherwise.

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

- avospglib.h