# PROBLEM COMPUTE GYRATION

Hi LAMMPS users,
I’m trying to do compute radius of gyration o a polymer in a water box
This is the script:

clear
units real
dimension 3
boundary p p s
atom_style charge
neighbor 2.0 bin
neigh_modify delay 0 every 1 check yes
group PCE id >= 13758
pair_style reax/c NULL
pair_coeff * * ffield.reax 6 1 4 9 2 10 3
fix 1 all qeq/reax 1 0.0 10.0 1.0e-6 reax/c
timestep 0.5
velocity all create 300.0 9999 dist gaussian
thermo_style custom step etotal pe ke evdwl ecoul temp press vol
thermo 1
dump 1 all dcd 100 ./dcd/box_wat_C3A_ion_PCE_MD.dcd
dump_modify 1 sort id
dump_modify 1 unwrap yes
dump 2 all custom 200 ./xyz_MD/box_wat_C3A_ion_PCE_MD.xyz.* id type element xu yu zu
dump_modify 2 sort id element Al C Ca Cl H Na O
restart 10000 ./restart_MD/box_wat_C3A_ion_PCE_eq.restart
fix 2 all nvt temp 300.0 300.0 50.0

# --------------------PRINT TIME BENCHMARK---------------------------

variable step equal “step”
variable cpu equal “cpu”
variable tpcpu equal “tpcpu”
variable spcpu equal “spcpu”
variable elapsed equal “elapsed”
variable elaplong equal “elaplong”
fix 3 all print 10 “{step} {cpu} {tpcpu} {spcpu} {elapsed} {elaplong}” file ./thermo-data/benchmark_RG.log title “BENCHMARK LAMMPS: tstep cpu tpcpu spcpu elapsed elaplong” screen no

compute RG PCE gyration
variable RGxx equal c_RG[1]
variable RGyy equal c_RG[2]
variable RGzz equal c_RG[3]
variable RGxy equal c_RG[4]
variable RGxz equal c_RG[5]
variable RGyz equal c_RG[6]

fix 4 PCE print 1 “{RGxx} {RGyy} {RGzz} {RGxy} {RGxz} {RGyz}” file ./thermo-data/Radius_Gyration.log title “Radius of Gyration of PCE: RGxx RGyy RGzz RGxy RGxz RGyz”

# -------------------------------------------------------------------------------

#min_style sd

#min_modify dmax 0.1 line backtrack

minimize 1.0e-8 1.0e-10 1000 5000

run 1000

run_style verlet

# --------------------SIMULATION DONE--------------------------------

print “All done!”
print “MD Minimization/equilibration of the system is completed”

I obtain this log file:

LAMMPS (11 Jan 2012)
orthogonal box = (-1 -1 -5) to (37 37 112)
2 by 2 by 4 MPI processor grid
14025 atoms
268 atoms in group PCE
Setting up run …
Memory usage per processor = 7.52431 Mbytes
Step TotEng PotEng KinEng E_vdwl E_coul Temp Press Volume
0 -1213855 -1226395.9 12540.864 -1022148.1 -204247.76 300 3288.7533 167907.49
ERROR: Mismatched compute in variable formula (variable.cpp:926

Could you help me???
Thank you very much

I don't know. The only compute I see is these lines:

compute RG PCE gyration
variable RGxx equal c_RG[1]
variable RGyy equal c_RG[2]
variable RGzz equal c_RG[3]
variable RGxy equal c_RG[4]
variable RGxz equal c_RG[5]
variable RGyz equal c_RG[6]

fix 4 PCE print 1 "\{RGxx\} {RGyy} \{RGzz\} {RGxy} \{RGxz\} {RGyz}"