Both ATP and nucleotides in DNA/RNA share similarities in their chemical structure and function. They are both composed of a sugar molecule, a phosphate group, and a nitrogenous base. In ATP, the sugar molecule is ribose, while in DNA and RNA, it is deoxyribose or ribose, respectively. The phosphate group in both ATP and nucleotides in DNA/RNA provides energy for cellular processes. Additionally, the nitrogenous base in both ATP and nucleotides determines their specific functions, such as encoding genetic information in DNA or forming complementary base pairs in RNA. Overall, ATP and nucleotides in DNA/RNA are essential molecules involved in various biological processes.