About the difference between writing new pair style and using pair_style table

Hi, everyone:
Thanks for reading my quesitons.
Currently, I want to using the tersoff with LJ potential. And in short range, the tersoff is active, and the LJ potential is off. And in the long range, the LJ is active. To achieve this, now I have two possible solutions. The first method is try to use pair style table, which I have learned about that I can use the table to fit the LJ potential in the long distance, and make it zero in the short range. The second method is try to writing a new pair style which has a little difference with the original LJ potential.
My question is whether these two methods can solve my problems, and whether there exists difference between them.
Currently, I think maybe the pair style table is a relatively easy way. Wish you can give me some advise!
Really appreciate for your kindly help!
Thanks!

Shusen Guo

You want to implement the new pair style because you need to employ a switching function to smoothly transition from the Tersoff two body term to LJ two body interactions so you don’t have discontinuities in energy and force.

AIREBO is an example for such a potential where you combine a manybody model with Lennard-Jones.

Hi, akohlmey!
Thanks for your advise. Do you mean that if I try to write a new pair style or use pair style table. I must guarantee that the potential and force is continious. I have leaned about that AIREBO has the LJ_Flag which is similar to my question.
Do you suggest that I try to modify the AIREBO.cpp and .h file to realise my new pair_style.
I have looked into the pair_style lj_cut.cpp and .h file as a start. Also, I will try to use the pair style table as well because I am not familiar with the C++ programming.
Can you give me some advise. Is it possible for me to solve this problem in a short time.
Really appreciate for your help!
Best!

Shusen Guo

No.

It is a bad idea to avoid what is the right solution simply because you are lacking skills or understanding. You either need to spend the time to acquire what you are missing or find a suitable collaborator.

You should create a derived class from PairTersoff and add the LJ epsilon and sigma to the Params struct in the base class. Then you would need to override only two functions for reading the parameters and computing the pairwise interaction.

I don’t know you and don’t know your level of programming skills and understanding of MD and force field parameterization. But your asking many repetitive questions suggests that you are lacking both and thus it is highly unlikely that you will solve this quickly and correctly. As I mentioned before, after implementing the new pair style you will need to derive adjusted parameters. The fact that you are combining two potential functions with known parameters does not mean that those are suitable for the combined potential. So there is a lot of work to be done.

Hi, akohlmey!
Really appreciate for your kindly advise. As you have said, it is worthy to spend time for the right thing. And you really give me a good direction. I will try your suggestion.

You should create a derived class from PairTersoff and add the LJ epsilon and sigma to the Params struct in the base class. Then you would need to override only two functions for reading the parameters and computing the pairwise interaction.

Can I write a new pair style base on the existed pair_style lj_cut, and then use it with pair_style hybrid. I think I can use it with other potential like tersoff and meam. Is there exist some problems. I have noticed that the force and potential should be continious, I think I can add two other Params to this pair style to try to meet this requirement.

It is a bad idea to avoid what is the right solution simply because you are lacking skills or understanding. You either need to spend the time to acquire what you are missing or find a suitable collaborator.

Thanks for your advise which really give me a good direction. I have learned about that the pair_style table has a shortage in mixing rules. Thus, when the atom type increases, this will take some time for writing table file. And is this the main reason why I should avoid using pair_style table.

Appreciate for your help!
Best!

Shusen Guo

You are not paying attention to my arguments and suggestions. If you know things so much better than me, then why ask for advice?

I have nothing to add to what I have already explained.

Hi, akohlmey
I feel sorry for my expression method.
Really appreciate for your helpful advise, I will try what you have suggested.
Best!

Shusen Guo