Hello everyone
I got this below error
ERROR: Numeric index 1 is out of bounds (1-0) (src/MOLECULE/bond_harmonic.cpp:128)
Last command: bond_coeff 1 8.0 1.2
Please anybody can help
and this my input script
First off, if you want help with using LAMMPS you need to post to one of the LAMMPS categories. I saw your post only by accident and then recategorized it.
Second, your problem happens because you didn’t reserve space for having bond types when you created your simulation box. This is how LAMMPS works, when you create the simulation box certain properties (like atom style) and internal array sizes are locked and cannot be changed unless you restart LAMMPS. This is explained in the documentation for the create_box command — LAMMPS documentation
Besides, your input only creates atoms but no bonds, so there is no point in defining a bond style and bond coeffs. Similarly, you use atom style angle, which does not support dihedrals, yet your input defines a dihedral style. These are all problems causing LAMMPS to abort for reasons that are explained in the manual. Futhermore, this looks like you were using cut-n-paste to put different pieces of input together. The bond parameters (and using a bond type 5!!) look very unreasonable for reduced units. Similarly the neighbor list skin.
You will continue to run into all kinds of (unexpected) problems if you don’t build your inputs in a more sane way by starting with an empty file and then add individual lines after reading the corresponding documentation carefully so you know well what that does and then run to see if that produces the expected result and then add the next line and so on.
Please follow the forum and mailing list etiquette that new questions (and this one is not really an answer to the original post) are posted as a new question with a suitable topic. It will make it easier for people that come later to find the answer and increases your chances to get a response sooner.
Yes, you can reserve space for extra bond types with the read_data and create_box commands. For details please study the corresponding pages in the manual.