Exemplo n.º 1
0
    def make_param(self,
                   diameters,
                   centers,
                   overlap=None,
                   ignore_statistics=False,
                   colors=None,
                   capacity=4):
        if overlap is None:
            overlap = [1 for c in centers]

        members = [
            _hpmc.make_sph_params(float(d) / 2.0, False, False)
            for d in diameters
        ]
        N = len(diameters)
        if len(centers) != N:
            raise RuntimeError(
                "Lists of constituent particle parameters and centers must be equal length."
            )
        self.colors = None if colors is None else self.ensure_list(colors)
        return self.make_fn(
            self.ensure_list(members), self.ensure_list(centers),
            self.ensure_list([[1, 0, 0, 0] for i in range(N)]),
            self.ensure_list(overlap), ignore_statistics, capacity,
            hoomd.context.current.system_definition.getParticleData().
            getExecConf())
Exemplo n.º 2
0
    def make_param(self, diameters, centers, overlap=None, ignore_statistics=False, colors=None):
        if overlap is None:
            overlap = [1 for c in centers]

        members = [_hpmc.make_sph_params(float(d)/2.0, False) for d in diameters];
        N = len(diameters)
        if len(centers) != N:
            raise RuntimeError("Lists of constituent particle parameters and centers must be equal length.")
        self.colors = None if colors is None else self.ensure_list(colors);
        return self.make_fn(self.ensure_list(members),
                            self.ensure_list(centers),
                            self.ensure_list([[1,0,0,0] for i in range(N)]),
                            self.ensure_list(overlap),
                            ignore_statistics,
                            hoomd.context.current.system_definition.getParticleData().getExecConf());