diff --git a/qpms/groups.h b/qpms/groups.h index 96f9faa..b1198b7 100644 --- a/qpms/groups.h +++ b/qpms/groups.h @@ -43,9 +43,10 @@ struct qpms_irot3_t; */ typedef struct qpms_finite_group_t { char *name; - size_t order; ///< Group order (number of elements) + 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. diff --git a/qpms/symmetries.py b/qpms/symmetries.py index 906a2e4..cd9f959 100644 --- a/qpms/symmetries.py +++ b/qpms/symmetries.py @@ -103,6 +103,10 @@ class SVWFPointGroupInfo: # only for point groups, coz in svwf_rep() I use I_tyt ss = ', '.join([str(permindices[permlist[i]*permlist[j]]) for j in range(order)]) s += ' ' + ss + ',\n' s += ' },\n' + # qpms_gmi_t *invi + s += ' { // invi\n' + s += ' ' + ', '.join([str(permindices[permlist[j]**-1]) for j in range(order)]) + s += '\n },\n' # qpms_gmi_t *gens s += ' {' + ', '.join([str(permindices[g]) for g in self.permgroupgens]) + '}, // gens\n' # int ngens @@ -111,7 +115,7 @@ class SVWFPointGroupInfo: # only for point groups, coz in svwf_rep() I use I_tyt s += ' { // permrep\n' for i in range(order): s += ' "%s",\n' % str(permlist[i]) - s += ' }\n' + s += ' },\n' # char **elemlabels s += ' NULL, // elemlabels\n' # int permrep_nelem