# Why energy in lammps is negative while it should be positive!

Dear Dr. Axel Kohlmeyer,

My name is Zahra and I am a PhD student at Technical university Dresden Germany.

I have an asymmetric system include polymerA+polymerB+cosolvent. Because of cosolvent I have to make it asymmetric. The box is divided to two parts and polymer is in one side of the box and I push them by a wall. I am using just Lennard Jones potential which is repulsion. The interaction between polymerAA=polymerBB=repulsion and interaction between polymerA,B=higher repulsion. When I measure the pair energy of A and B by lammps it gives me negative number while it should be positive. Do you have any idea why this happens?

I tested my code for 3D periodic include polymer type A and B. Everything is fine in this case and energy is positive with reasonable number. Once more I tested the code for one type polymer in 3D periodic and everything is fine. Then, I tested my code for one type polymer and asymmetric box; in this case energy is zero.

As I understand, the middle wall in the box is affecting the energy.

I will appreciate if you give me some hints.

Best Regards,
Zahra

Two things:

1. Whether a potential is attractive or repulsive is dependent on the derivative of the potential energy, not the absolute value. So you can have a repulsive interaction and still a negative potential energy.
2. The Lennard-Jones potential is repulsive and attractive unless you take special precautions by choosing a cutoff matching the minimum of the potential.

I disagree with your conclusions, so you need to provide better arguments and more details to prove your point.

Dear De. Axel,

1. I derive the potential energy by the following way:
compute energypoly polymer1 group/group polymer2 pair yes
thermo_style custom step temp press etotal c_energypoly

2. I used the cutoff for the Lennard-Jones potential at “1.122462048”