5
$\begingroup$

I am very new to using LAMMPS. I am trying to obtain some simulations. I was using an older code which had ave/spatial fix style. In the new LAMMPS version it doesn't work so I am switching to ave/chunk fix style. Below are the lines where I am using this style.

compute a1 all chunk/atom bin/1d x lower 10.0 units box
compute b1 all chunk/atom bin/1d x lower 20.0 units box 
fix             4a all ave/chunk 1 1000000 1000000 a1 v_atemp file 10Temperature.txt
fix             4b all ave/chunk 1 1000000 1000000 b1 v_atemp file 20Temperature.txt 
fix             5a all ave/chunk 1 2000000 2000000 a1 v_atemp file 10Temperature2.txt
fix             5b all ave/chunk 1 2000000 2000000 b1 v_atemp file 20Temperature2.txt 
fix             6a all ave/chunk 1 4000000 4000000 a1 v_atemp file 10Temperature4.txt 
fix             6b all ave/chunk 1 4000000 4000000 b1 v_atemp file 20Temperature4.txt

For this I am getting the error:

Two fix ave commands using same compute
chunk/atom command in incompatible ways.

I don't know how to fix this error. I tried to follow the document but I wasn't able to find a fix or I wasn't able to understand much from it. If anyone came across the same error please help.

Thank you.

$\endgroup$

1 Answer 1

2
$\begingroup$

What the error says is that you are using the same compute chunk/atom command multiple times in different fix ave/chunk commands, which is not allowed.

From your code snippet, it seems that you have multiple fix ave/chunk commands using the same compute chunk/atom commands (a1 and b1), but with different averaging parameters. LAMMPS cannot keep track of multiple averaging operations on the same chunks simultaneously, hence the error.

To fix this issue, you should create separate compute chunk/atom commands for each of your fix ave/chunk commands. Here's an example of how you might modify your script:

compute a1 all chunk/atom bin/1d x lower 10.0 units box
compute a2 all chunk/atom bin/1d x lower 10.0 units box
compute a3 all chunk/atom bin/1d x lower 10.0 units box

compute b1 all chunk/atom bin/1d x lower 20.0 units box 
compute b2 all chunk/atom bin/1d x lower 20.0 units box 
compute b3 all chunk/atom bin/1d x lower 20.0 units box 

fix 4a all ave/chunk 1 1000000 1000000 a1 v_atemp file 10Temperature.txt
fix 5a all ave/chunk 1 2000000 2000000 a2 v_atemp file 10Temperature2.txt
fix 6a all ave/chunk 1 4000000 4000000 a3 v_atemp file 10Temperature4.txt 

fix 4b all ave/chunk 1 1000000 1000000 b1 v_atemp file 20Temperature.txt
fix 5b all ave/chunk 1 2000000 2000000 b2 v_atemp file 20Temperature2.txt 
fix 6b all ave/chunk 1 4000000 4000000 b3 v_atemp file 20Temperature4.txt
$\endgroup$
1
  • 1
    $\begingroup$ Thank you for your response. It is clear to me now. Thanks a lot! $\endgroup$ Jun 20, 2023 at 18:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .