hybrid pair_style, potential energy

Hello all,

I want to simulate an indentation (Carbon on Nickel). I divided each block into three atoms types.
1*3: Ni (eam/alloy)

4*6: C (rebo)

but I have some problem using pair_style hybrid.I’m using the following lines to do so:
(the file that I’m using for Ni works correctly, and please don’t mention its reliability.)

pair_style hybrid eam/alloy rebo lj/cut 6

pair_coeff * * eam/alloy Ni.lammps.eam.alloy Ni Ni Ni NULL NULL NULL

pair_coeff * * rebo CH.airebo NULL NULL NULL C C C
pair_coeff 3 4 lj/cut 0.1 2.138

Later the code calculates the potential energy per atom and dump it:

compute pea all pe/atom

fix OUT all ave/atom 1 {ouTme} {ouTme} c_pea
dump 1 all custom ${ouTme} dump.lammpstrj id type xs ys zs f_OUT

The output (attached to this email) shows that there is a problem either with the method I’m using the potential energy, or its extraction, or both.

Is there any obvious problem in the code, I’m missing?

Thanks in advance,
Soheil

PS_1. The temperature is held at 300 K. and I’m using LAMMPS 64-bit 2014.05.19.
PS_2. The attached snapshot shows the potential energy of the system in the range of (red: 0 eV, blue:-7.7eV)

c-ni.jpg

Hello all,

I want to simulate an indentation (Carbon on Nickel). I divided each block
into three atoms types.
1*3: Ni (eam/alloy)
4*6: C (rebo)

but I have some problem using pair_style hybrid.I'm using the following
lines to do so:
(the file that I'm using for Ni works correctly, and please don't mention
its reliability.)

pair_style hybrid eam/alloy rebo lj/cut 6
pair_coeff * * eam/alloy Ni.lammps.eam.alloy Ni Ni Ni NULL NULL NULL
pair_coeff * * rebo CH.airebo NULL NULL NULL C C C
pair_coeff *3 4* lj/cut 0.1 2.138

Later the code calculates the potential energy per atom and dump it:

compute pea all pe/atom
fix OUT all ave/atom 1 \{ouTme\} {ouTme} c_pea
dump 1 all custom ${ouTme} dump.lammpstrj id type xs ys zs f_OUT

The output (attached to this email) shows that there is a problem either
with the method I'm using the potential energy, or its extraction, or both.

Is there any obvious problem in the code, I'm missing?

​there is far too little information here to make any statement. it is not
clear why that image is an indication of a problem. ...and what makes you
think the problem is with the lines you quoted and not the rest of the
input?

axel.

Axel, instead of explaining that figure, I think it would be much easier if I do it in this way.

Here is two simple codes which are different in this way:
1- The first code has one atom type and use eam/alloy to calculate the potential energy (which does it in an expectable, normal way).
2- The second one has two types of atoms, however, just atom type one are created (therefore, the created model is exactly as the other case). And it uses a hybrid pair_style. But because there is no atom type two, only the eam/alloy potential should work to calculate the potential energy (or at least, that’s what I could find out from the document). However, the result is wrong. This is not what I think, this is what it is.

So, obviously, I’m doing or there is something wrong that I cannot see. If you see what is wrong here, please let me know.

Soheil

CODE 1:

package omp * force/neigh
dimension 3
boundary p p s
units metal
atom_style atomic
lattice fcc 3.52
region box block 0 10 0 10 0 10 units lattice
create_box 1 box

region substrate block INF INF INF INF INF INF

create_atoms 1 region substrate
pair_style eam/alloy

pair_coeff * * NiAlH_jea.eam.alloy Ni
velocity all create 300 123456789

fix 1 all nve
fix 2 all temp/berendsen 300 300 10
compute pea all pe/atom
fix OUT all ave/atom 1 10 10 c_pea
dump 1 all custom 10 dump.lammpstrj id type xs ys zs f_OUT
run 10

CASE 2:

package omp * force/neigh
dimension 3
boundary p p s
units metal
atom_style atomic
lattice fcc 3.52
region box block 0 10 0 10 0 10 units lattice
create_box 2 box

mass 2 12
region substrate block INF INF INF INF INF INF

create_atoms 1 region substrate
pair_style hybrid eam/alloy rebo lj/cut 0

pair_coeff * * eam/alloy NiAlH_jea.eam.alloy Ni NULL
pair_coeff * * rebo CH.airebo NULL C
pair_coeff 1 2 lj/cut 0.0 0.0
velocity all create 300 123456789

fix 1 all nve
fix 2 all temp/berendsen 300 300 10
compute pea all pe/atom
fix OUT all ave/atom 1 10 10 c_pea
dump 1 all custom 10 dump.lammpstrj id type xs ys zs f_OUT
run 10

Axel, instead of explaining that figure, I think it would be much easier
if I do it in this way.

Here is two simple codes which are different in this way:
1- The first code has one atom type and use eam/alloy to calculate the
potential energy (which does it in an expectable, normal way).
2- The second one has two types of atoms, however, just atom type one are
created (therefore, the created model is exactly as the other case). And it
uses a hybrid pair_style. But because there is no atom type two, only the
eam/alloy potential *should* work to calculate the potential energy (or at
least, that's what I could find out from the document). However, the result
is wrong. This is not what I think, this is what it is.

i don't see anything wrong. i get the same energies in thermo output and
identical dump files after accounting for the different order of atoms.

​axel.​

Thanks a lot Axel.

Soheil