anchor.diff:  
       subroutine sirius_create_potential(veffit, beffit, veffmt, beffmt)
           implicit none
  -        real(8),           target, intent(in) :: veffit
  +        real(8), optional, target, intent(in) :: veffit
           real(8), optional, target, intent(in) :: beffit
           real(8), optional, target, intent(in) :: veffmt
           real(8), optional, target, intent(in) :: beffmt
           type(C_PTR) veffit_ptr, veffmt_ptr, beffit_ptr, beffmt_ptr
   
  -        veffit_ptr = C_LOC(veffit)
  +        veffit_ptr = C_NULL_PTR
  +        if (present(veffit)) veffit_ptr = C_LOC(veffit)
   
           beffit_ptr = C_NULL_PTR
           if (present(beffit)) beffit_ptr = C_LOC(beffit)
  
positive.code:             real(8),                  intent(out) :: g
          end subroutine
  
      end interface
  
  contains
  
negative.code:             integer,                 intent(in)  :: num_gvec
              integer,                 intent(in)  :: gvec
              complex(8),              intent(out) :: rho_pw
          end subroutine
  
          subroutine sirius_get_veff_pw(num_gvec, gvec, veff_pw)&
              &bind(C, name="sirius_get_veff_pw")
              integer,                 intent(in)  :: num_gvec
              integer,                 intent(in)  :: gvec
              complex(8),              intent(out) :: veff_pw
          end subroutine
  
          subroutine sirius_get_gvec_index(gvec, ig)&
  