"use live replica energies (default=False), numerically unstable for K>2.5k.", default=False) parser.add_argument( "--live_not_stored", action="store_true", help= "turn this flag on if you're using a set of data that does not contain the live replica.", default=False) args = parser.parse_args() print args.fname P = args.P #################################################################################################### #deal with input energies = get_energies(args.fname, 0) #always flattens the input #if args.live_not_stored == False and args.live == False: # if len(args.fname) > 1: # for i in xrange(len(args.fname)): # energies[i] = energies[i][:-args.K] # else: # energies = energies[:-args.K] #elif args.live_not_stored == True: # assert args.live == False,"cannot use live replica under any circumstances if they have not been saved" #make nd-arrays C contiguous energies = np.array(energies, order='C') ########################################################################################################## print "parallel nprocessors", P
parser.add_argument("-P", type=int, help="number of cores for parallel run", default=1) parser.add_argument("--Tmin", type=float,help="set minimum temperature for Cv evaluation (default=0.01)",default=0.01) parser.add_argument("--Tmax", type=float,help="set maximum temperature for Cv evaluation (default=0.5)",default=0.5) parser.add_argument("--nT", type=int,help="set number of temperature in the interval Tmin-Tmax at which Cv is evaluated (default=500)",default=500) parser.add_argument("--ndof", type=int, help="number of degrees of freedom (default=0)", default=0) parser.add_argument("--imp", type=int, help="define whether to use improved Burkoff (use all energies energies (default=1), otherwise set to 0)", default=1) parser.add_argument("--live", action="store_true", help="use live replica energies (default=False), numerically unstable for K>2.5k.",default=False) parser.add_argument("--live_not_stored", action="store_true", help="turn this flag on if you're using a set of data that does not contain the live replica.",default=False) args = parser.parse_args() print args.fname P = args.P #################################################################################################### #deal with input energies = get_energies(args.fname,0) #always flattens the input #if args.live_not_stored == False and args.live == False: # if len(args.fname) > 1: # for i in xrange(len(args.fname)): # energies[i] = energies[i][:-args.K] # else: # energies = energies[:-args.K] #elif args.live_not_stored == True: # assert args.live == False,"cannot use live replica under any circumstances if they have not been saved" #make nd-arrays C contiguous energies = np.array(energies, order='C') ########################################################################################################## print "parallel nprocessors", P
"by default is randomised for a single set of data," "while multiple sets are used as they are", default=2) args = parser.parse_args() print args.fname P = args.P #################################################################################################### #deal with input #by default define automatically weather to split things in block or not if args.B is 2: if (len(args.fname) > 1) and (args.N == len(args.fname)): args.B = 1 else: args.B = 0 energies = get_energies(args.fname,1) #always copy in blocks, then depending on B flatten or not #in the improved brkf we save the energies of the replicas at the live replica but the ln(dos) underflows for these, hence this: if args.live_not_stored == False and args.live is False: if len(args.fname) > 1: for i in xrange(len(args.fname)): energies[i] = energies[i][:-args.K] else: energies = energies[:-args.K] elif args.live_not_stored == True: assert args.live == False,"cannot use live replica under any circumstances if they have not been saved" if len(args.fname) > 1: energies_Cv = [l for l in chain.from_iterable(energies)] #provide the sorted flatten list of energies to calculate the unbiased estimate for the Cv energies_Cv = np.sort(energies_Cv)[::-1] if args.B is 0:
default=2) args = parser.parse_args() print args.fname P = args.P #################################################################################################### #deal with input #by default define automatically weather to split things in block or not if args.B is 2: if (len(args.fname) > 1) and (args.N == len(args.fname)): args.B = 1 else: args.B = 0 energies = get_energies( args.fname, 1) #always copy in blocks, then depending on B flatten or not #in the improved brkf we save the energies of the replicas at the live replica but the ln(dos) underflows for these, hence this: if args.live_not_stored == False and args.live is False: if len(args.fname) > 1: for i in xrange(len(args.fname)): energies[i] = energies[i][:-args.K] else: energies = energies[:-args.K] elif args.live_not_stored == True: assert args.live == False, "cannot use live replica under any circumstances if they have not been saved" if len(args.fname) > 1: energies_Cv = [ l for l in chain.from_iterable(energies)