[lammps-users] possible error in variable.cpp

Hi,

I’ve been trying to use the variable command to calculate the angular velocity (amongst other properties) of a solvated protein. In my input file I have the following commands

variable wx equal omega(protein,x)
variable wy equal omega(protein,y)
variable wz equal omega(protein,z)

and on running lammps (19 Jun 2010 version) I get the ‘ERROR: Invalid group function in variable formula’ error message’, when the wz variable is evaluated. Looking in the file variable.cpp I find the following lines:

if (strcmp(arg2,“x”) == 0) value = omega[0];
else if (strcmp(arg2,“y”) == 0) value = omega[1];
else if (strcmp(arg2,“x”) == 0) value = omega[2];

Should the last line read

else if (strcmp(arg2,“z”) == 0) value = omega[2];

in order to evaluate the z component of the angular velocity?

regards,
David Cheung

yes - that's a bug - should be "z" - I'll post
a patch - thanks

Steve