LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] pair style table for Coulombic and dispersion pair interactions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] pair style table for Coulombic and dispersion pair interactions

From: Axel Kohlmeyer <akohlmey@...24...>
Date: Tue, 5 Sep 2017 19:26:42 -0400

some general comments:

- since you are obviously struggling to understand how tables work in LAMMPS, you should start by doing a tabulation for a functional form that exists analytically in LAMMPS. this way you can compare what you are doing with the tables to the corresponding results from the original analytical form. to start right away with your target is asking for trouble.

- when tabulating coulomb, there are many issues to worry about, e.g. for tables to work you *must* have a different atom type for each atom that has a unique combination of atom type and charge. when using a coul/* pair style, this is not required, i.e. you can have the same atom type (i.e. the same lj/cut or other potential) with different atomic (partial) charges. with tables, those atoms have to have different types.

- when starting with tables, it is often a big help to build the first set of tables using the pair_write command and then compare those with the output of the analytical form (see above) and the output of your program generating the tables

- i would start first with a small test system without coulomb, then add coul/cut, then add coul/long and kspace

- for tabulation of the coloumb, you can create a combined table with lj/cut (or equivalent) and coul/long (or equivalent) or create separate tables. in the second case, for hybrid/overlay, you have to specify pair style table twice.

there is little point in answering your questions unless you have worked your way through these suggestions and when you are done, it is likely, that you don't need to ask those questions again.


On Tue, Sep 5, 2017 at 7:09 PM, Jo <jojo412202@...24...> wrote:

I have a bit of confusion about the documentation regarding using tables, found in pair_table:

If your tabulated potential(s) are designed to be used as the short-range part of one of the long-range solvers specified by the kspace_style command, then you must use one or more of the optional keywords listed above for the pair_style command. These are ewald or pppm or msm or dispersion or tip4p. This is so LAMMPS can insure the short-range potential and long-range solver are compatible with each other, as it does for other short-range pair styles, such as pair_style lj/cut/coul/long. Note that it is up to you to insure the tabulated values for each pair of atom types has the correct functional form to be compatible with the matching long-range solver.

What does "compatible with the matching long-range solver" entail?  How can I ensure that it matches with the long range solver?  The table I made of the short range potential is simply the original coulombic interaction dampened at short distances.

Below is what I think might be how it works:

In creating the table, I assume I can use the functional form of the real space ewald solver: 0.5*qq/r*erfc(alpha*r), where alpha is the real/reciprocal space partition parameter (1/cutoff).  From what I understand, I must match this partition parameter/cutoff by making the kspace_modify gewald value the same, thus matching the cutoffs.  Is this correct and is there more matching I need to check to make sure it is compatible?

Additionally, if I would like to use tables for both coulombic and dispersion potentials, can I combine the energies in 1 table to be used in the realspace short range?  I was unable to find information about making 2 sets of tables compatible in the documentation.

Thank you in advance!


On Tue, Sep 5, 2017 at 5:23 AM, Michał Kański <michal.kanski@...2460...> wrote:

The manual answers those questions:





From: Jo
Sent: wtorek, 5 września 2017 05:10
Subject: [lammps-users] pair style table for Coulombic and dispersion pair interactions




I would like to implement a simulation that utilizes tables for the pair potentials for both the short range coulombic interactions and the dispersion interactions.  The tables I made for the coulumbic interactions are short range and I would like for it to be combined with the ewald long range calculations using kspace.  I have not been able to get both sets of tables to work in the input file.


What I have tried:


hybrid overlay table linear 1500 ${cutoff} coul/long${cutoff}

pair modify pair coul/long table linear 1500


However, I get errors saying illegal pair_style.  How should I implement both tables at the same time?  How can I let lammps know that one set of the tables is for coulombic together with kspace ewald, and the other set is for dispersion?  


Also, for the coulombic tables, I made the potentials simply from (q*q/r)*damping_factor, is this adequate for it to fit together with kspace ewald?


Thank you!




Check out the vibrant tech community on one of the world's most
engaging tech sites,!
lammps-users mailing list

Dr. Axel Kohlmeyer  akohlmey@...12...24...
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.