LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
[lammps-users] boolean create_atoms command: variable for create_atoms command is invalid style
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lammps-users] boolean create_atoms command: variable for create_atoms command is invalid style


From: Spencer Thomas <thospe@...3585...>
Date: Mon, 30 Oct 2017 17:32:00 -0400

This is related to the questions addressed in this thread:
https://sourceforge.net/p/lammps/mailman/message/34556070/

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:

---
units        metal
dimension    2
boundary     p p p

atom_style      atomic

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.

- Spencer