def __eq__(self, other): """ ASE atoms object does not compare charges. Hence, when calling GPAW.set(external=...) two identical PointCharge object with different charges won't trigger a reinitialization of the Hamiltionian object. """ try: return Atoms.__eq__(self, other) and np.all(self.get_charges() == other.get_charges()) except: return NotImplemented
def __eq__(self, other): """ ASE atoms object does not compare charges. Hence, when calling GPAW.set(external=...) two identical PointCharge object with different charges won't trigger a reinitialization of the Hamiltionian object. """ try: return Atoms.__eq__(self, other) and \ np.all(self.get_charges() == other.get_charges()) except: return NotImplemented