Molecule auto special bond generation overflow error

hi,
I have been trying to run the below attached input script in August-2024 version of LAMMPS, which throws an error {ERROR: Molecule auto special bond generation overflow error}
I have gone through previous discussions and made the changes in the input script accordingly but could not figure out, Please kindly help.

Thanks in Advance,
Raman

in.lmp (727 Bytes)
in.dat (201 Bytes)

Which changes did you make?

in1.lmp (692 Bytes)
Above one was my initial input script which also has the same error

moltest.in (417 Bytes)
looking at this example I tried to simulate a much simpler system which I was refering above.
btw the example runs fine :thinking:

Thanks

Couldn’t you just tell me what you changed and why? That makes it much easier to help than trying to reverse engineer it and guess your reasoning.

How to provide help, when the provided files don’t match what you write in your post?
I get the following error:

ERROR on proc 0: Cannot open molecule file in_1.dat: No such file or directory (src/molecule.cpp:143)
Abort(1) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 1) - process 0

Hi Axel,
I apologize for the late reply and miscommunication.
using the input script below, I am trying to create a self propelled Rod with bonds attached, by using molecule command which throws an error :
"ERROR: Invalid bond type in Bonds section of molecule file"
in_1.dat (249 Bytes)

variable f equal 10
dimension 2
units lj
atom_style hybrid molecular dipole
region simbox block -21 21 -21 21 -0.1 0.1
create_box 2 simbox
#create_box 2 simbox bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
molecule rod in_1.dat
create_atoms 0 random 1 67865 simbox mol rod 32332 overlap 1.0
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
mass * 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
bond_style harmonic
bond_coeff 1 100.0 1.0
special_bonds fene
comm_modify cutoff 5
fix 1 all rigid/small molecule langevin 1.0 1.0 0.7 564302
fix 2 all propel/self dipole ${f}
fix 3 all enforce2d
timestep 0.0001
thermo 10000
dump movie all atom 500 ./dump_f_${f}.dat
run 10000000

inorder to resolve the above invalid bond error, I used “bond/types 1” in the create_box command as shown in the script below. However, it throws the error:
“ERROR: Molecule auto special bond generation overflow” .

dimension 2
units lj
atom_style hybrid molecular dipole
region simbox block -21 21 -21 21 -0.1 0.1
create_box 2 simbox bond/types 1
#create_box 2 simbox bond/types 1 angle/types 1 extra/bond/per/atom 2 extra/angle/per/atom 1 extra/special/per/atom 2
molecule rod in_1.dat
create_atoms 0 random 1 67865 simbox mol rod 32332 overlap 1.0
neighbor 2.0 bin
neigh_modify every 1 delay 0 check yes
mass * 1.0
pair_style lj/cut 1.122462048
pair_modify shift yes
pair_coeff * * 1.0 1.0 1.122462048
bond_style harmonic
bond_coeff 1 100.0 1.0
special_bonds fene
comm_modify cutoff 5
fix 1 all rigid/small molecule langevin 1.0 1.0 0.7 564302
fix 2 all propel/self dipole ${f}
fix 3 all enforce2d
timestep 0.0001
thermo 10000
dump movie all atom 500 ./dump_f_${f}.dat
run 10000000


input datafile “in_1.dat” associated with molecule command is attached above.
I am using August-2024 version of LAMMPS
Thanks in Advance
Raman

But that is only part of the solution. create_box creates a simulation box with settings for an atomic system. If you then add molecules with bonds, you need to have reserved space for the maximum number of bond types after adding all molecules, as well as bonds per atom and special neighbors. These must be set when the box is created and cannot be changed later.

So you (obviously!!) need to determine how much space you need to reserve. How many bonds could any atom have for your molecule at the most? and how many “special” neighbors, i.e. 1-2, 1-3, and 1-4 neighbors at the most?