This is related to the questions addressed in this thread:
I have been attempting to replicate the example in the create_atoms documentation page, in which atoms are generated terminating with a sinusoidal surface. My code is as follows:
boundary p p p
variable x equal 100
variable y equal 25
lattice hex 0.8442
region box block 0 $x 0 $y -0.5 0.5
create_box 1 box
variable xx equal 0.0
variable yy equal 0.0
variable v equal "(0.2*v_y*ylat * cos(v_xx/xlat * 2.0*PI*4.0/v_x) + 0.5*v_y*ylat - v_yy) > 0.0"
create_atoms 1 box var v set x xx set y yy
Other than the first few lines, this copies the example verbatim. However, when the create_atoms command is called, I get the error message "variable for create_atoms command is invalid style". As far as I can tell, v, x, xx, y, and yy are all defined as equal-style variables. I considered maybe xlat and ylat were the culprit, but even if I remove them, the problem persists. Am I missing something about the way these variables are described?
I am using the 11 Aug 2017 version of LAMMPS.