Using Create_bonds command to generate bonds

Hey LAMMPS developers,

I was trying to generate a sheet of graphene in the simulation box. I have all the coordinates of the the carbon atoms, and what I wanted to do was using “create_bonds” command to generate bonds between atoms, to save the trouble of generating bonds list in the data file. See this: http://lammps.sandia.gov/doc/create_bonds.html

But it gives me an error message of:

ERROR: All pair coeffs are not set (…/pair.cpp:218)

Here’s part of my input script:

#Initialization
units real
boundary p p f
atom_style full
bond_style harmonic
pair_style lj/cut 2.5

#Atom definition
read_data data.graphene
create_bonds all all 1 1.3 1.5
pair_coeff 1 1 1.0 1.0

And my data file header.

200 atoms
0 bonds
0 angles
0 dihedrals
0 impropers

1 atom types
1 bond types

0 12.3 xlo xhi
0 21.3042 ylo yhi
-2 10 zlo zhi

Masses

1 12.011

Bond Coeffs

1 80.0 1.42

Greatly appreciate your help! Thanks in advance!

Qizhang Jia
DuBay research group
University of Virginia

Hey LAMMPS developers,

I was trying to generate a sheet of graphene in the simulation box. I have
all the coordinates of the the carbon atoms, and what I wanted to do was
using “create_bonds” command to generate bonds between atoms, to save the
trouble of generating bonds list in the data file. See this:
http://lammps.sandia.gov/doc/create_bonds.html

this will create *even more* trouble, since it cannot generate the
necessary angles and dihedral angles.

But it gives me an error message of:

ERROR: All pair coeffs are not set (../pair.cpp:218)

well, it means just what it says. your pair coefficients are not yet
set, but it is required for the bond creating process to have a
"runnable" system.
you set the coefficients only later in the input, but LAMMPS processes
its input line-by-line.

if you *really* want to save yourself some troubles, think about using
a tool like this:
http://www.ks.uiuc.edu/Research/vmd/plugins/nanotube/
VMD can write out the generated topology/geometry directly via the
topotools plugin.

axel.

See the create_bonds doc page. It explains what must be defined

before you use that command, which includes pair_style info.

You can always reset the pair style after you have created the bonds.

Steve