Pair mixing between two different data file with the same potential assigned

Hi, LAMMPS community,
I would like to make a model to compute the absorbtion energy of a solvated peptide on a gold surface. I am reading separately two data file, the former contains the solvated peptide and the latter contains the gold particle but i have problems setting the mixed pair coefficient, even though in both cases I consider lj/charmmfsw/coul/long.
The documentation wasn’t clear to me in this scenario.

I leave here the input data file and the txt file printed with info_coeff. (364.6 KB)
systemtrans.lmpdat (30.5 KB)
info_coeff.txt (3.4 KB)


What you mean by setting the mixed pair coefficient? Do you mean the LJ interaction coefficients between atoms of type i and atoms of type j?

1 Like

I don’t know the interaction coefficients between gold and the other molecules in the system. From literature (INTERFACE MD | INTERFACES LABORATORY), I understood that it was possible to combine charmm parameter for biomolecules and lennard jones parameter for the metals with standard combination rule.

Please always report which LAMMPS version you are using!

I don’t see any problems with the mixing of pair coefficients.
If I add a run 0 to your quoted input I get with the latest LAMMPS version (3 Aug 2022):

Generated 13 of 91 mixed pair_coeff terms from arithmetic mixing rule
ERROR: All bond coeffs are not set (src/bond.cpp:85)

So the problem is not the mixing of the pair coefficients, but that you needlessly reserve an extra bond type in the first read_data command, but never provide any bond coefficient data for it. This is confirmed by looking at the info_coeffs.txt file. After removing that unused bond type, the run 0 command can proceed and compute the systems energy.

However, there are other, quite serious problems:

WARNING: System is not charge neutral, net charge = 195.16 (src/kspace.cpp:327)

This is very bad. Systems with long-range coulomb should be neutral or at best within less than one charge unit away from it to reduce errors. LAMMPS will continue to run, but the validity of the results is questionable. You should check on the charge assignments or include a suitable number of counter ions (and solvent?) to make your system neutral.

WARNING: Bond/angle/dihedral extent > half of periodic box length (src/domain.cpp:940)

That suggests that there may be something incorrect with your topology data.

Similarly, your potential energy for the non-bonded interactions and bonds is extremely high:

   Step          Temp          E_pair         E_mol          TotEng         Press     
         0   0              1.1019126e+11  3528348.7      1.1019478e+11  4.3144838e+11

That suggest that there is something not quite right with the geometry, possibly with the box information. You should probably check out each data file independently before combining them.
To avoid issues with the read_data command expanding your box unexpectedly, I also strongly suggest to make certain that both data files have the same box sizes.

1 Like

Thank you for your support! Thank you also for the other suggestions. I will fix all these errors.
However, I still get this warning.

WARNING: Not all mixed pair coeffs generated from mixing. Use write_data with ‘pair ij’ option to store all pair coeffs. (src/write_data.cpp:312)

Indeed, in the info coeff no interaction is computed between gold and other molecules.
Is it a problem?

This is a different kind of warning. You have to read it carefully. It says that your have input some mixed pair_coeff parameters explicitly. However you write out a data file where you only write out the “i i” pair coefficient (i.e. one set of parameters per atom type). If you read back the data file, you now must create all mixed terms from the mixing rules and cannot retain the mixed parameters originally read from the data file. Hence the suggestion to use the “pair ij” option to write out all pair coeff parameters, including all mixed ones. Please read up on this in the write_data command documentation and also study the difference between a “Pair Coeffs” and “PairIJ Coeffs” section in the data file as discussed in the documentation of the read_data command.

1 Like

It doesn’t say there is no interaction computed, it only says there are no explicit pair coefficients.
As you saw from my previous message quoting the output, those are exactly the 13 pair coefficients settings that are generated from mixing.

If there was not interaction computed - say when you would use a pair style that does not support generating missing terms from applying mixing rules to pair coefficients - then a run 0 command will fail.

1 Like

Thanks for your precious help!