LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] how to output an average of compute gyration/chunk
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] how to output an average of compute gyration/chunk


From: "Frischknecht, Amalie L" <alfrisc@...3...>
Date: Fri, 1 Sep 2017 22:26:04 +0000

 

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

 

-----------------------------------------------------

 

Amalie Frischknecht, Ph.D.

Center for Integrated Nanotechnologies

Sandia National Laboratories

PO Box 5800 MS-1315

Albuquerque, NM 87185-1315

 

505-284-8585 (office)

505-284-7778 (fax)

alfrisc@...3...

 

-----------------------------------------------------