for i, p_atom0 in enumerate(p_atoms):
for k0, v0 in c_a.items():
if p_atom0[3] in k0:
if p_atom0[2] in v0:
x0, y0, z0 = round(p_atom0[5][0], 1), round(p_atom0[5][1], 1), round(p_atom0[5][2], 1)
"""Second loop"""
for p_atom1 in p_atoms_copy:
for k1, v1 in c_a.items():
if p_atom1[3] in k1:
if p_atom1[2] in v1:
if p_atom1 != p_atom0:
x1, y1, z1 = round(p_atom1[5][0], 1), round(p_atom1[5][1], 1), round(p_atom1[5][2], 1)