Adding new bond_style and new bond property to lammps

Hello all,

I am wondering how to add a new attribute (n) to bond, and add a new bond_style that with this new bond style lammps will calculate the bond potential U as a function of the new bond attribute n, and I wish to be able to change the value of n dynamically during the simulation.

Have anyone done similar things before?

Thanks.

Hello all,

I am wondering how to add a new attribute (n) to bond, and add a new bond_style that with this new bond style lammps will calculate the bond potential U as a function of the new bond attribute n, and I wish to be able to change the value of n dynamically during the simulation.

Have anyone done similar things before?

Thanks.

I am wondering how to add a new attribute (n) to bond, and add a new bond_style that with this new bond style lammps will calculate the bond potential U as a function of the new bond attribute n, and

Here is a link to a recent discussion on this topic:
https://sourceforge.net/p/lammps/mailman/message/36390299/

You might also (eventually) want to take a look at the developer
documentation, located here:
https://lammps.sandia.gov/doc/Developer.pdf

if "n" is a force field parameter which is defined at the beginning of
the simulation, this is easy.

I wish to be able to change the value of n dynamically during the simulation.

If "n" is a force-field parameter which you control, then you can
alter it manually at any point in your simulation by invoking the
"bond_coeff" command. (You can invoke this command as frequently as
you like. You can also take a look at "fix adapt")

If "n" is attribute which is unique for every bond in the simulation,
and it changes in response to the positions of the nearby atoms, then
this is more difficult. Two approaches come to mind:
1) you can try to write code that will manage communication of the "n"
attribute between processors. (This might require writing a new fix
instead of a new bond style.)
2) Alternatively, you could make "n" an attribute for every -atom- in
your simulation using "fix property/atom". This way you don't have to
manage processor communication.

Hope this helps.

Andrew

Hi, Andrew

Thank you so much! So much useful information! I really appreciate your response. I will digest the info you provided and see if I can figure out a solution.

Best,

Tao

Hi, Andrew

Thank you so much! So much useful information! I really appreciate your response. I will digest the info you provided and see if I can figure out a solution.

Best,

Tao