ERROR: Variable indensity: Invalid thermo keyword 'freq' in variable formula

Dear all,
I want to apply an alternating field in my MD simulation process. But as I run lammps, it comes the error like this: Variable indensity: Invalid thermo keyword ‘freq’ in variable formula.
And related codes are as follows:
variable time equal time
variable P equal 3.0
variable gamma equal 0.5
variable t0 equal 1.5+(time/P)P
variable freq equal 2.0
variable indensity equal 1/(1+((time-t0)/gamma)^2)sin(2PI
freq*time)
fix 0 external efield ${indensity} 0.0 0.0
Could you help me to find what’s going wrong?Thank you! :sob: :sob: :sob:

The error message mostly explains it.
You created a variable “freq”, but you are not referring to it correctly. The parser for variable expressions assumes that all unknown keywords are thermo keywords.

Thank you for your anwser. I will try to handle it.