its interesting to note, that the concept of morality, is in fact, moored as a consensual hallucination as to what is good.
therefore, as an atheist, you might mimic a "cultural" sense of goodness; but since the intent is not from the same source -- you may not pretend to share it. Logically, you are immoral simply because you do not share the same inspiration. This is a direct consequence of "assuredness".
if you want it in mathematical format ;)
you have to look deeper than the act. Which is what, you are missing. It is not enough to be 'good' (as if some objective standard can be said to exist!); it is also important to be able to enunciate the impulse to 'goodness'; and further to assure the reliability of that impulse.
This is why atheism, is and always will be, a minority religion. You lack the one characteristic, that all other religions share. A framework.
That is not to say, btw, that organized religion is "better". As with everything, the intent and education/erudition of the practitioner, makes the difference in real effect.
> so his acts are based on an inner sense of morality.
... or self-interest/greed.