Error in "pair coefficient"

Hello, sir
I have built a model Cu Coated SWCNTs in Al-Cu-Mg Metal Matrix Composite using ATOMSK. Now while defining interatomic potential, I used ‘hybrid_overlay’ as “pair_style”” as it is a many body problem. But when using “pair_coeff”, I am getting error during compilation.

My code here:

Error I am getting:

Additionally,
I am also getting error while defining potential for Al-Cu-Mg interactions. I have used different potential but getting error.
• Firstly I used “CuAgAuNiPdPtAlPbFeMoTaWMgCoTiZr_Zhou04.eam.alloy” file:

pair_coeff * * eam/alloy CuAgAuNiPdPtAlPbFeMoTaWMgCoTiZr_Zhou04.eam.alloy Al Cu Fe NULL

Error:

• Secondly I used “2012–Jelinek-B-Groh-S-Horstemeyer-M-F-et-al–Al-Si-Mg-Cu-Fe” files. Here is my commands but I am getting error again.

pair_coeff * * meamf Al Cu Mg NULL
pair_coeff * * meam Al Cu Mg NULL meam.alsimgcufe Al Cu Mg NULL

Please help me out.
Thanks in Advance.

Hi,

The logic of what you are doing is a bit suspicious to me: You first use airebo for the carbon atoms only, and then you use the BOP potential for the C-Cu interaction (according to your comment), but you only apply it to the carbon atoms? Also, even if you were to apply BOP to C and Cu correctly, are airebo and BOP compatible?

On the side note, the error you are reporting is because the pair_coeff you wrote is not correctly formatted for pair hybrid (look at the two previous pair_coeff, they are correct!)

Finally, please don’t copy images of your error messages, copy directly the errors.

Simon

Hello,Simon
Thanks for responding.
Sorry for my mistake. The BOP potential I stated is for “C-Cu” interaction. I mistakenly deleted Cu while rewriting the code.
For Cu-Cu interaction, I tried the following codes as per your suggestion.

  1. pair_coeff * * meam Cu.meam NULL Cu NULL NULL
  2. pair_coeff * * library.meam Cu.meam NULL Cu NULL NULL
  3. pair_coeff * * library.meam Cu.meam Cu
    All of them are showing error.
    Would you kindly help me with the correct format of using “meam” and “eam/alloy” as interatomic potential as I am facing problem in both cases.

Thank you.

The same error? All 3?

No, errors are different.

  1. pair_coeff * * meam Cu.meam NULL Cu NULL NULL
    ERROR: Incorrect args for pair style meam coefficients (src/MEAM/pair_meam.cpp:241)

  2. pair_coeff * * library.meam Cu.meam NULL Cu NULL NULL
    ERROR: Expected hybrid sub-style instead of library.meam in pair_coeff command (src/pair_hybrid_overlay.cpp:65)

  3. pair_coeff * * library.meam Cu.meam Cu
    ERROR: Incorrect args for pair style meam coefficients (src/MEAM/pair_meam.cpp:204)

I have checked all the source codes multiple times. May be I am missing something.

If you feel that those error messages are not explicit enough, you can always look for very similar questions in this forum, for instance:

Xia Zhou1 · Xiaoxia Liu1 · Frederic Sansoz2 · Mengqi Shen1,
Molecular dynamics simulation on temperature and stain
rate-dependent tensile response and failure behavior of Ni-coated
CNT/Mg composites [Molecular dynamics simulation on temperature and stain rate-dependent tensile response and failure behavior of Ni-coated CNT/Mg composites | Applied Physics A]

From the paper, I have taken ideas about potentials.

  • The C–C inter-atomic interactions is simulated using the
    AIREBO
  • The C–Ni and Ni–Ni interaction potential parameters
    were determined using the bond-order potential

It is why I am using BOP and AIREBO simultaneously. If you have any suggestion regarding this, kindly share it.

Thank you.

That is incorrect. You should be using pair style hybrid. The hybrid/overlay style is for adding potentials for the same atom types, but in your case that would be double counting interactions.

Apart from the syntax errors you have, there is a conceptual problem. You are treating manybody potentials as if they were pair-wise additive, but they are not. So a split with different pair styles for C-C, C-Cu, and Cu-Cu interactions cannot work for the C-Cu interaction. If you have a many-body potential it not only computes interactions for pairs of atoms, but also for triples. So for C-Cu, you need to look at C-C-Cu, C-Cu-Cu, Cu-C-Cu, Cu-C-C, Cu-Cu-C, C-Cu-C interactions to get them correctly and that can only happen if all interactions between C and Cu are covered by the same pair style, e.g.

pair_coeff * * bop CCu_v2.bop.table  NULL Cu NULL C

As you have it, because of using hybrid/overlay you will compute C-C interaction with airebo and add to that the C-C interaction from bop. If you would be using pair style hybrid, then the airebo part would be wiped out by the bop setting.

Another conceptual problem is when using EAM or MEAM. The embedding term is not correctly computed when using a hybrid style since it only considers the atom types within the type assignment and the contributions from atom types assigned to other pair styles is ignored. This also applies to MEAM and EAM in the same hybrid style.

