diff --git a/qpms/qpms_c.pyx b/qpms/qpms_c.pyx index 73e9427..12d2c27 100644 --- a/qpms/qpms_c.pyx +++ b/qpms/qpms_c.pyx @@ -567,6 +567,23 @@ cdef class ScatteringSystem: else: return None + property eta: + """Ewald parameter η""" + def __get__(self): + self.check_s() + if self.lattice_dimension: + return self.s[0].per.eta + else: + return None + + def __set__(self, eta): + self.check_s() + if self.lattice_dimension: + self.s[0].per.eta = eta + else: + raise AttributeError("Cannot set Ewald parameter for finite system") # different exception? + + def pack_vector(self, vect, iri): """Converts (projects) a full excitation coefficient vector into an irrep subspace. diff --git a/qpms/qpms_cdefs.pxd b/qpms/qpms_cdefs.pxd index 9f4fa8c..8422ab1 100644 --- a/qpms/qpms_cdefs.pxd +++ b/qpms/qpms_cdefs.pxd @@ -603,6 +603,7 @@ cdef extern from "scatsystem.h": struct qpms_scatsys_periodic_info_t: cart3_t lattice_basis[3] double unitcell_volume + double eta #etc. struct qpms_scatsys_t: int lattice_dimension