Based on various papers and manuals, I have calculated the pressure (P_xx) for each chunk.
But I’m not sure if the command I’ve written is correct because it calculates values on a much larger scale than what I expected
My scripts are as below
compute ch_id all chunk/atom bin/1d x lower 10 units box
compute stress all stress/atom NULL
variable press atom -(c_stress[1])
fix ave_stress all ave/chunk 1 100 200 ch_id v_press file ave_stress.out
I will explain the script line by line.
Line 1: Create chunks at intervals of 10 angstroms along the x-axis.
Line 2: Calculate stress for each atom.
Line 3: Set a variable to only take the value of stress[1] to calculate P_xx.
Line 4: Average the v_press variable for each chunk
Please check my script, and give me some advise.
Thanks,