  The detection of the binary neutron star GW170817 together with the
observation of electromagnetic counterparts across the entire spectrum
inaugurated a new era of multi-messenger astronomy. In this study we
incorporate wavelength-dependent opacities and emissivities calculated from
atomic-structure data enabling us to model both the measured lightcurves and
spectra of the electromagnetic transient AT2017gfo. Best-fits of the
observational data are obtained by Gaussian Process Regression, which allows us
to present posterior samples for the kilonova and source properties connected
to GW170817. Incorporating constraints obtained from the gravitational wave
signal obtained by the LIGO-Virgo Scientific Collaboration, we present a $90\%$
upper bound on the mass ratio $q \lesssim 1.38$ and a lower bound on the tidal
deformability of $\tilde{\Lambda} \gtrsim 197$, which rules out sufficiently
soft equations of state. Our analysis is a path-finder for more realistic
kilonova models and shows how the combination of gravitational wave and
electromagnetic measurements allow for stringent constraints on the source
parameters and the supranuclear equation of state.
