Added force and potential energy calculations and fixed any compilation errors.