Stress tensor and density profile

Hi, I’m doing some surface tension calculations for a Lenard Jhones fluid. I’m interested in pressure, tension, and density profiles. My approach for these profiles is the following
units lj
dimension 3
atom_style atomic
pair_style lj/cut 6
boundary p p p
region simblock block 0 90 -100 100 0 90
create_box 1 simblock
region initblock block 0 90 -12.5 12.5 0 90 side in
create_atoms 1 random 10000 3 initblock
mass 1 1
pair_coeff 1 1 1 1 4
neigh_modify every 1 delay 4 check yes
####################

Calculations

###################
compute dvd all chunk/atom bin/1d y center 1 nchunk once units box
compute peratom all stress/atom NULL
fix pressure_profile all ave/chunk 1001000 1 1001000 dvp c_peratom[1] c_peratom[2] c_peratom[3] file tension_profile.dat

The problem with this one and also the other profiles is that the graph is very choppy and not smooth. In many papers, I see that they have a smooth and nice graph. I think the problem is that Lammps is not taking continuous chunks. Is there a way to smooth out Lammps output?

If I try an smaller bin size the output comes out worse.

I think the problem is that you are not doing any averaging (your Nrepeat value is 1). Stress is noisy, and even more noisy the smaller the volume and the fewer the number of contributing atoms.

Oh, I see. I putting 1 because when I change the number lammps fails at the start. Could you show me how to do the average? Thanks.

Please study the documentation. There are detailed explanations of how this works. All I can do is repeat that.