problem with fravity

I don’t see anything that is obviously wrong, but this is really a math question more than a LAMMPS question. I haven’t checked your math for you. If LAMMPS parses your fix gravity command, and you’ve followed the documented format, the command should work. I haven’t checked that for you either.

Note that gravitational forces are miniscule in comparison with inter-atomic forces, so I doubt you’ll see much effect unless you use an artificially large value for gravity.

Paul

I think your formula is correct. I did not check the command. But
notice that the energy of a point mass in a gravitational field is
m*g*h. The characteristic energy of an LJ simulation at a typical
temperature is ~ 1. In order to create a gravitational energy of
magnitude 1, you would need to simulate a column of argon of height
10^14 sigma! If you system is much smaller than this, the effect of
the gravitational field will be negligible.