Intra- and intermolecular interactions in the series of acyclic and macrocyclic compounds containing nucleotide bases and their derivatives