anchor.diff:  
     call h5gclose_f(fields_group, error)
     call janus_io%close()
  -  call radial_hist_el%close()
     call n_solvent_el%close()
     if (do_quaternion) then
        call q_el%close()
  
positive.code:   end if
  
    call h5gcreate_f(hfile%id, 'fields', fields_group, error)
    call radial_hist%init(0.d0, 5*sigma, 100, 2)
    call radial_hist_el%create_time(fields_group, 'radial_histogram', radial_hist%data, &
         H5MD_LINEAR, step=N_MD_steps, time=N_MD_steps*dt)
    call h5md_write_attribute(radial_hist_el%id, 'xmin', radial_hist%xmin)
    call h5md_write_attribute(radial_hist_el%id, 'dx', radial_hist%dx)
  
    call h5gcreate_f(hfile%id, 'connectivity', connectivity_group, error)
    call h5md_write_dataset(connectivity_group, 'janus_links', links-1)
  
negative.code:         end do
          call n_solvent_el%append(n_solvent)
  
          v_com = sum(colloids%vel, dim=2)/colloids%Nmax
          call polar%update(com_pos, v_com, unit_r/norm2(unit_r), solvent, solvent_cells)
          call varia%tac()
  