LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [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]

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

From: Spencer Thomas <slthomas61@...24...>
Date: Tue, 31 Oct 2017 08:42:38 -0400

So is the example given in the documentation incorrect, or does it rely on a specific set of commands not given? Everything used by the create_atoms command appears to be defined within the supplied example code. What needs to be changed? Nowhere in the documentation page is any variable associated with the var and set commands referred to as being atom-style.

- Spencer

On Mon, Oct 30, 2017 at 8:50 PM, Axel Kohlmeyer <akohlmey@...24...> wrote:
On Mon, Oct 30, 2017 at 5:32 PM, Spencer Thomas <thospe@...3585...> wrote:
> 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:
> ---
> 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?

those variables have to be *atom-style* variables, as steve clearly
mentions in the archived e-mail conversation you are pointing out.


> I am using the 11 Aug 2017 version of LAMMPS.
> - Spencer
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites,!
> _______________________________________________
> lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...43...4...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.