About applying stress in lammps

Can I use fix npt to simulate appying a load to a system just like fix npthug?
What’s the difference of npt and nphug, just in Δt? Can I get a concise description of the difference?
If I want to research the strain under various pressure in x direction, can I just use command like “fix 1 all npt temp 300 300 $(100*dt) x ${applyStress} ${applyStress} $(1000*dt)” where “applyStress” is a variable. Is that means the pressure is always changing even that the system has already changes beforing reaching the equilibrium of last pressure-controlling stage? If so, does the final non-equilibrium strain have any meaning?
Thanks very much!

fix npt and fix nphug integrate different equations of motion. the more typical way of introducing a load would be using fix deform.

That is what the quoted references in the documentation are for. Please help yourself to a good read of them.

The answers to that are in the documentation. Please pay particular attention to the different ways of variable expansion (starts with a ‘$’) and variable references (starts with a ‘v_’). The former happens at the input processing step and is completely transparent to the command, the latter requires explicit support in the command (and thus will be mentioned in the documentation).

Since applying a load via adding an external pressure is an indirect approach compared to a box deformation (this is similar to just moving atoms versus applying a force), the interpretation is also less direct.

How the Nose-Hoover fixes apply variables and handle temperature and pressure pressure ramps are documented in detail in the manual.

The problem is that the strain is the final result I want. However, the “fix deform” command applies a load by introducing deformation. So I have to use the indirect way to apply the load.

If I want to research strain under sinusoidal oscillating load applied to the system in the x direction, can you give me some suggestions?

Thanks a lot!

Both fix deform and fix addforce have either a “wiggle” option or accept a variable reference which can define a periodic change depending on the time step.

Thanks very much!