Organizing a chemical space so that elements with similar properties would take neighboring places in a sequence can help to predict new materials. In this paper, we propose a universal method for generating such a one-dimensional sequence of elements, e.g., at arbitrary pressure, which could be used to create a well-structured chemical space of materials and facilitate the discovery of new materials. This work clarifies the physical meaning of Mendeleev numbers (MNs): the idea of MN was empirically proposed by Pettifor, but we show that MNs are a result of collapsing the most important atomic properties (size, electronegativity, etc.) into one number. This gives us a recipe to compute nonempirical MNs. We compare our proposed sequence of elements with alternative Mendeleev numbers using the data for hardness, magnetization, enthalpy of formation, and atomization energy. For an unbiased evaluation of the MNs, we compare clustering rates, and find that our nonempirical MNs achieve overall the best clustering of compounds with similar properties.