anchor.diff:          h0_out = latt_save ! revert to previous saved lattice
         end if
       end do
  -    if (change_flag == 0 .and. (.not. (present(skip_enth_calc).and.skip_enth_calc)) ) then 
  -      ! calc new enth
  -      enth_out = enthalpy( s, h0_out, V, pressure, cutoff, n_call_enthalpy=n_call_enth ) 
  +    if (change_flag == 0 .and. (.not. (present(skip_ener_calc).and.skip_ener_calc)) ) then 
  +      ! calc new ener
  +      ener_out = energy( s, h0_out, V, cutoff, n_call_energy=n_call_ener ) 
       end if
   
     end subroutine roam_latticeshape_shear
  
positive.code:   !   * manifold det(h0) = 1 and cell_depth > min_height         *
    !   ************************************************************
    subroutine roam_latticeshape_stretch(h0_in, h0_out, s, V, latt_step, min_height, &
                               & pressure, cutoff, change_flag, enth_out, n_call_enth, skip_enth_calc )
  
      real(dp), dimension(3,3), intent(in) :: h0_in   ! normalised cell matrix in
      real(dp), dimension(3,3), intent(out) :: h0_out ! normalised cell matrix out
  
negative.code:   !   * manifold det(h0) = 1 and cell_depth > min_height         *
    !   ************************************************************
    subroutine roam_latticeshape_shear(h0_in, h0_out, s, V, latt_step, min_height, &
                               & cutoff, univar_rnd3, norm_rnd6, change_flag, ener_out, &
                               & n_call_ener, skip_ener_calc )
  
      real(dp), dimension(3,3), intent(in) :: h0_in   ! normalised cell matrix in
      real(dp), dimension(3,3), intent(out) :: h0_out ! normalised cell matrix out
  