Dynamics of encapsulated hepatitis B surface antigen