Hi,

I want to apply extensional flow with UEF in strain rate 10^7 in a polystyrene system.

I get below error.

Please advice;

In input script:

```
variable rate equal 1.0e7
variable xrate equal ${rate}/2.0
timestep 1.0
variable Ttot equal ceil(10.0/${rate}/dt)
variable dint equal floor(0.2/${rate}/dt)
variable thint equal floor(0.0001/${rate}/dt)
variable Trem equal ${Ttot}-step
variable time equal step*dt
fix 1 all nvt/uef temp 500.0 500.0 100.0 erate -${xrate} -${xrate}
fix 2 all momentum 100 linear 1 1 1
variable pxx equal c_1_press[1]
variable pyy equal c_1_press[2]
variable pzz equal c_1_press[3]
variable pxy equal c_1_press[4]
variable pxz equal c_1_press[5]
variable pyz equal c_1_press[6]
variable eps equal ${rate}*v_time
variable temp equal c_1_temp
variable epair equal epair
variable emol equal emol
variable etot equal etotal
#define output file with state variables
fix state_out all ave/time 1 ${thint} ${thint} v_eps v_temp v_epair v_emol v_etot v_pxx v_pyy v_pzz v_pxy v_pxz v_pyz ave one file ../svouts/sv_1.out
thermo ${thint}
thermo_modify flush yes
thermo_style custom step v_eps v_temp epair emol etotal v_pxx v_pyy v_pzz
restart 10000 restart.N1 restart.1
run ${Trem}
```

```
ERROR: Illegal fix ave/time command (src/fix_ave_time.cpp:130)
Last command: fix state_out all ave/time 1 ${thint} ${thint} v_eps v_temp v_epair v_emol v_etot v_pxx v_pyy v_pzz v_pxy v_pxz v_pyz ave one file ../svouts/sv_1.out
```

Regards,

Priscilla

The error happens because the variable `${thint}`

is zero:

```
variable rate equal 1.0e7
variable xrate equal ${rate}/2.0
timestep 1.0
variable thint equal floor(0.0001/${rate}/dt)
# Just to make it work.
region my_box block 0 10 0 10 0 10
create_box 1 my_box
print "Thint: ${thint}"
```

`Thint: 0`

You want the `${thint}`

variable to be a positive integer, coincide or be a multiple of the `thermo`

output, and an integer factor of `run`

.

I tried adding below lines to script;

```
region my_box block 0 10 0 10 0 10
create_box 1 my_box
print "Thint: ${thint}"
```

The I get below error;

ERROR: Cannot create_box after simulation box is defined (src/create_box.cpp:40)

Last command: create_box 1 my_box

Honestly, what else can I add on top of the very clear error message? I added the `create_box`

to my script to make it self-contained.

You need to change the thint variable to make it non-zero and compliant to the constrains I have already specified. You can add the print statement before the `fix ave/time`

for debugging purposes, thatâ€™s it.

I tried doing below changes;

```
timestep 0.001
#Total Runtime should reach true strain of 4.5 (4.0)
variable Ttot equal ceil(10.0/${rate}/dt)
#Dumps should be output every 0.004 true strain (0.1) #same size as large dumps
variable dint equal floor(2e11/${rate}/dt)
#thermodynamic output should be generated every 1e-4 strain
variable thint equal floor(100000000/${rate}/dt)
```

Also reduced the timestep

It gives below error:

```
ERROR on proc 8: Out of range atoms - cannot compute PPPM (src/KOKKOS/pppm_kokkos.cpp:1434)
```

It will be great if you can advice

This error message is one of the most quoted one in this forum and the forum search statistics show that archived discussions related to it are among the most looked up messages. So, I would suggest you do the same and follow the discussions.

Some general advice to encountering errors: you have a rather elaborate input, to understand where errors are coming from, you need to simplify it and remove anything that is unrelated. Like in the example that @hothello was showing you, where he removed everything that was irrelevant to the error you were getting. In the process, he determined that the error was completely independent from UEF (in contrast to your topic headline). Thus you need to figure out, whether the same applied to the out-of-range error, and try if you can run the same simulation in an equilibrium simulation and also use as a starting geometry an equilibrated system. If the error still appears, you have to investigate how to correct your system so it can run without crashing.

Please note that this is standard MD simulation protocol and should should discuss this with your tutor/adviser or anybody local that has more experience in simulations than you. That LAMMPS throws an error is usually a symptom that there is a problem with the *scientific* choices (simulation settings, force field topology and parameters, starting geometry) and less with LAMMPS. LAMMPS just tells you that your simulation is violating some assumptions it has made that are true for well behaved simulations and thus something must have gone wrong.