double precision function embedd(rho,options) !La fonction d'embedding USE types_def implicit none TYPE(options_type) :: options double precision :: embedd_alu,rho if(options%potopt=="test1")then embedd=rho**2 elseif(options%potopt=="fm_alu")then embedd=embedd_alu(rho) else print*,'option inconnue' stop endif return end function embedd double precision function derembedd(rho,options) USE types_def implicit none TYPE(options_type) :: options !La derivee de la fonction d'embedding double precision :: dembedd_alu,rho if(options%potopt=="test1")then derembedd=rho+rho elseif(options%potopt=="fm_alu")then derembedd=dembedd_alu(rho) else print*,'option inconnue' stop endif return end function derembedd