示例#1
0
 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
示例#2
0
文件: set_.py 项目: tltht/hoomd-blue
    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)
示例#3
0
 def __init__(self):
     ParticleFilter.__init__(self)
     ParticleFilterNull.__init__(self)
示例#4
0
文件: type_.py 项目: tltht/hoomd-blue
 def __init__(self, types):
     ParticleFilter.__init__(self)
     types = set(types)
     self._types = frozenset(types)
     ParticleFilterType.__init__(self, types)
示例#5
0
 def __init__(self, tags):
     ParticleFilter.__init__(self)
     self._tags = np.ascontiguousarray(np.unique(tags), dtype=np.uint32)
     ParticleFilterTags.__init__(self, tags)