I had been attempting to use read_data with mixing rules to apply one pair style and then replace a certain subset of pair interactions with a different pair style. (See the abbreviated input files below). However, I see the error “All pair coeffs are not set (pair_hybrid.cpp:505).” Inspection of the array with GDB shows that only the interactions specified by pair_coeff outside of the datafile are set. I suspect I may be specifying Pair Coeffs in my datafile improperly. Am I missing arguments in the datafile? Or does one have to specify every set of pair interactions when using a pair_style hybrid? I have 17 site types, and would like to avoid specifying these interactions.
Assuming your 2 pair styles do mixing themselves, then
you don't have to specify cross terms within each sub-style.
But you do have to explicitly specify all cross terms
that involve both sub-styles. Your list below does not
include 2-to-14 crossed with 15-to-17. Note that you
can do something like:
I’ve added the cross terms to define the interactions between atoms belonging to different pair styles, as shown below (essentially an excluded volume interaction):
However, I still see the error saying that not all pair_coeffs are set (pair_hybrid::init_one()). Further investigation shows that, even if I define the 1,2 interaction, the 2,1 interaction is not set (setflag[i][j] = 0).
I’ve tried to add the 2,1 interaction manually but pair_lj_cut.cpp() tells me that I have “Incorrect args for my pair coefficients.”
What else needs to be done to ensure that the (i > j)th pair interactions are set?
Interactions with i > j are never set in the input script, for any pair style.
Nor is init_one() called with i > j. Please post all your pair commands if
you still have problems.