Example #1
0
 def run(self, Emax):
     self.Emax = Emax
     res = Result()
     res.mciter = 100
     res.nsteps = 100
     res.naccept = 70
     res.x = self.system.get_random_configuration_Emax(self.Emax)
     res.energy = self.pot.getEnergy(res.x)
     return res
Example #2
0
 def run(self, Emax):
     self.Emax = Emax
     res = Result()
     res.mciter = 100
     res.nsteps = 100
     res.naccept = 70
     res.x = self.system.get_random_configuration_Emax(self.Emax)
     res.energy = self.pot.getEnergy(res.x)
     return res
Example #3
0
    def __call__(self, x0, stepsize, Emax, energy, seed=None):
        if seed is None:
            seed = np.random.randint(0, sys.maxint)
        x, energy, naccept = lj_mc_cython(x0, self.mciter, stepsize, Emax, self.radius, seed)
#        print ret
        res = Result()
        res.x0 = x0
        res.x = x
        res.nsteps = self.mciter
        res.naccept = naccept
        res.energy = energy
        return res
Example #4
0
 def __call__(self, x0, stepsize, Emax, energy, seed=None):
     if seed is None:
         seed = np.random.randint(0, sys.maxint)
     x, energy, naccept = lj_mc_cython(x0, self.mciter, stepsize, Emax,
                                       self.radius, seed)
     #        print ret
     res = Result()
     res.x0 = x0
     res.x = x
     res.nsteps = self.mciter
     res.naccept = naccept
     res.energy = energy
     return res