[lammps-users] bond creation


I’m dealing with polymeric molecules. I’d like to redefine the bond connectivity of polymeric molecules after a period of dynamics simulation. For instances, I have tens of molecules with oxygen atoms and silicon atoms. After a period of dynamics simulation, I need to generate a bond between an oxygen atom and a silicon atom if their distance is less than a specified distance. I don’t need bond breakage. Is there any useful command for bond creation in LAMMPS? Is there anyone having experience in this type of simulation?



There is no official bond-creation potential in LAMMPS currently,
though a few folks at Sandia have done some on their own.
The tricky part is to reformat the data structures that store
the bonds, which also induces changes in nonbond neighbors.
So you probably want to do the changes on a pre-neighbor step,
e.g. in a fix that rearranges everything.


I had the quite the same problem before. Since no command in Lammps does
bond creation, I ended up with this procedure:
  1. Stop the simulation for every a few thousands steps and write restartfile
  2. Use restart2data program to convert restart file to a lammps data file
  3. Use a script bondup.py to modify the datafile in order to add new bond
     which takes an argument:
     bondup.py -p atomType1-atomType2:newBondType,Distance,
[lowerBound,numBondsTobeAdded] datafilename

   (lowerBound may be unnecessary, just to prevent neighboring atoms in a
chain to connect.)

   That does the job. In addition, a simple script is needed to start lammps,
like in Perl:
   for ( $i = 0; $i < 100; $i ++ ) {
     system("lammps < in.bs") # in in.bs you can ask it to read data file
     system("restart2data restartfile datafile" )
     system("bondup.py -p ......... ")

   data.py, log.py from pizza package is needed as well.
   Hope it can be of help.

bondup.py (7.73 KB)

mypizza.py (4.49 KB)


I had a similar problem for my borat glass systems. I needed to create and break bonds between my Borat atoms and my oxygen atoms according to the distance. I ended up writing a new unit for Lammps which checks the bond distances during runtime.

What I actually did was I started the program by defining an additioanl fake set of potential parameters which give always zero energy. In the input file every atom is given the maximum number of bonds I expected to occur during the simulation, with every bond using that fake set of potential parameters. During runtime Lammps now checks in a new routine every n steps the distances between my borate and oxygen atoms, and according to the coordination of the atoms this routine overrites all internal bond parameters (which atoms are belonging to a bond, what potential is to be used for that bond and so on).
This way of doing it by just changing the parameters of existing bonds during runtime seemed to me easier than actually creating new bonds.

It works quiet smooth for me.

Best wishes
Christian M�ller

P.S. In my special problem the potential I wanted to use is an angle depended potential. Depending on the coordination of the borate (3 or 4 oxygens nearby) it needs to use different parameters. So i mainly have to change angle lists. But I imagine that one could program something similar for all other type of bonds as well.

-------- Original-Nachricht --------