Пример #1
0
 def __eq__(self, other):
     if not isinstance(other, MinRmsdFeature):
         return False
     eq = super(MinRmsdFeature, self).__eq__(other)
     return (eq and cmp_traj(self.ref, other.ref)
             and self.ref_frame == other.ref_frame
             and np.all(self.atom_indices == other.atom_indices)
             and self.precentered == other.precentered)
Пример #2
0
 def __eq__(self, other):
     eq = super(GroupCOMFeature, self).__eq__(other)
     if not eq or not isinstance(other, GroupCOMFeature):
         return False
     return (cmp_traj(self.ref_geom, other.ref_geom)
             and self.image_molecules == other.image_molecules and all(
                 np.array_equal(g1, g2) for g1, g2 in zip(
                     self.group_definitions, other.group_definitions))
             and all(
                 np.array_equal(m1, m2) for m1, m2 in zip(
                     self.masses_in_groups, other.masses_in_groups)))
Пример #3
0
 def __eq__(self, other):
     if not isinstance(other, AlignFeature):
         return False
     return (cmp_traj(self.ref, other.ref)
             and np.all(self.atom_indices == other.atom_indices)
             and self.in_place == other.in_place)