anchor.diff:  
   contains
   
  -function atomic_distl2(X1, X2, N1, N2, ksi1, ksi2, sin1, sin2, cos1, cos2, &
  +pure function atomic_distl2(X1, X2, N1, N2, ksi1, ksi2, sin1, sin2, cos1, cos2, &
       & t_width, r_width, c_width, d_width, cut_distance, order, pd, ang_norm2, &
       & angular_scale) result(aadist)
   
  
positive.code:     !$OMP PARALLEL DO PRIVATE(ni)
      do i = 1, nm2
          ni = n2(i)
          do m_1 = 1, ni
              do i_1 = 1, ni
                  if (x2(i,i_1,1,m_1) < cut_distance) then
                      ksi2(i, i_1, m_1) = 1.0d0 - sin(x2(i,i_1,1,m_1) * inv_cut)
                  endif
              enddo
          enddo
      enddo
      !$OMP END PARALLEL DO
  
      allocate(cosp1(nm1, maxval(n1), order, maxval(n1), pmax1))
      allocate(sinp1(nm1, maxval(n1), order, maxval(n1), pmax1))
  
negative.code: 
                  enddo
  
                  aadist = aadist + d * (ksi1(m_1) * ksi2(m_2) + angular &
                  & * angular_scale)
                  !aadist = aadist + d * (ksi1(m_1) * ksi2(m_2))
  
              end if
          end do
  