Expose Ewald parameter to Python
Former-commit-id: dc3e794f0cb146da3ab8d8dd5e46c81997e8bc51
This commit is contained in:
parent
69fd19c019
commit
83e76b1f95
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue