diff --git a/nomad_dos_fingerprints/DOSfingerprint.py b/nomad_dos_fingerprints/DOSfingerprint.py index 77e59b03a4b24d05a38db2171fccad06c4e53305..b102711c7cca25c5408aa4c064b77326fe6d30a7 100644 --- a/nomad_dos_fingerprints/DOSfingerprint.py +++ b/nomad_dos_fingerprints/DOSfingerprint.py @@ -47,6 +47,9 @@ class DOSFingerprint(): def get_similarities(self, list_of_fingerprints): return np.array([self.similarity_function(self, fp) for fp in list_of_fingerprints]) + def __eq__(self, other): + return self.bins == other.bins and self.indices == other.indices and self.stepsize == other.stepsize and self.grid_id == other.grid_id and self.filling_factor == other.filling_factor + def _integrate_to_bins(self, xs, ys): """ Performs stepwise numerical integration of ``ys`` over the range of ``xs``. The stepsize of the generated histogram is controlled by DOSFingerprint().stepsize.