Hi,
I am running simulations of a simple polymer melt. I want to calculate the average radius of gyration of all the polymer chains at a given timestep. I tried to do this by computing the Rg for each molecule using gyration/chunk, and then averaging all of the resulting Rg’s to get one scalar variable. I think I have to use a variable to do this, since the output of compute gyration/chunk is a global vector. So I used the ave() function. But now I can’t seem to print the result to a file, using fix ave/time. Here is what I have tried:
compute c1 all chunk/atom molecule
compute myChunk all gyration/chunk c1
variable aveRg vector ave(myChunk)
fix 3 all ave/time 100 1 100 v_aveRg file Rg.out mode vector
But I get an error saying:
ERROR: Invalid special function in variable formula
If I instead tell fix ave/time that its mode is scalar, I get:
ERROR: Fix ave/time variable is not equal-style variable
But ave() requires a vector-style variable. So I’m stuck. Is this calculation possible in LAMMPS? Or should I just output the Rg of each individual molecule and use a post-processing step to average them?
Thanks,
Amalie