[lammps-users] cannot run examples

I am a new LAMMPS user. First thing I did after installing on Ubuntu
(serial) was to follow the manual.

(1) Section 2.5 of the manual asks to run "lj" in examples directory. The
directory does not exist.

(2) Then I went to dipole directory and tried running it there. It failed:

log.lammps>
LAMMPS (2 Feb 2011)
# Point dipoles in a 2d box

units lj
atom_style dipole
ERROR: Invalid atom style

(3) Then I tried running in examples "crack" and failed again with:

atom_style region 1 block INF INF INF 1.25 INF INF
group lower region 1
302 atoms in group lower
region 2 block INF INF 38.75 INF INF INF
group upper region 2
302 atoms in group upper
group boundary union lower upper
604 atoms in group boundary
group mobile subtract all boundary
7537 atoms in group mobile

region leftupper block INF 20 20 INF INF INF
region leftlower block INF 20 INF 20 INF INF
group leftupper region leftupper
820 atoms in group leftupper
group leftlower region leftlower
841 atoms in group leftlower

set group leftupper type 2
  820 settings made for type
set group leftlower type 3
  841 settings made for type
set group lower type 4
  302 settings made for type
set group upper type 5
  302 settings made for type

# initial velocities

compute new mobile temp
velocity mobile create 0.01 887723 temp new
velocity upper set 0.0 0.3 0.0
ERROR: Cannot set z velocity for 2d simulation dipole

WONDER, I am doing something wrong, or what's missing ?

Vivek Ranjan
NC State University

Dear Dr Ranjan,

what kind of output do you get from lammps? Are you sure your lammps is installed correctly (do you get the LAMMPS (version) line in the beginning?
If you wish, I have instructions on lammps installation that work on my ubuntu, I can post them.
with best wishes,
Anna

I am a new LAMMPS user. First thing I did after installing on Ubuntu
(serial) was to follow the manual.

(1) Section 2.5 of the manual asks to run "lj" in examples directory. The
directory does not exist.

this is outdated and needs to be updated. it is now named melt.
thanks for reporting this inconsistency.

(2) Then I went to dipole directory and tried running it there. It failed:

log.lammps>
LAMMPS (2 Feb 2011)
# Point dipoles in a 2d box

units lj
atom_style dipole
ERROR: Invalid atom style

the support for point dipoles is an optional
feature and usually not configured to be compiled
in by default. please re-read the installation
instructions in the lammps documentation.

(3) Then I tried running in examples "crack" and failed again with:

atom_style region 1 block INF INF INF 1.25 INF INF
group lower region 1
302 atoms in group lower
region 2 block INF INF 38.75 INF INF INF
group upper region 2
302 atoms in group upper
group boundary union lower upper
604 atoms in group boundary
group mobile subtract all boundary
7537 atoms in group mobile

region leftupper block INF 20 20 INF INF INF
region leftlower block INF 20 INF 20 INF INF
group leftupper region leftupper
820 atoms in group leftupper
group leftlower region leftlower
841 atoms in group leftlower

set group leftupper type 2
  820 settings made for type
set group leftlower type 3
  841 settings made for type
set group lower type 4
  302 settings made for type
set group upper type 5
  302 settings made for type

# initial velocities

compute new mobile temp
velocity mobile create 0.01 887723 temp new
velocity upper set 0.0 0.3 0.0
ERROR: Cannot set z velocity for 2d simulation dipole

WONDER, I am doing something wrong, or what's missing ?

no. the velocity command has been improved and is
checking its input more carefully. please change the line

velocity upper set 0.0 0.3 0.0

with:

velocity upper set 0.0 0.3 NULL

cheers,
    axel.

Hello Axel,

Thanks for your reply.

no. the velocity command has been improved and is
checking its input more carefully. please change the line

velocity upper set 0.0 0.3 0.0

with:

velocity upper set 0.0 0.3 NULL

It did work after the above change. But I simply ran the code on the input
from the downloaded example file. Thanks anyways.

I have yet to explore all the resources for LAMPPS. In the meanwhile, is
there a good tutorial, and documents that explain terms and statements in
input and output files.

Thanks,

Vivek
NCSU

velocity upper set 0.0 0.3 NULL

It did work after the above change. But I simply ran the code on the input
from the downloaded example file. Thanks anyways.

yes. LAMMPS is a large package and sometimes things get out of sync,
particularly with small integral changes. a lot of the development work is
done in the spare time of people that get paid to do other things and don't
always have to do tests on all possible permutations (which are huge),
particularly with small, incremental changes.

this is one of the area, where the development benefits enormously from
alert and careful users, that report these kind of inconsistencies.
like all powerful tools, LAMMPS requires care from the person using it
and some effort from the user to teach himself the necessary background
is often expected. for packages with a much more limited scope, it is
much easier to have more consistency and more guidance in the documentation.

I have yet to explore all the resources for LAMPPS. In the meanwhile, is

please note the spelling.

there a good tutorial, and documents that explain terms and statements in
input and output files.

the lammps manual and online documentation is all there is.
you should consult a general text book on MD to get up to speed
with the terms and motivation behind the different functionality and
models that are in the general code basis. there are a few papers
describing the general structure of the code, particularly the
parallelization strategy and data flow. and then there are references
related to the individual modules all over the place.

if you are looking for a "complete idiot's guide" or "lammps for dummies"
those still need to be written. i personally found that starting to write a
text of that kind is the best way to teach myself something new.

if you notice inconsistencies, don't hesitate to post to the list, but
make sure that you have exhausted all other "obvious" sources of
wisdom first. particularly questions of the kind "will this work?"
with some elaborate lammps input script fragment will not easily
get a helpful response. the best way to get help is to post a small,
but complete example or refer to existing examples, like you did
very well in your original post. in general, the easier it is for somebody
else to reproduce the problem that you have, the higher the chance
to get help. so basically all that is needed is common sense
(but that sometimes appears to be rather uncommon, particularly
with people that are desperate to get something impossible or
unreasonable done) :wink:

cheers,
   axel.

As Axel said - the examples are not always updated when
a command syntax (like velocity in this case) changes, but they should be.

Setting z vel to 0 shouldn't really be an error for a 2d model - the error check
got changed to something over-zealous - so I'll post a code patch
that allows this. Only setting z to non-zero should be an error.

Steve

Posted a 3Feb11 patch for this that allows v = 0 to be
set for 2d. The crack example (and others) should now run.
As Axel said, you still need to include the DIPOLE package if
you want to run a dipole input script (see the LAMMPS
doc pages on package info).

Steve