So what does make sense? Actually, very little. Ideally, you would want to use a single pair style for all elements. That would be possible with MEAM, but I am not certain there is a parameterization that has been tuned specifically for your use case, and not having “tuned” parameters with MEAM will incur significant errors in your model, same as for any other force field where you only have “generic” parameters. If the geometry of the nanotube doesn’t matter to you, you can just use fix setforce to freeze its geometry.
If you want to use AIREBO for the nanotube (which only makes sense if you do care significantly about how the nanotube geometry reacts to the surrounding metals and how you manipulate the whole system), you have the challenge of finding a suitable pairwise additive potential parameter set (e.g. lj/cut or morse) for the C- interactions. Then you could use EAM or MEAM for all the metals, but with the caveat of incorrect embedding term for the C- interaction.

Bottom line, while using pair style hybrid may look like the solution to your problems, force fields are not like lego bricks that you can put together in all kinds of ways. Each have their own restrictions and accuracy issues. As a beginner, my recommendation is to find a project that does not require skills and a level of understanding that you currently don’t posses and find a tutor that can teach you these skills. This is something that can take months to years to understand sufficiently well. The art of force field parameterization has a lot of “black magic” in it that is not obvious and easy to learn.

As I have just explained, this cannot be done without either double counting interactions or missing interactions. This study is bogus unless the authors made some complex modifications to the LAMMPS source code, and even then I would consider it very questionable.

The fact that something gets published these days, does not automatically mean that the content is trustworthy and has seen review by competent reviewers. I myself has been asked many times to review publications that I am not the least bit competent about, but because people expect I am giving generous reviews (which I don’t).

1 Like

Hello, Sir
I really want to do the project perfectly. Would you kindly suggest a tutorial that will help me understand “Force Field Parameterization ?”

Thank you

You should be looking for a competent tutor, not a tutorial. As @akohlmey said, parametrizing a force field is a fine craft that takes years to master or, at the very least, a lot of iterations of the “parametrization → simulation → analysis → feedback” cycle.

1 Like

Before you even can think about looking into force field parameterization, you have to thoroughly understand the force fields you are using, specifically how the embedding term in EAM / MEAM works and how bond order is used in Tersoff or AIREBO and then how both are affected by ignoring some atoms by applying a different force field to them. Also, you need to fully understand the different between pair style hybrid and pair style hybrid/overlay.

You won’t find a “do this, not that” kind of tutorial for these things. This you have to work out the old fashioned way by studying the relevant publications (properly! and thoroughly!) or their implementation or both.

Hello, sir
I have modified the code like this.

#Assign atom types (1=Al, 2=Cu, 3=Fe, 4=C)
mass 1 26.98 # Al
mass 2 63.546 # Cu
mass 3 23.305 # Mg
mass 4 12.01 # C

#Define interatomic potentials using hybrid
pair_style hybrid airebo 10.2 eam/alloy lj/cut 9.0 lj/cut 1.0 lj/cut 1.0

#AIREBO potential for C-C interactions
pair_coeff * * airebo CH.airebo NULL NULL NULL C

#LJ potential for Al-C, Cu-C & Mg-C
pair_coeff 1 4 lj/cut 1 0.03438 3.01
pair_coeff 2 4 lj/cut 2 0.02578 0.30825
pair_coeff 3 4 lj/cut 3 0.0027 0.35015

#EAM potential for Al-Cu-Mg interactions
pair_coeff * * eam/alloy CuAgAuNiPdPtAlPbFeMoTaWMgCoTiZr_Zhou04.eam.alloy Al Cu Fe NULL

I am getting error while reading eam/alloy potential file CuAgAuNiPdPtAlPbFeMoTaWMgCoTiZr_Zhou04.eam.alloy…

Reading eam/alloy potential file CuAgAuNiPdPtAlPbFeMoTaWMgCoTiZr_Zhou04.eam.alloy with DATE: 2018-03-30
ERROR on proc 0: Incorrect format in eam/alloy potential file! 189/2000 values (src/potential_file_reader.cpp:150)

I have read the source file. I am not getting what is the error about and how it can be solved.

The error seems rather straightforward and self explanatory to me. Your potential file format is incorrect. This is what is written.

Your file header says it should contain 2000 values yet the code only finds 189 of them and then stops. 2000 is the number of values Zhou’s potential was fitted with for Z(r) and rho(r), at least in the NIST repository version, so this makes sense.

It is very likely your file was sloppy copy-pasted instead of correctly downloaded, or modified so that it lost some info. I would advise to download it again. If the error persists then this might be a bug that requires investigation.

In the future, have a look at the documentation related to the model you are using, which is very likely to contain the information required to understand what is going on, in this case, what file format is expected.

2 Likes

It is wasteful to have multiple lj/cut pair styles, since you can set the cutoff with each pair.

These parameters seem bogus, like they were meant for different units but then incorrectly translated to the metal units settings in LAMMPS; same for the corresponding cutoffs.

1 Like