Self-assembly of novel [3]- and [2]rotaxanes based on donor-acceptor and hydrogen-bonding interactions. Intensified inter-ring repulsion interaction and shuttling behavior.