adsorbed_compute = 'mem_cluster' py_lmp.compute(adsorbed_compute, adsorbed_group, 'aggregate/atom', tip_lipid_cutoff) top_msd_compute = 'mem_top_msd' py_lmp.compute(top_msd_compute, membrane.top_layer_group, 'msd') bottom_msd_compute = 'mem_bottom_msd' py_lmp.compute(bottom_msd_compute, membrane.bottom_layer_group, 'msd') full_msd_compute = 'mem_full_msd' py_lmp.compute(full_msd_compute, membrane.main_group, 'msd') # FIXES & DYNAMICS mem_dyn_fix = 'mem_dynamics' press_eq_t = 1000 * run_args.dt py_lmp.fix(mem_dyn_fix, membrane.main_group, 'nph', 'x 0.0 0.0', press_eq_t, 'y 0.0 0.0', press_eq_t, 'couple xy', 'dilate', 'all') py_lmp.compute_modify(mem_dyn_fix + '_temp', 'dynamic/dof yes') py_lmp.neigh_modify('exclude', 'molecule/intra', membrane.main_group) # -> saves neighbour calculating without consequences (because beads 1 & 3 will # never be in range anyway & this doesn't affect bonds and angles) py_lmp.special_bonds( 'fene') # not really necessary because of "neigh_modify exclude" # MEMBRANE EQUILIBRATION py_lmp.run(2000) #2 x press_eq_t, for good measure py_lmp.reset_timestep(0) # ===== FINAL =========================================================================== py_lmp.variable('temp_x', 'equal', '"xhi - {:f}"'.format(model.rod_length / 2)) py_lmp.variable('temp_y', 'equal', '"yhi - {:f}"'.format(model.rod_length / 2)) py_lmp.region('gcmc_box', 'block', '-${temp_x}', '${temp_x}', '-${temp_y}', '${temp_y}', 0.0 + 2 * model.rod_length,
thermo_fix = 'thermostat' py_lmp.fix(thermo_fix, 'all', 'langevin', run_args.temp, run_args.temp, run_args.damp, seed)#, "zero yes") simulation.set_rod_dynamics('nve', everything_else=['mol', model.rod_states[0]]) py_lmp.region('gcmc_init', 'block', membrane.xmin + model.rod_length/2, membrane.xmax - model.rod_length/2, membrane.ymin + model.rod_length/2, membrane.ymax - model.rod_length/2, 0.0 + model.rod_length/2, run_args.Lz - model.rod_length/2) rod_gcmc_fix = 'rod_gcmc' py_lmp.fix(rod_gcmc_fix, simulation.rods_group, 'gcmc', 100, 200, 0, 0, seed, run_args.temp, run_args.mu, 0.0, 'region', 'gcmc_init', 'mol', model.rod_states[0], 'rigid', simulation.rod_dyn_fix, 'tfac_insert', 1.65) #py_lmp.fix_modify(simulation.rod_dyn_fix, 'dynamic/dof yes') #only for nvt&npt (small) py_lmp.compute_modify("thermo_temp", "dynamic/dof yes") # TEST DUMP... # py_lmp.thermo_style('custom', 'step atoms', 'pe temp') # py_lmp.variable('thermo_var', 'equal', '"stagger({:d}, 1)"'.format(out_freq)) # py_lmp.thermo('v_thermo_var') # py_lmp.dump('test_dump', 'all', 'custom', out_freq, dump_path+'_init', # 'id x y z type mol c_'+cluster_compute) # py_lmp.dump_modify('test_dump', 'sort id') # GENERATING INITIAL CONFIGURATION py_lmp.neigh_modify('every', 1, 'delay', 1) py_lmp.timestep(run_args.dt) py_lmp.command('run 2000') py_lmp.unfix(rod_gcmc_fix) py_lmp.unfix(zwalls_fix)