|From:||Spencer Thomas <slthomas61@...24...>|
|Date:||Tue, 31 Oct 2017 19:52:26 -0400|
On Tue, Oct 31, 2017 at 8:42 AM, Spencer Thomas <slthomas61@...24...> wrote:
> So is the example given in the documentation incorrect, or does it rely on a
> specific set of commands not given?
if you re-read the section documentation preceding the example
carefully, you will find, that the example is incorrect and not
consistent with the documentation.
> 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.
you are correct. i mentioned atom-style because it was mentioned in
the e-mail thread you referred to by the great lord of the lammps
himself, and i didn't check the docs myself. after reading that
section of the variable docs and trying to reproduce the error, it
became apparent, that the variable type issue is not with the variable
v, but the variables xx and yy. they have to be of *internal* style.
please re-read the docs and you'll see. i'll submit a patch to correct
the example in the documentation.
lammps/pull/716/commits/ f6658d10b78e10022089b1f52005f0 f70ea27e65
> - 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...>
>> > This is related to the questions addressed in this thread:
>> > https://sourceforge.net/p/
>> > 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, Slashdot.org! http://sdm.link/slashdot
>> > ______________________________
>> > lammps-users mailing list
>> > lammps-users@...396...
>> > https://lists.sourceforge.net/
>> Dr. Axel Kohlmeyer akohlmey@...24... http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
Dr. Axel Kohlmeyer akohlmey@...43...4... http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.