################################ ###########VARIABLES############ ################################ variable n index 11 #number of beads variable d index 1 #distance between beads variable preang index 50 #an angle between the ends of the chain variable r equal 36/PI #radius of a circle variable b equal $n*$d+1 variable ang equal ${preang}/(v_n-1) ################################ ###########SIMULATION BOX####### ################################ boundary p p p atom_style full atom_modify sort 0 5. map array units lj #processors 1 * * region universe block 0 2 0 1 0 11 create_box 1 universe mass 1 1 variable t loop $n label one variable m equal v_t-$n/2.0-0.5 variable x equal $r-$r*cos(v_ang*$m*PI/180) variable z equal $r*sin(v_ang*$m*PI/180)+$r*sin(v_ang*5*PI/180) create_atoms 1 single $x 0.5 $z next t jump SELF one set group all mol 1 change_box all boundary s m s change_box all boundary p p p x final 0 1.6 y final 0 1.6 z final 0 11 compute chunks all chunk/atom molecule replicate 15 15 9 velocity all create 0.2 53252 mom yes rot yes neigh_modify exclude molecule/intra all ################################ ###########POTENTIAL############ ################################ pair_style lj/cut $(2^(1/6)) pair_coeff * * 1 1 pair_modify shift yes variable w equal $(density) variable k equal density/11 variable s equal step thermo_style custom step time press etotal density cpuremain ndanger v_k lx ly lz thermo 1000 timestep 0.01 dump dump all custom 100000 dump_initial.lammpstrj id element xu yu zu dump_modify dump element A format float %6.3f sort id fix dt all dt/reset 1 0.0 0.01 0.005 neigh_modify every 1 check yes delay 0 comm_modify cutoff 5.0 fix extra all print 1000 "$(step) $(etotal) $(press) $(vol) $(density) $(lx) $(ly) $(lz)" file initial_data.txt screen no title "TIMESTEP PRESSURE VOLUME DENSITY LX LY LZ" fix rigid all rigid/npt/small molecule temp 1.0 1.0 1.0 iso 1.0 1.0 1.0 compute density_num_1 all chunk/atom bin/1d z lower 1 units box fix 4 all ave/chunk 1000 1 1000 density_num_1 density/mass file initial_density_mass_bin_1.txt run 70000000