I have done minimization and equilibration before tension test but still graph doesnot starts from zero. The material is single crystal silver nanowire.
I'm gathering you are working at finite temperature. Do you have pressure control (NPT) enabled along the length of the nanowire during relaxation? If not, the wire won't relax to zero pressure if the length of the box is not correct.
(If you are instead doing zero kelvin test, the fix you have to use during minimization is called box/relax. It might not hurt using that one during your initial minimization before >0 K relaxation here either, maybe depending on your initial atomic configuration and the target temperature.)
After you have relaxed the wire, you have to switch back to fixed-volume NVT to apply strain.
velocity all create 298.0 12345 dist gaussian sum no mom yes rot yes units box
run 0
velocity all scale 298.0
fix 1 all npt temp 298.0 298.0 ${T_damp} z 0 0 ${P_damp}
fix 2 all recenter INIT INIT INIT
fix 3 all balance 10000 1.1 rcb
Jyri Kimari. i have another question. I want to equilibrate at 498K. Can i directly equilibrate to 498K or should i first equilibrate to 298K and then to 498K. What changes should i make to equilibrate at 498K. im new to lammps and need your help. thankyou
You can probably directly equilibrate at 498 K. If it looks like the wire vibrates or "breathes" a lot by the end of equilibration, you could try to do it slower, starting from a lower temperature. Note that you can set the initial and the final target temperature different in the npt (and nvt, etc.) fix, if you want. The temperature control will be ramped from initial to final in the duration of the next run command. For example,
```
fix 1 all npt temp 298.0 498.0 ${T_damp} z 0 0 ${P_damp}
...
run 10000 # ramp from 298 K to 498 K
unfix 1
fix 1 all npt temp 498.0 498.0 ${T_damp} z 0 0 ${P_damp}
run 10000 # final equilibration at 498 K
```
If the wire looks unstable, you can start from even lower initial temperatue and ramp to the target a bit slower. Run step counts are just examples, I don't know what timestep you are using and how long you need.
Final note: it may make equilibration slightly smoother to create initial velocities according to ~twice the target temperature, if the initial atomic coordinates are at or close to equilibrium. When the atoms start moving, potential energy will soak some of the initial kinetic energy according to the equipartition principle. If you set initial velocities corresponding to target temperature, you will likely see a sharp drop in system temperature in the beginning, before it starts to even out.