qpms/qpms/groups.h

56 lines
2.2 KiB
C
Raw Normal View History

/*! \file groups.h
* \brief Point groups.
*
* Right now, the instances of qpms_finite_group_t are created at compilation time
* from source code generated by Python script TODO (output groups.c)
* and they are not to be constructed dynamically.
*/
#ifndef QPMS_GROUPS_H
#define QPMS_GROUPS_H
#include "qpms_types.h"
/// To be used only in qpms_finite_group_t
struct qpms_finite_group_irrep_t {
int dim; ///< Irrep dimension.
char *name; ///< Irrep label.
/// Irrep matrix data.
/** The r-th row, c-th column of the representation of the i'th element is retrieved as
* m[i * dim * dim + r * dim + c]
*/
complex double *m;
};
/// A point group with its irreducible representations and some metadata.
/**
* The structure of the group is given by the multiplication table \a mt.
*
* Each element of the group has its index from 0 to order.
* The metadata about some element are then accessed using that index.
*
* All members are in principle optional except \a order and \a mt.
*
* Note: after changing this struct, don't forget to update the Python method
* SVWFPointGroupInfo.generate_c_source().
*/
typedef struct qpms_finite_group_t {
char *name;
qpms_gmi_t order; ///< Group order (number of elements)
qpms_gmi_t idi; ///< Identity element index
qpms_gmi_t *mt; ///< Group multiplication table. If c = a*b, then ic = mt[order * ia + ib].
qpms_gmi_t *invi; ///< Group elem inverse indices.
qpms_gmi_t *gens; ///< A canonical set of group generators.
int ngens; ///< Number of the generators in gens;
qpms_permutation_t *permrep; ///< Permutation representations of the elements.
char **elemlabels; ///< Optional human readable labels for the group elements.
int permrep_nelem; ///< Number of the elements over which the permutation representation acts.
struct qpms_irot3_t *rep3d; ///< The quaternion representation of a 3D point group (if applicable).
qpms_iri_t nirreps; ///< How many irreps does the group have
struct qpms_finite_group_irrep_t *irreps; ///< Irreducible representations of the group.
} qpms_finite_group_t;
/// NOT IMPLEMENTED Get irrep index by name.
qpms_iri_t qpms_finite_group_find_irrep_by_name(qpms_finite_group_t *G, char *name);
#endif // QPMS_GROUPS_H