def __init__(self, flags=("center",)): if not all(flag in {"center", "constituent", "free"} for flag in flags): raise ValueError( "Only allowed flags are 'center', 'constituent', and 'free'.") ParticleFilter.__init__(self) ParticleFilterRigid.__init__(self, flags) self._flags = flags
def __init__(self, f, g): ParticleFilter.__init__(self) if f == g: raise ValueError("Cannot use same filter for {}" "".format(self.__class__.__name__)) else: self._f = f self._g = g # Grab the C++ class constructor for the set operation using the class # variable _cpp_cls_name getattr(_hoomd, self._cpp_cls_name).__init__(self, f, g)
def __init__(self): ParticleFilter.__init__(self) ParticleFilterNull.__init__(self)
def __init__(self, types): ParticleFilter.__init__(self) types = set(types) self._types = frozenset(types) ParticleFilterType.__init__(self, types)
def __init__(self, tags): ParticleFilter.__init__(self) self._tags = np.ascontiguousarray(np.unique(tags), dtype=np.uint32) ParticleFilterTags.__init__(self, tags)