[lammps-users] WARNING: Compute pe/tally only called from pair style (src/TALLY/compute_pe_tally.cpp:75)

Dear lammps users,

I’m programing about 12-6 LJ potential between Si and graphene. I put graphene layer and Si atom in my simulation box, then minimize system. Then compute potential energy between Si and graphene to use compute command ( pe/tally ). However, warning messages occur. I’ll appreciate it if someone could help me to solve this problem. Additionally, I want to know appropriate way to compute LJ potential between two groups. Please share your knowledge.

I attached warning message and compute part of lammps inputfile.
I used 22.04.1 Ubuntu. LAMMPS released at 22 Dec 2022.

WARNING: Compute pe/tally only called from pair style (src/TALLY/compute_pe_tally.cpp:75)

Setting

units real
atom_style full
pair_style lj/cut 14
boundary p p p

bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style harmonic

special_bonds lj 0.0 0.0 0.5

read_data carbon.data
include PARM.lammps

group graphene type 1
group Si type 2
neighbor 2.0 bin
neigh_modify exclude group Si graphene
fix mymv Si move linear NULL NULL -0.1
compute mycp Si pe/tally graphene

Data extraction

thermo_style custom step ke pe etotal c_mycp
fix mydt all ave/time 1 1 1 c_mycp file energy.dat
dump mydmp all atom 1000 load_dump.lammpstrj

Run

run 25
write_data load_coordinated.data pair ij

The warning message is to indicate, that the compute pe/tally command will only consider contribution from the pair style. You have bonded interactions in your system as well, those will not contribute. This is a documented limitation of the compute pe/tally command and hence the warning.

This is too vague a description. Please elaborate.

These two statements in combination make no sense to me. First you tell LAMMPS to not generate any neighbor list entries for pairs of atoms between groups “Si” and “graphene” (and thus not compute any force and energy contributions between them) and then you want to tally exactly those pairwise interactions into the “mycp” compute.

Thank you for replying on my question.

According to your advices, I thought that I have to change my compute command. In my opinion, It’s better to use compute pair/local command. But I have same warning message after modifying my file along your advice. I removed some codes to measure the lj potential energy. I’ll attach my inputfile again.

Initialization

units real
atom_style full
pair_stylelj/cut 14
boundary p p p

bond_style harmonic
angle_style harmonic
dihedral_style opls
improper_style harmonic

special_bonds lj 0 0 0.5

System definition

read_data carbon.data # carbon.data have Si data, too
include PARM.lammps

group graphene type 1 # type 1 means C atoms
group Si type 2 # type 2 means Si atom
atom_modify first graphene

Minimization graphene

minimize 1e-10 1e-10 200000 200000
write_data minimized_coordinated.data pair ij

Measure LJ potential energy

fix mymv Si move linear 0.0 0.0 0.1 # this code means to drag Si atom from 5 to 2.5
compute mycp Si pe/tally graphene # to measure 12-6 lj potential energy between
# Si and graphene

Data extraction and Run

fix mydt all ave/time 1 1 1 c_mycp file energy.dat
dump mydmp all atom 1000 dump.lammpstrj
run 25

(This is what I willing to do.)
I want to measure 12-6 LJ potential between Si and graphene with accordance to the distance. I will fix graphene on the 2D layer which its z value equal 0, and minimize graphene. Next, I will locate Si atom above the graphene, then drag Si atom from initial value(5 angstrom) to 2.5 angtrom.

I have no accurate comprehension about lammps yet. Therefore, I have no idea to solve this problem. Could you please let me know about lammps?

I disagree on that. What is the difference? You just have to do more computation, need to do post-processing and would get the same result. Besides, I don’t see any such compute command in your input.

You won’t get rid of the warning message because you didn’t get rid of what is causing it. More importantly, you have not thought about whether the warning applies to your computation or not (and thus can be ignored).

Why did you add this command?

You didn’t define what is the problem! I cannot help you to understand the science of your research because that is a) off-topic for this forum (it is not about correctly using LAMMPS) and b) because it is the job of your adviser. I am not interested to become your (substitute) adviser.

To know more about LAMMPS, you need to study its documentation. There are more than 2500 pages of it, so there is plenty of reading material :wink:

If you are struggling with the complexity of the problem, why don’t you start with a simpler model, e.g. just two different atoms, where you leave one atom without time integration and move the other. That would have the advantage, that you already know from your input what result your computation would have to produce. Then you can increase the complexity in small steps and check at each step, if you get the expected result and whether the system is moving as desired.

Thank you for your reply. I’ll study more and try to start with a simpler model!