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:
 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.
 The LennardJones 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,
Thanks for the replying.

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

I used the cutoff for the LennardJones potential at “1.122462048”
If you need more information, please let me know.
Kind Regards,
Zahra
This addresses my point 2, but not point 1.
I derive the potential energy as I mentioned in point 1. If this answer is not enough, can you please let me know how I should derive the potential energy?
That doesn’t matter. Just look at the LJ potential definition. The potential energy is negative for all distances larger than sigma.
If you don’t believe me, ask your adviser.
You are right. I needed to shift the potential. Now it is as I expected. Thanks.