Hybrid/overlay pair style

Is it possible to use the MEAM and MEAM/spline potentials together?

I have tried the following implementation:

pair_style hybrid/overlay meam/c meam/spline
pair_coeff * * meam/c library.meam Ti O TiO.meam Ti O
pair_coeff 2 2 meam/spline O.meam.spline O

Where I have edited the TiO.meam file to ignore the O-O interactions.

However, I get the following error:

ERROR: Illegal pair_style command (…/pair_meamc.cpp:200)
Last command: pair_style hybrid/overlay meam/c meam/spline

Even if it would be technically possible, it is not at all advisable. You are discounting the fact that MEAM is a manybody potential and thus you cannot simply subtract and add contributions on a per atom type basis. In the case of MEAM (or EAM) each substyle will only operate on a subset of atoms and thus also collect the contributions to the embedding term for only that subset, which is obviously incorrect.

Thanks for your quick reply.

And is the implementation that I used wrong?

Yes, that too. In multiple ways.

Do you know why I get that error?

Yes

Please, could you help me? How can I implement this hybrid style?

You cannot. …and I already explained that you should not.

Let me amend my last statement that the ultimate limitation is a limitation in pair style meam/spline that will prevent you from using it the way you intend to use it, even if you address all the errors and missing pieces in those few lines of input and your LAMMPS binary.

It doesn’t happen often that a limitation of a feature in a software is a good thing and prevents people from doing something that is bad. :thinking: