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
예제 #2
0
 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