[lammps-users] Pair-Angle-Bond coeff in data file

Hi dear all,

I’m currently trying to build a Tip4p model on lammps and I’m stuck: I’ve looked at examples provided by lammps such as peptide and the Pair Angle and Bond coeff are written in the data file. I don’t understand the order of the arguments, which differs from the one in the input file: in the input file, for a pair coeff command for example, we indicate the 2 atoms for which we have the values, such as 1 1, 1 2 or 2 2 for H and O for example. Thus, the following values of the line describe the interaction between those 2 atoms.
But in the data file, there is no such thing, there is only the first number of the line that seems to indicate the value of an atom or bond? But I don’t get how it works… The documentation does not provide much details since the order of the arguments are indicated for the lines in the input file only from what I’ve seen…

Thanks!

Hi dear all,

[…]

The documentation does not provide much details since the order of the arguments are indicated for the lines in the input file only from what I’ve seen…

you haven’t looked in the right place. the data file format is described in great detail in the documentation of the read_data command. https://docs.lammps.org/read_data.html#format-of-a-data-file

Under Pair Coeffs it says:

The number and meaning of the coefficients are specific to the defined pair style. See the pair_style and pair_coeff commands for details. Since pair coefficients for types I != J are not specified, these will be generated automatically by the pair style’s mixing rule. See the individual pair_style doc pages and the pair_modify mix command for details. Pair coefficients can also be set via the pair_coeff command in the input script.

and there also is PairIJ Coeffs as an alternative:

This section must have N*(N+1)/2 lines where N = # of atom types. The number and meaning of the coefficients are specific to the defined pair style. See the pair_style and pair_coeff commands for details. Since pair coefficients for types I != J are all specified, these values will turn off the default mixing rule defined by the pair style. See the individual pair_style doc pages and the pair_modify mix command for details. Pair coefficients can also be set via the pair_coeff command in the input script.

I think that explains it pretty well.

Axel.