# Class crystal

- Defined in File symmetry.hpp

## Class Documentation

class crystal

  A crystal combines a cell and a spacegroup.

  The information in cell and spacegroup together make up all information you need to do symmetry calculations in a crystal

  Public Functions

  inline crystal(const datablock &db)

    constructor using the information found in datablock db

  inline crystal(const cell &c, spacegroup sg)

    constructor using cell c and spacegroup sg

  inline const cell &get_cell() const

    Return the cell.

  inline const spacegroup &get_spacegroup() const

    Return the spacegroup.

  inline point symmetry_copy(const point &pt, sym_op symop) const

    Return the symmetry copy of point pt using symmetry operation symop.

  inline point inverse_symmetry_copy(const point &pt, sym_op symop) const

    Return the symmetry copy of point pt using the inverse of symmetry operation symop.

  std::tuple<float, point, sym_op> closest_symmetry_copy(point a, point b) const

    Return a tuple consisting of distance, new location and symmetry operation for the point b with respect to point a.