Help with understanding fix bond/create

Dear lammps users
I am having a bit of trouble understanding how does fix bond/create work.
for example as a toy model just to understand how it works i want to run a small
simulation of six atoms where each atom will bond to one other atom and then change type so in the end i will have 3 pairs of bonded atoms.
In the future I will want to do a large scale simulations that uses this fix but I wanna understand the baqsics first
I try to run attached script with the attached datafile but I always get just 2 pairs and not 3 I think I am missing something about how the fix works, so my questions are :
1)How exactly should i enter the extra bonds per atom section of the data file ? when i write 1 extra bonds for atom for example it expects a bond in the Bonds section .should i specify in the Bonds section in the data file the possible bonds that could be created ?
3)on some try’s I got the error 1-3 bond count is inconsistent how can, at some point in my full simulations I would want to have lots of atoms that can have more then one bond. how do you fix this inconsistency ?

Thank you very much and I apologize for the silly questions.
Tal

data.in (279 Bytes)

in.script_lammps_springs (443 Bytes)

Dear lammps users
I am having a bit of trouble understanding how does fix bond/create work.
for example as a toy model just to understand how it works i want to run a
small
simulation of six atoms where each atom will bond to one other atom and then
change type so in the end i will have 3 pairs of bonded atoms.
In the future I will want to do a large scale simulations that uses this fix
but I wanna understand the baqsics first
I try to run attached script with the attached datafile but I always get
just 2 pairs and not 3 I think I am missing something about how the fix
works, so my questions are :

your test input is very unusual, so you may be hitting issues that are
unexpected.
1) your choice of rmin is very large compared to the distribution of
atoms. normally atoms would not be within reach of rmin at the very
beginning of a simulation
2) your initial geometry has no bonds at all. fix bond create is
commonly used in systems that already have bonds. you need at least
one bond, so that the corresponding structures are initialized.

i would suggest to redesign your tests to be closer to a typical
simulation scenario and then check again.

axel

axel.

Hi Axel
Thank you very much doing a more realistic example solved a lot of the the problems I had, but I am still unsure of a couple of things.
I want to simulate a system of X particles without any interaction(at first later I would want to add a Langevin thermostat) that can create bonds and break bonds, my questions are the following :

  1. I want the systems to not have any bonds or just one or two bonds, when I put in my data file “3 extra bonds per atom” do I need to also specify which bonds when i don’t write at least 6 bonds in the bond section i get an error.
  2. is there an option to exclude an atom that has achieved the maximum number of bonds ? i.e if for some atom 3 bonds were already created can I tell the fix to ignore it ? for some of my simulations i very quickly get that “New bond exceeded bonds per atom in fix bond/create”
  3. If fore example i set the fix bond create as : fix create_bond all bond/create 10 1 1 2.5 1 iparam 3 2 jparam 3 2 so that the atom type changes after the bond create then i shouldn’t reach the maximum number of bonds since after one bond it changes the type of both atoms in the bond, but I still do get error message.
  4. In general I would be glad to hear about any advice on how to do such a simulation since I think that I am way off in the way I am thinking about it now.
    I attach a small script and an input file.
    Cheers and thank you for all your help!
    Tal

data_T.in (1.15 KB)

in.script_lammps_springs (819 Bytes)

Hi Axel
Thank you very much doing a more realistic example solved a lot of the the
problems I had, but I am still unsure of a couple of things.
I want to simulate a system of X particles without any interaction(at first
later I would want to add a Langevin thermostat) that can create bonds and
break bonds, my questions are the following :

I want the systems to not have any bonds or just one or two bonds, when I
put in my data file "3 extra bonds per atom" do I need to also specify which
bonds when i don't write at least 6 bonds in the bond section i get an
error.
is there an option to exclude an atom that has achieved the maximum number
of bonds ? i.e if for some atom 3 bonds were already created can I tell the
fix to ignore it ? for some of my simulations i very quickly get that "New
bond exceeded bonds per atom in fix bond/create"
If fore example i set the fix bond create as : fix create_bond all
bond/create 10 1 1 2.5 1 iparam 3 2 jparam 3 2 so that the atom type changes
after the bond create then i shouldn't reach the maximum number of bonds
since after one bond it changes the type of both atoms in the bond, but I
still do get error message.
In general I would be glad to hear about any advice on how to do such a
simulation since I think that I am way off in the way I am thinking about it
now.

if you need to create and remove bonds frequently, then you may be
better off implementing your model as a custom pair style. several of
the pair styles in the MANYBODY package do have implicit bonds. it
will require some deeper digging into how those styles are implemented
though.

it might be helpful, if you could give a bit more general description
of what you want to achieve and what your model is supposed to
represent.

axel.