Max group number

Dear Sir,

I am trying to assign velocity to a group of atom which is function of atom coordinates, i.e. v_i = v_i(x_i,y_i,z_i), i is atom id. According to manual, a good choice should be “velocity set” with atom-type variable for velocity vectors. Something like:

variable v atom 2bessel(0,2.40481sqrt(x^2+y^2+z^2)/70)

velocity all set NULL NULL $v

But it gives me error of ‘Substitution for illegal variable’. Is there any other ways to do it?

Best Regards,

variable v atom 2*bessel(0,2.40481*sqrt(x^2+y^2+z^2)/70)
velocity all set NULL NULL $v

try this:
velocity all set NULL NULL v_v

This is correct, but LAMMPS does not encode
a bessel function, so it’s not going to work
even after you do that.