There is a very simple way of articulating this convention. Objects roll down-hill, the negative sign just says that: Force is in the direction of DECREASING potential energy; this convention makes potential energy diagrams intuitive!
The interaction law is specified by the potential U(r1,----, rN), which represents the potential energy of N interacting atoms as a function of their positions ri=(xi, yi, zi). Given the potential, the force acting upon ith atom is determined by the gradient (vector of first derivatives) with respect to atomic displacements, as given Fi = -riU(r1; ----;rN). Newton’s second law of motion states F=ma, F=mR where a is acceleration and R is the second derivative of the particle position r with respect to time. The force F is determined by the gradient of the potential energy U(R) which is the function of all the atomic coordinate r, F= -iU(r) .
Text book reference Computational Biochemistry and biophysics Edited Oren MBacker et al 2001 Marcel Dekker Chapter 2 and 3
Just to make the statement bolder: there is nothing special in molecular dynamics. When a force is derivable from a potential, it is always the negative of the gradient:
Force is minus the gradient of the potential energy.
Molecular dynamics codes may sometimes ask you to give a tabulated rather than an analytical version of the potential energy. In that case you (usually) have to make a table with x vs. potential energy, and also x vs. gradient of potential energy. The confusing aspect might be the fact that, depending on the software, you either have to upload a table with the gradient or with the minus gradient. In the firts case this is the minus force, and in the second it is the force.
In way shown it is starting with Lagrangian equation (one dimension for simplicity of notation) using Cartesian coordinates :
d(\partial L/\partial v)/dt - \partial L/\partial r = 0, where v is velocity.
where L = T(v) - U(r), with T kinetic energy (mv^2/2) and U potential energy. Taking the derivatives, we get
d(m v)/dt + grad U = 0
or
m dv/dt = -grad U
Comparing it with Newton's law, mdv/dt = F, we get F=-grad U.
Another ways: In MD simulations,forces acting on atoms or molecules are conservative forces, as such
rot F = 0, which means F = - grad U. Why the minus in front? Starting with the Newton's second law:
f = mdv/dt = - du/dr (assuming one dimension case for simplicity of notation). Multiply both sided with dr, we get
m dr dv/dt = -du or mv dv = -du, integrating both sides between two states 1 and 2, we get
T2-T1 = U1-U2, where T is the kinetic energy, or T1+U1 = T2+U2, which is the conservation of the total energy for isolated system. As you may have noticed, the sign (-) was necessary to prove this law which is true.