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

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


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 1 Sep 2017 18:44:27 -0400



On Fri, Sep 1, 2017 at 6:26 PM, Frischknecht, Amalie L <alfrisc@...36.....3...> wrote:

 

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)


​shouldn't aveRg be an equal style variable?​ the output of ave() is a scalar, right?

axel.

 

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...

 

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

 

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users




--
Dr. Axel Kohlmeyer  akohlmey@...12...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.