Any suggestions for solving a restriction for fix bond/create command

Dear Lammps Users,

I understood that lammps does not update new angles and dihedrals using the “fix bond/create” command after a new bond is created.

I have read several paper about epoxy-based network (crosslinking) simulations using LAMMPS.

They had to use this command (fix bond/create). Did they use their own scripts to create a new topology file?

Are there any suggestions for overcoming this restriction?

Thank you in advance.

Best regards,
Changwoon Jang

Dear Lammps Users,

     I understood that lammps does not update new angles and dihedrals using
the "fix bond/create" command after a new bond is created.

I have read several paper about epoxy-based network (crosslinking)
simulations using LAMMPS.

They had to use this command (fix bond/create). Did they use their own
scripts to create a new topology file?

well, you should ask that the authors of the papers.
they would know best.

have you checked whether the model employed
does use angles and dihedrals at all?

Are there any suggestions for overcoming this restriction?

take your favorite text editor and start programming?

axel.

Dear Changwoon

You posted this question a week ago and I replied, suggesting you
could create a loop inside your lammps script and run "write_restart",
"restart2data", and "gen_all_angles_topo.sh" inside the loop. (There
are more detailed instructions inside the .gz file.) The
"write_restart" and "restart2data" commands will create a data file
with the current bond topology. Then "gen_all_angles_topo.sh" will
creates a new DATA file from this DATA file. It will remove the old
"Angles" "Dihedrals" "Impropers" sections from your DATA file and
replace them with new sections. The new "Angles", (and optional
"Dihedrals", and "Impropers") sections are automatically generated
according to the bond topology, and the atom types, and bond-types you
have selected. The gen_all_angles_topo.sh script works.

I am not an expert on writing for-loops for lammps, but this is how I
think you would write it:

variable nrebond loop 100
   label loop

   run 1000
   write_restart old.rst
   shell restart2data old.rst old.data

  shell gen_all_angles_topo.sh old.data new.data
   read_data new.data

   next nrebond
   jump SELF loop

I am curious to know if this works. Please try it and email me back.

Everything you need to download and install is located here
http://www.moltemplate.org (click on "Moltemplate Download")
http://www.moltemplate.org/gen_all_angles_topo/gen_all_angles_topo.tar.gz

There are instructions inside the gen_all_angles_topo.tar.gz archive,
once you open it.

Let me know if you have any questions.

Andrew

Dear Andrew Jewett and Axel,

Thanks for your comments. Especially, Andrew’s comments are certainly worth to be tried.

I will play around with “gen_all_angles_topo.sh”, and let you all know.

Best regards,
Changwoon Jang

Dear Andrew Jewett,

I have played around with “gen_all_angles_topo.sh” for a while. This script works fine for me.

The only tedious part is that I need to reset All angle types and dihedral types in the “angles_by_type.txt” and “dihedrals_by_type.txt”, etc. This is my obligation. However, I think that this script is ok for me.

I have seen that the number of angles have not been automatically updated with gen_all_angles_topo.sh. Am I right?

Anyway, I am going to climb another mountain.

Thanks Andrew for providing a really good script to overcome my problem.

Best regards,
Changwoon Jang

Dear Andrew Jewett,

    I have played around with "gen_all_angles_topo.sh" for a while. This
script works fine for me.

The only tedious part is that I need to reset All angle types and dihedral
types in the "angles_by_type.txt" and "dihedrals_by_type.txt", etc. This is
my obligation. However, I think that this script is ok for me.

I have seen that the number of angles have not been automatically updated
with gen_all_angles_topo.sh. Am I right?

Oh drat.
I completely forgot about that number.
(You are referring to the number at the top of the DATA file, correct?
"gen_all_angles_topo.sh" probably does not update this number.)

This is easy to fix. I will do this I will post a new version of that
script on the web page, and I'll mail it to you as well.
Thank you for reporting this bug.

Andrew

Bug fixed I think.
Here is the latest version of gen_all_angles_topo.sh, including README
and example files.

You will also need to update the "extract_lammps_data.py" file.
Please the attached version of that file to moltemplate's "src"
directory (or anywhere else in your PATH).

I am updating moltemplate and will include this bug fix on the web
site in a day or two. For now, hopefully these files will work for
you.
Cheers

Andrew

gen_all_angles_topo.tar.gz (4.68 KB)

extract_lammps_data.py (4.25 KB)

Dear Andrew,

Thank you for updating the new versions of gen_all_angles_topo.sh and extract_lammps_data.py.

Those files work fine. Do you have a special reason for printing 5 empty spaces front of the number of angles and the number of dihedrals? I modified gen_all_angles_topo.sh by myself anyway.

Thanks.

I hope Andrew’s work helps anyone who is working using “fix bond/create” and "fix bond/break commands.

Best regards,
Changwoon Jang

Changwoon,

Yet another option is the dynamic bonding approach of Carsten Svaneborg. The method is integrated with 14Jul11 LAMMPS and available through Comp. Phys. Comm.

cheers,

Tim

Dear Andrew,
Those files work fine. Do you have a special reason for printing 5 empty
spaces front of the number of angles and the number of dihedrals? I modified
gen_all_angles_topo.sh by myself anyway.

No reason. I suppose it looks prettier (?)
I'm happy to hear this is working for you.

Andrew
(In case anyone else is following this thread, I have been delayed
posting the update on the moltemplate web site, but I will do this
this week. The latest version of the script (along with an updated
moltemplate script) was posted earlier in this thread. Feel free to
email me if anyone has trouble installing this.)

For anyone still following this thread, the link to download the
latest version of "gen_all_angles_topo.sh" has changed. It has moved
here instead:

http://www.moltemplate.org/other/gen_all_angles_topo/gen_all_angles_topo.tar.gz