Illegal compute gyration/chunk command

Hi all,

I have a question about using gyration/chunk function.
The version of LAMMPS I installed is 11Apr15.

I want to calculate radius of gyration of each molecule,
using compute chunk/atom with compute gyration/chunk command.

However, whenever i tried to use it, Error message below is always shown.
ERROR: Illegal compute gyration/chunk command (…/compute_gyration_chunk.cpp:50)

I don’t know why this error occurs.
Syntax of compute gyration/chunk is

compute ID group-ID gyration/chunk chunkID.

And my command line is
compute bcpRg bcp gyration/chunk bcpmol

What’s wrong in my input script?

In log file,

group bcp type 2 3
104832 atoms in group bcp
group pmma type 2
33280 atoms in group pmma
group ps type 3
71552 atoms in group ps
group bw type 1
5408 atoms in group bw
group uw type 4
5408 atoms in group uw

Rg calculation

compute bcpmol bcp chunk/atom molecule nchunk once limit 0 ids once compress no
compute bcpRg bcp gyration/chunk bcpmol
ERROR: Illegal compute gyration/chunk command (…/compute_gyration_chunk.cpp:50)

Thanks.
Best regards,
Sehun Joo

Hi all,

I have a question about using gyration/chunk function.
The version of LAMMPS I installed is 11Apr15.

I want to calculate radius of gyration of each molecule,
using compute chunk/atom with compute gyration/chunk command.

However, whenever i tried to use it, Error message below is always shown.
ERROR: Illegal compute gyration/chunk command
(../compute_gyration_chunk.cpp:50)

I don't know why this error occurs.
Syntax of compute gyration/chunk is

compute ID group-ID gyration/chunk chunkID.

And my command line is
compute bcpRg bcp gyration/chunk bcpmol

What's wrong in my input script?

nothing. ​there seems to be a typo​ in line 45 of the source code to
compute gyration/chunk. if you change it as indicated below, it should work.

diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp
index 9d09206..a14fb6f 100644
--- a/src/compute_gyration_chunk.cpp
+++ b/src/compute_gyration_chunk.cpp
@@ -42,7 +42,7 @@ ComputeGyrationChunk::ComputeGyrationChunk(LAMMPS *lmp,
int narg, char **arg) :
   // optional args

   tensor = 0;
- int iarg = 3;
+ int iarg = 4;
   while (iarg < narg) {
     if (strcmp(arg[iarg],"tensor") == 0) {
       tensor = 1;

axel.

this fix will be in the next patch.

Thanks,

Steve