# Interaction parameters (repulsive Lennard Jones) ############################################################# lj_eps = 1.0 lj_sig = 1.0 lj_cut = 1.12246 lj_cap = 20 # Integration parameters ############################################################# system = espressomd.System() system.time_step = 0.01 system.skin = 0.4 #es._espressoHandle.Tcl_Eval('thermostat langevin 1.0 1.0') thermostat.Thermostat().setLangevin(1.0, 1.0) # warmup integration (with capped LJ potential) warm_steps = 100 warm_n_times = 30 # do the warmup until the particles have at least the distance min__dist min_dist = 0.9 # integration int_steps = 1000 int_n_times = 10 ############################################################# # Setup System # #############################################################
############################################################# wca_eps = 10.0 wca_sig = 1.0 wca_cap = 20 # Integration parameters ############################################################# system = espressomd.System(box_l=[box_l] * 3) system.set_random_state_PRNG() #system.seed = system.cell_system.get_state()['n_nodes'] * [1234] np.random.seed(seed=system.seed) system.time_step = 0.01 system.cell_system.skin = 0.4 thermostat.Thermostat().set_langevin(1.0, 1.0, seed=42) # warmup integration (with capped LJ potential) warm_steps = 100 warm_n_times = 30 # do the warmup until the particles have at least the distance min_dist min_dist = 0.7 # integration int_steps = 1000 int_n_times = 10 ############################################################# # Setup System # #############################################################
for i in xrange(n_part): #posx, posy, posz = box_l*numpy.random.random(3) q *= -1 ptype = 1 - ptype system.part.add(id=i, type=ptype, pos=numpy.random.random(3) * system.box_l, q=q) # Simulation parameters system.time_step = 0.01 system.skin = 0.3 # Thermostat temp = 1. gamma = 1. thermostat.Thermostat().set_langevin(kT=temp, gamma=gamma) # Lennard-Jones interactions lj_sig = 1. lj_eps = 1. lj_cut = 2.**(1. / 6.) system.non_bonded_inter[0, 0].lennard_jones.set_params( epsilon=lj_eps, sigma=lj_sig, cutoff=lj_cut, shift="auto") system.non_bonded_inter[1, 0].lennard_jones.set_params( epsilon=lj_eps, sigma=lj_sig, cutoff=lj_cut, shift="auto") system.non_bonded_inter[1, 1].lennard_jones.set_params( epsilon=lj_eps, sigma=lj_sig, cutoff=lj_cut, shift="auto") # Check if electrostatics method is clear... if method not in implemented_methods: print("Please select an electrostatics method in the script.")