error with lattice command

Hi Everyone,

I wrote an in.* file to define the topology of my lattice, a part of my
file is as follows:

Hi Everyone,

I wrote an in.* file to define the topology of my lattice, a part of my
file is as follows:

#################################################################
# 2D NiMn shear simulation

units lj
atom_style atomic
dimension 2
boundary p s p

variable a equal 1.0
variable b equal 0.8

lattice custom 1.0 a1 a 0 0 a2 0 b 0 &
                  basis 0 0 0 basis 0.5 0.5 0.5 orient x a b 0
###################################################################

but i got error msg: illegal lattice command. Can anyone give me
suggestions on correcting this error?

you don't seem to be using variables correctly.
you need to prefix them with a $ sign to expand them.
if i do that, your lattice command works just fine.

see the documentation for the variable command for more details.

axel.

Dear Axel,

Thanks for your answer.

but if i make my script simple (remove variable command) as

Dear Axel,

Thanks for your answer.

but if i make my script simple (remove variable command) as

##################################################################
units lj
atom_style atomic
dimension 2
boundary p s p

lattice custom 1.0 a1 1.0 0 0 a2 0 0.8 0 &
                  basis 0 0 0 basis 0.5 0.5 0.5 orient x 1.0 0.8 0
###################################################################

this still gives me the same error msg.

not for me. do you use a current version of LAMMPS?

axel.