AvogadroLibs 1.97.0
Static Public Member Functions | List of all members
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()

static 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
molThe molecule to be handled.
cartTolThe cartesian tolerance for spglib.
Returns
The Hall number for the crystal.

◆ reduceToPrimitive()

static 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
molThe molecule to be reduced to its primitive cell.
cartTolThe cartesian tolerance for spglib.
Returns
False if the molecule has no unit cell or if the spglib algorithm failed. True otherwise.

◆ conventionalizeCell()

static 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
molThe molecule to be conventionalized.
cartTolThe cartesian tolerance for spglib.
Returns
False if the molecule has no unit cell or if the spglib algorithm failed. True otherwise.

◆ symmetrize()

static 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
molThe molecule to be conventionalized.
cartTolThe 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: