hybrid/overlay potential with GPU

Dear LAMMPS users,

in my MD simulations i am using hybrid/overlay potential of tersoff and AIREBO styles. Since i have quite huge simulation box i tried to use GPU acceleration. Unfortunately an error has been appeared . In the one hand simulations require newton off for tersoff potential style and from the other hand newton on is required for AIREBO potential. Does anybody know how to solve this problem ? Thanks !

Kind regards

Dear LAMMPS users,

in my MD simulations i am using hybrid/overlay potential of tersoff and AIREBO styles. Since i have quite huge simulation box i tried to use GPU acceleration.

hybrid/overlay? do you have atoms for which you want to add a tersoff and an AIREBO interaction? that is highly unusual. how do you avoid double counting?

Unfortunately an error has been appeared . In the one hand simulations require newton off for tersoff potential style and from the other hand newton on is required for AIREBO potential. Does anybody know how to solve this problem ? Thanks !

don’t use GPU acceleration, but MPI parallelization. if need be, apply for time in an HPC cluster. please note that for pair style AIREBO, there is no GPU acceleration, so that part of the calculation will be at CPU speeds anyway and may cause (significant) load imbalance.

axel.

Dear Dr. Kohlmeyer,

Thank you for the reply.

Regarding your question about double counting I am still thinking about it. Let me share with you by some details on my simulations. I am going to simulate bilayer graphene formed on SiC substrate. In the documentation file i met a paragraph about hybrid/overlay using for carbon nanotube simulation on Si substrate. In the document authors suggested to switch off C/C interactions in the tersoff potential. In my calculations i used pair_coeff atom types none command in order to switch off the C/C interactions in the tersoff potential (see the fragment of the lammps script below). Thus, C/C interactions are described only by AIREBO potential. However, what is happening at the interface between graphene and SiC is quite interesting question. I have checked my simulation for a small simulation box via fix NVE and it works well. It is known from experimental data that the buffer layer between a SiC and graphene layers is reconstructed and if i will get such reconstruction after the MD simulations i think it would be reasonable to use such hybrid/overlay style.

/// FORCE FIELD START ///

pair_style hybrid/overlay tersoff airebo 3.0

pair_coeff * * tersoff SiC.tersoff Si C

pair_coeff 2 2 none

pair_coeff * * airebo CH.airebo NULL C

/// FORCE FIELD END ///

Thank you for the suggestion to use MPI parallelization instead GPU.

Kiind regards

чт, 16 июл. 2020 г. в 18:36, Axel Kohlmeyer <akohlmey@…33…24…>:

Dear Dr. Kohlmeyer,

Thank you for the reply.

Regarding your question about double counting I am still thinking about it. Let me share with you by some details on my simulations. I am going to simulate bilayer graphene formed on SiC substrate. In the documentation file i met a paragraph about hybrid/overlay using for carbon nanotube simulation on Si substrate.

please point me to the exact location of that text. i suspect that you are either misunderstanding what is written there, or there is a misleading formulation in the documentation.

In the document authors suggested to switch off C/C interactions in the tersoff potential. In my calculations i used pair_coeff atom types none command in order to switch off the C/C interactions in the tersoff potential (see the fragment of the lammps script below). Thus, C/C interactions are described only by AIREBO potential. However, what is happening at the interface between graphene and SiC is quite interesting question. I have checked my simulation for a small simulation box via fix NVE and it works well. It is known from experimental data that the buffer layer between a SiC and graphene layers is reconstructed and if i will get such reconstruction after the MD simulations i think it would be reasonable to use such hybrid/overlay style.

what you are neglecting is the fact, that both Tersoff and AIREBO are manybody potentials and thus they have not only pairwise additive components but also their potential also includes terms that depend triples or quadruples of atoms. So in your SiC you have to include not only Si-Si, Si-C, and C-C interactions, but there also are Si-Si-Si, Si-Si-C or Si-C-C and so on. By turning off C-C interactions you also remove Si-C-C and thus you are no longer using a correct model. By mixing AIREBO and Tersoff the way you do, you also are including C-C and C-C-C and C-C-C-C interaction inside the SiC to be modeled by AIREBO instead of Tersoff, which also is a very bad thing causing inconsistent behavior.

/// FORCE FIELD START ///

pair_style hybrid/overlay tersoff airebo 3.0

pair_coeff * * tersoff SiC.tersoff Si C

pair_coeff 2 2 none

pair_coeff * * airebo CH.airebo NULL C

/// FORCE FIELD END ///

to alleviate this, please consider the following “rules”. 1) you should be using pair_style hybrid not hybrid/overlay, 2) for hybrid to work properly with manybody potentials, each subset has to be wholly contained, that means all of the SiC has to be modeled by just one type of potential, same for the graphene, which means that you need to have at least three (3) atom types (one for Si in SiC, one for C in SiC, and one for C in graphene). 3) to model the interactions between the manybody subsystems you must use a pairwise additive potential, e.g. lj/cut or morse. for that you need to look up suitable parameters (i don’t have time for that, so i am just putting placeholders below). then your setup would look something like this:

pair_style hybrid tersoff airebo 3.0 lj/cut 10.0
pair_coeff * * tersoff SiC.tersoff Si C NULL
pair_coeff * * airebo CH.airebo NULL NULL C
pair_coeff 1 3 lj/cut <epsilon_SiC> <sigma_SiC>
pair_coeff 2 3 lj/cut <epsilon_CC> <sigma_CC>

Axel.

Dear Dr. Kohlmeyer,

Thanks a lot for your quick reply.

please point me to the exact location of that text. i suspect that you are either misunderstanding what is written there, or there is a misleading formulation in the documentation.

In the section Docs » Pair Styles » pair_style hybrid command I found the paragraph, which sounds as follows:

Dear Dr. Kohlmeyer,

Thanks a lot for your quick reply.

please point me to the exact location of that text. i suspect that you are either misunderstanding what is written there, or there is a misleading formulation in the documentation.

In the section Docs » Pair Styles » pair_style hybrid command I found the paragraph, which sounds as follows:


Here is another example, using hybrid/overlay, to use 2 many-body potentials together, in an overlapping manner. Imagine you have CNT (C atoms) on a Si surface. You want to use Tersoff for Si/Si and Si/C interactions, and AIREBO for C/C interactions. Si atoms are type 1; C atoms are type 2. Something like this will work:

pair_style hybrid/overlay tersoff airebo 3.0
pair_coeff * * tersoff SiC.tersoff.custom Si C
pair_coeff * * airebo CH.airebo NULL C

Note that to prevent the Tersoff potential from computing C/C interactions, you would need to modify the SiC.tersoff file to turn off C/C interaction, i.e. by setting the appropriate coefficients to 0.0.

In my case, where I am simulating SiC/graphene structure in order to switch off the C/C interaction in the tersoff I am using pair_coeff 2 2 none command. >From your previous reply it seems that it is not a good idea.

using a “none” setting is not the same as modifying the potential file, where you can selectively turn off only specific interaction triples.
also please note that in the given example, there are no atom types shared between the two subsystems (unlike in your case), which is a core requirement for meaningful simulations with pair style hybrid or hybrid/overlay when using manybody potentials.

Here, I would like to acknowledge you for the suggestion you wrote earlier with regards to the using of hybrid style potential for each structure separately. I found it really reasonable and definitely I will follow this.

However, I would like to clarify several points. As I understand the most relevant interactions for my case are Si-C-C and C-Si-Si since in SiC crystal each Si atom is surrounded by 4 C atoms and vice versa. Since pair_coeff command does not work as I intend I would like to try to switch off C-C interaction by setting the parameters A and B to 0 directly in the tersoff file for the C-C-C line. It seems C-Si-Si and Si-C-C (and the rest) should not be affected by this change. Am I correct ?

perhaps. that is difficult to say with certainty because of the complexity of the processing of the manybody interactions from using nested loops over the pairwise neighbors. this is in part due to the fact that tersoff and airebo have different ways to loop and while one looks over pairs and triples, the other also looks at quadruples of atoms. as I mentioned above, you should not be sharing atom types between the two subsystems. that will make it next to impossible to cleanly separate the force fields and thus can easily lead to double counting or missing interactions. using a hybrid pair style has always to be considered a band-aid solution.

axel.