[lammps-users] use of create_atoms

Dear all,

i am having some difficulties in using create_atoms.
I have a data file that gives the coordinates of the atoms of type 1. I want now to add a second kind of atoms ,assuming type 2. Can this be done in the input file?

I have done the following but i am getting :ERROR: Illegal create_atoms command. Do i have to use the lattice command? But if i use it where is the role of random? The simulation box has been defined in the dat file

dimension 3
boundary p p p
units real

atom_style atomic
neighbor 0.3 bin
neigh_modify delay 5

######Data file######################################
read_data BUND-SWNT.dat

2010/6/15 Jim Jim <[email protected]...>:

Dear all,

i am having some difficulties in using create_atoms.
I have a data file that gives the coordinates of the atoms of type 1. I want
now to add a second kind of atoms ,assuming type 2. Can this be done in the
input file?

I have done the following but i am getting :ERROR: Illegal create_atoms
command. Do i have to use the lattice command? But if i use it where is the
role of random? The simulation box has been defined in the dat file

...and so has been the number of atom types.
does it say that you have two atoms types?
this is one of the properties in LAMMPS that can only be set once.

axel.

I have declared that there are two atom types in the dat file.

2010/6/15 Jim Jim <[email protected]...>:

I have declared that there are two atom types in the dat file.

is your lammps version up-to-date?

the random options was introduced in the may 26 patch.

a.

Yes. i have just downloaded and installed the newest.
without lattice i get
ERROR: Use of region with undefined lattice

and with lattice the previous.

2010/6/15 Jim Jim <[email protected]...>:

Yes. i have just downloaded and installed the newest.
without lattice i get
ERROR: Use of region with undefined lattice

and with lattice the previous.

i cannot confirm that.
if i define a lattice, e.g. sc 1.0,
your create_atoms command works for me.

a.

Ok. but my main question is why i should put a lattice if i want to create atoms randomly?
Thank’s again for your help.

ERROR: Use of region with undefined lattice

This error is coming from the region command, not
the create_atoms command. See the region doc
page - lattice is the default.

Steve