anchor.diff:    integer(c_int64_t) :: seed
     integer :: n_threads
     type(h5md_file_t) :: hfile
  +  type(h5md_element_t) :: dummy_element
  +  integer(HID_T) :: box_group
     type(thermo_t) :: thermo_data
     double precision :: temperature, kin_e
     type(particle_system_io_t) :: dimer_io
  
positive.code:   write(*,'(a16,f8.3)') main%name, main%total
  
  contains
  
    subroutine thermo_write
      write(*,'(1i16,6f16.3,1e16.8)') i, e1, e2, &
           kin_co, sum(solvent% vel**2)/2, &
           e1+e2+kin_co+sum(solvent% vel**2)/2, &
           compute_temperature(solvent, solvent_cells), &
           sqrt(dot_product(colloids% pos(:,1) - colloids% pos(:,2),colloids% pos(:,1) - colloids% pos(:,2))) - d
    end subroutine thermo_write
  
  
    subroutine flag_particles_nl
      double precision :: dist_to_C_sq
  
negative.code:      kin_e = (colloids% mass(1)*sum(colloids% vel(:,1)**2) + &
            colloids% mass(2)*sum(colloids% vel(:,2)**2))/2 + &
            sum(solvent% vel**2)/2
  
       call thermo_data%append(hfile, temperature, e1+e2, kin_e, e1+e2+kin_e)
  
       call dimer_io%position%append(colloids%pos)
       call dimer_io%velocity%append(colloids%vel)
       call dimer_io%image%append(colloids%image)
  
       solvent_cells% origin(1) = threefry_double(state(1)) - 1
       solvent_cells% origin(2) = threefry_double(state(1)) - 1
  