Molecules being often described using a graph representation, graph kernels provide an interesting framework which allows to combine machine learning and graph theory in order to predict molecule's properties. However, some of these properties are induced both by relationships between the aACM Transactions on Mathematical Software of a molecule and by constraints on the relative positioning of these aACM Transactions on Mathematical Software. Graph kernels based solely on the graph representation of a molecule do not encode this relative positioning of aACM Transactions on Mathematical Software and are consequently unable to predict accurately some molecule's properties. This paper presents a new method which incorporates spatial constraints into the graph kernel framework in order to overcome this limitation.