what happened to lj/cut?

Hi,

I am using the pair_style hybrid for my simulation. The version on my computer works fine, but after I change to a very new version of lammps on another computer, lammps shows “ERROR: Illegal pair_style command (pair_lj_cut.cpp:429)”

My program:

pair_style hybrid lj/cut 9.75 tersoff
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga As
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

what happened to lj/cut?

Regards,
Susie

Hi,

I am using the pair_style hybrid for my simulation. The version on my
computer works fine, but after I change to a very new version of lammps on
another computer, lammps shows "ERROR: Illegal pair_style command
(pair_lj_cut.cpp:429)"

sorry, but i can't reproduce this.
this input works fine with the 20 Feb 2013 version.

My program:

pair_style hybrid lj/cut 9.75 tersoff
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga As
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

what happened to lj/cut?

nothing. it hasn't been touched outside of whitespace changes for
almost two years.

axel.

Hi Axel,

Thank you for replying!

Here is my whole related program:

Initialization

dimension 3
boundary p p f
units metal
newton on

atom_style atomic

Structural Definition

lattice fcc 5.65315
read_data data.GaAs

Force field definition

pair_style hybrid tersoff lj/cut 9.75
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga As
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

I am using openmpi on a supercomputer, but I am not the one who compiles it. Is it possible that the problem happens due to the compile process?

Regards,
Susie

Hi Axel,

Thank you for replying!

Here is my whole related program:

hi susie,

that doesn't help.

# Initialization

dimension 3
boundary p p f
units metal
newton on

atom_style atomic

# Structural Definition

lattice fcc 5.65315
read_data data.GaAs

# Force field definition

pair_style hybrid tersoff lj/cut 9.75
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga As
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

I am using openmpi on a supercomputer, but I am not the one who compiles it.

but you see which version of lammps you are using when you run it.
this information is still missing, so it is difficult to relate this
to an bug that may have been fixed (or not).

Is it possible that the problem happens due to the compile process?

no. at the moment the most likely hypothesis is that you have a
non-ASCII character in your input which can confuse the parser. the
second most likely option would be that you have a version of lammps
that has a bug that has been fixed since.

pair_style hybrid tersoff lj/cut 9.75
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga As
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

btw: there is a *serious* problem with this model. you override all
interactions to atom type 7 (and the comments hint that it should
represent carbon), however, this atom type is not set to NULL in the
tersoff coefficient line. that will override the pairwise
interactions, but *not* the manybody terms that involve atom type 7
and thus is giving you an inconsistent and probably unphysical model.

note this has nothing to do with the syntax issue, but is -in fact-
more serious.

axel.

Hi Axel,

Thank you so much for your advice on my program!

The version I am using is lammps-28Oct12 which is compile as lmp_serial, and the version I am trying to use on the supercomputer is 2012-02-20 which is compile as

- lmp_openmpi    OpenMPI and FFTW3 with default packages.

Regards,
Susie

Hi Axel,

Thank you so much for your advice on my program!

The version I am using is lammps-28Oct12 which is compile as lmp_serial, and
the version I am trying to use on the supercomputer is 2012-02-20 which is
compile as

but this is contradicting what you wrote in your original post.
neither version is very new and the version on the external machine is
much older (february instead of october) than the one on your local.
it works with the current version so i would recommend to tell the
people running the external machine that they are providing a version
with a bug that has since been fixed.

axel.

Hi Axel,

Thank you so much for your advice on my program!

The version I am using is lammps-28Oct12 which is compile as lmp_serial, and
the version I am trying to use on the supercomputer is 2012-02-20 which is
compile as

but this is contradicting what you wrote in your original post.
neither version is very new and the version on the external machine is
much older (february instead of october) than the one on your local.
it works with the current version so i would recommend to tell the
people running the external machine that they are providing a version
with a bug that has since been fixed.

in addition, please make sure that you provide your input in plain
ASCII. this is increasingly often not the case with modern operating
systems that use UTF-8 encoding instead. UTF-8 contains characters
that *look* very closely like their ASCII counterparts so it is not
always easy to tell the difference. text mode software like LAMMPS
*expects* ASCII encoding and thus will fail to parse such non-ASCII
characters incorrectly. typical characters where this may happen are
decimal points or whitespace (there are different width blanks, but
ASCII only knows one of them).

axel.

Hi Axel,

Thank you for your remind about the ASCII. I tried to use vi command to write a in file in the supercomputer, but still failed. All the command before pair_style works well, except pair_style, it just stopped and said ‘ERROR: Invalid pair style (force.cpp:168)’.

And I found that actually the problem lies in tersoff. I tried to use the in.tersoff and Si.tersoff in the bench files in lammps, but still failed.

bulk Si via Tersoff

units metal
atom_style atomic

lattice diamond 5.431
Lattice spacing in x,y,z = 5.431 5.431 5.431
region box block 0 20 0 20 0 10
create_box 1 box
Created orthogonal box = (0 0 0) to (108.62 108.62 54.31)
2 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 32000 atoms

pair_style tersoff
ERROR: Invalid pair style (force.cpp:168)

Do you have any idea about this?

Regard,
Susie

One more question:

After I set NULL in tersoff:

pair_style hybrid tersoff lj/cut 9.75
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga NULL
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

LAMMPS show that: ERROR: All pair coeffs are not set(pair.cpp:168)

But I have not idea what’s wrong with it?

Susie

One more question:

After I set NULL in tersoff:

pair_style hybrid tersoff lj/cut 9.75
pair_coeff * * tersoff GaAs.tersoff As Ga As Ga As Ga NULL
pair_coeff 1 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 3 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 5 7 lj/cut 0.0187 3.5355 #As-C
pair_coeff 2 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 4 7 lj/cut 0.015 4.266 #Ga-C
pair_coeff 6 7 lj/cut 0.015 4.266 #Ga-C

LAMMPS show that: ERROR: All pair coeffs are not set(pair.cpp:168)

But I have not idea what's wrong with it?

the code just told you. what is the interaction of atom type 7 with itself.
before asking questions like this please *always* refer to the documentation.
http://lammps.sandia.gov/doc/Section_errors.html

thanks,
    axel.

Hi Axel,

And I found that actually the problem lies in tersoff. I tried to use the
in.tersoff and Si.tersoff in the bench files in lammps, but still failed.

# bulk Si via Tersoff

units metal
atom_style atomic

lattice diamond 5.431
Lattice spacing in x,y,z = 5.431 5.431 5.431
region box block 0 20 0 20 0 10
create_box 1 box
Created orthogonal box = (0 0 0) to (108.62 108.62 54.31)
  2 by 2 by 2 MPI processor grid
create_atoms 1 box
Created 32000 atoms

pair_style tersoff
ERROR: Invalid pair style (force.cpp:168)

Do you have any idea about this?

for error messages please always first refer to the lammps documentation.
this is a question that you should be able to answer by yourself. if
you cannot find a solution in the manual or don't understand the
explanations given there, you can always search through the mailing
list archives. questions like these have been answered many times in
the past already. so there is no need to ask them again except in very
rare cases.

it looks like the executable does not contain the manybody package.
since we have already determined, that that version is obsolete
anyway, i don't understand why you keep trying to use it.

axel.