From autowave mechanisms of self-assembly to molecular machines