[lammps-users] data file format

Dear All,

Atoms section in the data file, What format should be written (column by column)?

Thanks a lot.
Yasti

Depends on what kind of atoms you have. Read the documentation for the read_data command to find out.

–AEI

Thanks a lot for your reply.

I’ve written lennard-jones pair coeffs in the data file and want to enter tersoff coefficients to it.
How do I enter tersoff coefficients?

Masses

1 1.008 # H for water
2 15.9994 # O for water
3 12.0010 # C for carbon

Pair Coeffs

1 0.000 0.0000000 0.000 0.0000000 # H for water
2 0.1020 3.188000 0.1020 3.188000 # O for water
3 … # C for carbon

Many thanks.
Yasti

Thanks a lot for your reply.

I've written lennard-jones pair coeffs in the data file and want to enter
tersoff coefficients to it.
How do I enter tersoff coefficients?

you cannot. tersoff parameters are read from a file
and use a different mechanism to match atom types
with parameters. that data file scheme assumes pairwise
potentials and that does not apply to tersoff..

axel.

If you want to read the tersoff parameter, you would have to create a file just like potentials/SiC.tersoff.

I read the manual, it telling us that how to write pair coeffs for one pair_style to data file, but it not telling how to write pair coeffs for pair_style hybrid which has been used it one file such as SiC.Tersoff and pair coeffs for lj/charmm/coul/long. i tried to write lj/charmm/coul/long pair coeffs to data file and write pair_coeffs * * tersoff SiC.tersoff NULL NULL C to input script file. but gives error : Pair coeff for hybrid has invalid style

input script :


region A block -10 10 -10 10 -10 10
bond_style harmonic
angle_style charmm
pair_style hybrid lj/charmm/coul/long .7 1 tersoff
read_data wn.data
pair_coeff * * tersoff SiC.tersoff NULL NULL C
kspace_style pppm 1e-4

and data file :


3 12.0010 # C for carbon

Pair Coeffs

1 0.000 0.0000000 0.000 0.0000000 # H for water
2 0.1020 3.188000 0.1020 3.188000 # O for water
3 0.0000 0.0000 0.0000 0.0000 # C for carbon

Atoms

1 1 1 0.417 2.560 3.993 2.561 # H

Many thanks,
Yasti

I read the manual, it telling us that how to write pair coeffs for one
pair_style to data file, but it not telling how to write pair coeffs for
pair_style hybrid which has been used it one file such as SiC.Tersoff and
pair coeffs for lj/charmm/coul/long. i tried to write lj/charmm/coul/long
pair coeffs to data file and write pair_coeffs * * tersoff SiC.tersoff NULL
NULL C to input script file. but gives error : Pair coeff for hybrid has
invalid style

for pair style hybrid you have to prefix coefficients with the
pair style they belong to. it is much better and easier to put
_all_ pair coefficients into the input file. i usually put them into
a separate file "params.project" and then use "include params.project"
right after "read_data data.project" to read them in.

cheers,
   axel.