Help regarding pair_style hybrid and pair coefficients related to it

I want to establish 3 different pair style

  1. EAM alloy between Al and Cu(1 and 2 respectively)
  2. Morse potential between Al and C(1 and 3)
  3. Morse potential between Cu and C(2 and 3)

I tried using the below-mentioned code but it gives an error
ERROR: Pair coeff for hybrid has invalid style (src/pair_hybrid.cpp:481)

pair_style hybrid eam/alloy morse 2.05 morse 4.15
pair_coeff * * eam/alloy AlCu.eam.alloy Al Cu NULL
pair_coeff 1 3 morse 0.0486 1.29 4.15
pair_coeff 2 3 morse 0.087 5.14 2.05

Kindly help me in rectifying this,

Regards
Shekhar

In the future please use a more descriptive subject line so that people looking answers to previous problems can easily decide whether this is a discussion worth looking at.

You don’t need to list the Morse potential twice since the cutoff can be set with the pair_coeff command for each pair of atom types individually. If you do, then you have to adapt those pair_coeff commands so that LAMMPS can tell which settings applies to which Morse potential instance.

Thank you for the reply, I changed the second morse potential to morse/smooth/linear and the error was resolved but when I run the following updated code it gives another error

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

The updated code is
pair_style hybrid eam/alloy morse 2.05 morse/smooth/linear 4.15
pair_coeff * * eam/alloy AlCu.eam.alloy Al Cu NULL
pair_coeff 1 3 morse/smooth/linear 0.0486 1.29 4.15
pair_coeff 2 3 morse 0.087 5.14 2.05

Kindly tell me the mistake.

@akohlmey

What you did is an ugly hack and shows that you have not understood how pair style hybrid works.
Why not just list the morse potential only once?

The error message you see is independent of that and correct. You have not assigned coefficients for all pairs of interactions. You can easily verify that by using the info coeffs command.

I apologize for my behavior, I changed it and it is working now. Thank you for the guidance.

Updated code
pair_style hybrid eam/alloy morse 2.05
pair_coeff * * eam/alloy AlCu.eam.alloy Al Cu NULL
pair_coeff 1 3 morse 0.0486 1.29 4.15
pair_coeff 2 3 morse 0.087 5.14 2.05
pair_coeff 3 3 none

@akohlmey