2019-02-21 17:38:43 +02:00
|
|
|
/*! \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
|
|
|
|
|
2019-02-27 12:29:19 +02:00
|
|
|
#include "qpms_types.h"
|
2019-02-21 17:38:43 +02:00
|
|
|
|
|
|
|
/// To be used only in qpms_finite_group_t
|
|
|
|
struct qpms_finite_group_irrep_t {
|
|
|
|
int dim; ///< Irrep dimension.
|
2019-02-26 15:33:08 +02:00
|
|
|
char *name; ///< Irrep label.
|
2019-02-21 17:38:43 +02:00
|
|
|
/// 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;
|
2019-02-26 08:15:03 +02:00
|
|
|
qpms_gmi_t order; ///< Group order (number of elements)
|
2019-02-21 17:38:43 +02:00
|
|
|
qpms_gmi_t idi; ///< Identity element index
|
|
|
|
qpms_gmi_t *mt; ///< Group multiplication table. If c = a*b, then ic = mt[order * ia + ib].
|
2019-02-26 08:15:03 +02:00
|
|
|
qpms_gmi_t *invi; ///< Group elem inverse indices.
|
2019-02-21 17:38:43 +02:00
|
|
|
qpms_gmi_t *gens; ///< A canonical set of group generators.
|
|
|
|
int ngens; ///< Number of the generators in gens;
|
2019-02-26 15:33:08 +02:00
|
|
|
qpms_permutation_t *permrep; ///< Permutation representations of the elements.
|
2019-02-21 17:38:43 +02:00
|
|
|
char **elemlabels; ///< Optional human readable labels for the group elements.
|
|
|
|
int permrep_nelem; ///< Number of the elements over which the permutation representation acts.
|
2019-02-26 15:33:08 +02:00
|
|
|
struct qpms_irot3_t *rep3d; ///< The quaternion representation of a 3D point group (if applicable).
|
2019-02-27 12:29:19 +02:00
|
|
|
qpms_iri_t nirreps; ///< How many irreps does the group have
|
2019-02-26 15:33:08 +02:00
|
|
|
struct qpms_finite_group_irrep_t *irreps; ///< Irreducible representations of the group.
|
2019-02-21 17:38:43 +02:00
|
|
|
} qpms_finite_group_t;
|
|
|
|
|
2019-02-27 17:33:46 +02:00
|
|
|
/// NOT IMPLEMENTED Get irrep index by name.
|
2019-02-28 12:09:13 +02:00
|
|
|
qpms_iri_t qpms_finite_group_find_irrep_by_name(qpms_finite_group_t *G, char *name);
|
2019-02-21 17:38:43 +02:00
|
|
|
|
|
|
|
#endif // QPMS_GROUPS_H
|