#29 fixed: added caching for AMolecule, BMolecule and MMolecule