How to hybride lj potential and CVFF force field

I have been trying to use pair_style to mix LJ and CVFF force fields, but it keeps reporting errors in bond coeff, I don’t know how to solve it, I hope you can help me to see where the in file is wrong or the parameter settings are wrong.

You are trying to set the parameters of the bonds of type 1, and LAMMPS is complaining that ‘type 1’ is out of bound, meaning that no space for bonds of type 1 were previously allocated.

In your case, the space for bonds of type 1 should be allocated when creating the box, see this page for details.


Simon,thanks for your help.
I will try your advice!!!

There is no need to use a hybrid pair style for this. You can just use lj/cut/coul/long for both, for as long as the atoms where you want the LJ interactions only have a charge of 0.0

Which means that the error has nothing to do with the pair style.

Please note that your input is mixing up the order of commands in a way that is not practical.
Usually, you would put all “style” commands first and then the read_data command, which will include the creation of the simulation cell, which then will make the create_box command redundant. As are the mass commands redundant, when the same info is already set in the data file.

Akohlmey, I much appreciate your suggestions, i will take it in my simulation. For your second reply,I just remember this error should be avoided,thanks again for your notice.
But there is a quesstion makes me wonder:
1.Why lj/cut/coul/long can works same as hybrid lj/cut lj/cut/coul/long when the charge equal to 0.0?
I just started using Lammps for a short time,could you please explain my doubt,thank you!

pair style lj/cut/coul/long is the same as pair style lj/cut plus pair style coul/long, if charges of atoms are 0.0 there is no energy and force from coul/long. Thus lj/cut/coul/long yields the same forces and energies as lj/cut for all atoms with charge 0.0.

I get it!!! You are a very nice person !
I remember the knowledge!!1