Dear Axel,
Thank you very much! I am sorry I made a stupid mistake. I will mention the typos in the future.
Is that possible for pair_write to support to write only the two-body repulsive portion for some many-body potentials?
no. pair write (and compute group/group) require a function PairXXX::single() to be implemented. It cannot be done for manybody potentials.
I think the repulsion potential of the AIREBO or REBO potential is only part of them and are pure two-body interactions.
The doc page of pair_write says that the energy and force are computed from two interacting atoms. So I think if I put two atoms with variable distances and output the energy and force, I should obtain similar results for the short range interactions since the repulsive force is dominant at this range. From my current test, it seems the energy and force values are close to the results in the table from pair_write for pair_style EAM and ZBL. Is this method also applicable to AIREBO or REBO potential? Could you please give me some advice?
no. i have already explained why this is not the same. ZBL is pairwise additive. EAM is missing the embedding term in the pair_write output. it is also explain in the EAM doc page.
to re-iterate: you must not only compare the result of what happens when you change the distance between two atoms, but also consider what happens, if there are other atoms close or not. for pairwise additive potentials like lj/cut, morse or ZBL, there is no difference, for manybody potentials, there is.
I want to spline the potential with ZBL potential at the short inter-atomic distances. I want to follow the ways used in the publications and tabulate the values and use pair_style table, the advantage is that the splined potential and the derivatives are continuous at the splined points. However, the doc page of pair_style table does not give much information about the accuracy and computational efficient compared with the original ones. Could you please give me some instructions on how many points should I use if I want to tabulate the potential from 0 to 1 angstrom?
just compare the results (accuracy and performance) from pair table (using output from pair write) with that of a pair-wise additive potential like lj/cut or morse, e.g. for the melt example. or if you are too lazy to convert that to metal units, use the equivalent input from the UNITS example.
If you read through the description of the AIREBO potential in the LAMMPS manual you should already see that your strategy is doomed for REBO style potentials:
The :math:E^{\text{REBO}}
term in the AIREBO potential gives the model its
reactive capabilities and only describes short-ranged C-C, C-H and H-H
interactions (:math:r < 2
Angstroms). These interactions have strong
coordination-dependence through a bond order parameter, which adjusts
the attraction between the I,J atoms based on the position of other
nearby atoms and thus has 3- and 4-body dependence.
In other words, those potentials are emphatically not pair-wise additive at short range. And if you keep reading you will also see that the Lennard-Jones term only applies to 2 < r < cutoff and is smoothly added with a switching function to avoid the repulsive part of the LJ potential.
axel.