def initialize(self): # pcoord dimensionality and length. This should match your outside bin self.pcoord_ndim = 2 self.pcoord_len = pcoordlength self.pcoord_dtype = pcoord_dtype # These are your "outer" bins in both dimensions outer_mapper = RectilinearBinMapper([[0.00, numpy.inf], [0.00, 8.00, numpy.inf]]) # These define the "inner" adaptive bins. Each one indicates an independent # adaptive binning scheme. Copy for more. Respects the parameters at the start. adaptive_mapper0 = FuncBinMapper(function_map, prod(binsperdim) + numberofdim * (2 + 2 * splitIsolated) + activetarget, kwargs={"multi_idx": 0}) # Bottom bin adaptive_mapper1 = FuncBinMapper(function_map, prod(binsperdim) + numberofdim * (2 + 2 * splitIsolated) + activetarget, kwargs={"multi_idx": 1}) # Top bin # These are the bins where you'll place each adaptive scheme. self.bin_mapper = RecursiveBinMapper(outer_mapper) self.bin_mapper.add_mapper(adaptive_mapper0, [5, 1]) #Bottom mapper self.bin_mapper.add_mapper(adaptive_mapper1, [5, 10]) #Top mapper ######################### JL ########################################## # This is the what the example looks like. # # inf -------------------------------------------------------- # | | # | adaptive_mapper1 | # | | # 8 -------------------------------------------------------- # D2 | | | # | TARGET | adaptive_mapper0 | # | STATE | | # 0 -------------------------------------------------------- # 3.5(soft bound via mincap) inf # Dimension 1 of pcoord # ####################################################################### self.bin_target_counts = numpy.empty((self.bin_mapper.nbins, ), dtype=numpy.int) # Number of walkers per bin self.bin_target_counts[...] = bintargetcount
def initialize(self): #You will need to specify actual values here self.pcoord_ndim = numberofdim self.pcoord_len = pcoordlength self.pcoord_dtype = numpy.float32 self.bin_mapper = FuncBinMapper(function_map, numberofbins) self.bin_target_counts = numpy.empty((self.bin_mapper.nbins, ), numpy.int_) self.bin_target_counts[...] = bintargetcount
def initialize(self): self.pcoord_ndim = numberofdim self.pcoord_len = pcoordlength self.pcoord_dtype = numpy.float32 self.bin_mapper = FuncBinMapper( function_map, binsperdim**numberofdim + numberofdim * (2 + 2 * splitIsolated) + activetarget) #Changed binsperbin to binsperdim self.bin_target_counts = numpy.empty((self.bin_mapper.nbins, ), numpy.int_) self.bin_target_counts[...] = bintargetcount