DV10 said:
as far as I've read,potential energy of a current carrying loop in a uniform magnnetic field is U=-p.B
where p,B are magnetic dipole moment vector of the loop and the magnetic field vector
There are two important reasons why you can't apply this formula blindly to a single electron moving in a circle subject to a magnetic field:
(1) The formula you give is only valid for current loops that are small enough to be approximately considered as pure magnetic dipoles.
(2) Current carrying loops typically contain a very large number of charged particles. Each of these particles will be accelerating (the direction of their velocity changes as they traverse the loop), and accelerating charges produce time-varying magnetic fields, which in turn induce electric fields (Faraday's Law). It is a straight-forward calculation to show that the magnetic fields
never directly do any work on a charged particle, and hence the work in this case must come from the intermediary electric fields. When their are many moving charges, then each individual charge will produce an electric field that will do work on all other charges, but (according to Newton's 3rd Law) not on itself. When you add up all the forces from all the electric fields created by all the accelerating charges, you will find that \textbf{F}=\nabla(\textbf{p}\cdot\textbf{B}) and hence U=-\textbf{p}\cdot\textbf{B}, provided that the loop is closely approximated by a magnetic dipole. (This is the underlying mechanism as to how that equation is derived via the Lorentz Force Law)
For a single moving electron, their are no electric fields to do work on it. The only electric field present is the one it produces, which according to Newton's 3rd Law will do no work on it. (In fact, classical electrodynamics does predict that accelerating charges will exert a force on themselves. But, neglecting this so-called radiation reaction force, which violates Newton's 3rd Law, this is a valid argument).
For this reason, a single electron moving in a circle is a poor example, as its potential energy doesn't change.
the tendency of a current carrying loop should have been to align itself WITH along the magnetic field already present..that would've been the min energy configuration..
A magnetic dipole would have a lower energy if it were aligned with the external field. However, this doesn't violate the laws of nature one bit.
A rocket ship has a lower energy sitting on the surface of Earth than it does in high orbit, does this mean that rocket ships violate the laws of nature? Of course not; the rockets engines burn fuel which provides additional energy to the rocket and raise it to a higher altitude.
So, a situation where you have a magnetic dipole anti-aligned with an external magnetic field must be similar to the rocket ship. If the dipole were created by the field, then its energy must have come from the field. Your particular example fails because a single electron in circular motion is not an ideal magnetic dipole, but if you were to devise some other scenario where an external field created a dipole that was opposed to the field, then you would have to conclude its energy came from the field (or rather, the power source that created the field) and was transferred to the charges that composed the dipole via intermediary induced electric fields.
If you are curious as to how to find the energy stored "in a magnetic field", look up Poynting's theorem.