1echo both 2 3# Define temperature parameters 4variable temperature equal 300.0 # Simulation temperature in Kelvin 5variable tempDamp equal 100.0 # Relaxation time of themostat - 0.1 ps 6 7# Define pressure parameters 8variable pressure equal 1.0 # Pressure in bars 9variable pressureDamp equal 500.0 # Relaxation time of the barostat 0.5 ps 10 11# Define random seed 12variable seed equal 74582 13 14# Simulation setup 15units real 16atom_style full 17variable out_freq equal 100 # Thermo output frequency 18variable out_freq2 equal 100 # Dump output frequency 19neigh_modify delay 10 every 1 # Neighbor list setup 20include in.nacl # Load initial configuration 21timestep 2.0 # Timestep 2 fs 22thermo ${out_freq} 23thermo_style custom step temp pe ke etotal press lx ly lz xy xz yz 24restart ${out_freq} restart restart2 25 26# Perform minimization 27minimize 1.0e-2 1.0e-3 100 1000 28 29# Write trajectory to file 30dump myDump all dcd ${out_freq2} out.dcd 31dump_modify myDump unwrap yes 32 33# Start simulation 34 35reset_timestep 0 36 37fix 1 all temp/csvr ${temperature} ${temperature} ${tempDamp} ${seed} # Bussi's thermostat 38fix 2 all momentum 10000 linear 1 1 1 # Set total linear momentum to zero every 10000 steps 39fix 3 all plumed plumedfile plumed.dat outfile plumed.out # Use plumed 40fix 4 all shake 0.0001 20 100000 t 1 2 # Shake algorithm 41fix 5 all nph iso ${pressure} ${pressure} ${pressureDamp} # Isotropic barostat 42 43velocity all create ${temperature} ${seed} dist gaussian 44 45run 5000000 # 10 ns 46 47unfix 1 48unfix 2 49unfix 3 50unfix 4 51unfix 5 52 53# Write final configuration 54write_data data.final 55 56