Petroleum is a valuable natural resource, and it is therefore of great significance to exploit the maximum economic potentials of the hydrocarbon molecules. Under current circumstances, marginal profit of the refining industry is highly affected by heavier and sourer crude oils, stricter environmental regulations, more stringent product specifications and higher market demands of lighter products, all of which emphasize the importance of secondary processes such as hydrotreating and hydrocracking. The lumping methods for process modelling are no longer applicable as they fail to predict properties and compositions of products, which are strictly restricted by specifications. They cannot provide detailed strategies of process control, schedule and optimisation either. Therefore, molecular management, which aims to fulfill the value of every single molecule, is the key for the refining industry to have a sustainable future. In this work, the molecular type homologous series (MTHS) matrix has been adapted and improved for molecular characterisation of petroleum fractions. The pseudo-component based MTHS matrix is extended to heavy fractions up to 800K and homologous series for hydrocarbons with heteroatoms are incorporated in the improved MTHS matrix. Molecular structure-property correlations are developed to estimate properties of sulphur compounds, which enhances the applicability and feasibility of this new MTHS matrix. In terms of the transformation method, the volume average boiling point (VABP) concept is introduced to consider both the distribution of molecules in one homologous series and the interactions between different homologous series. The proposed MTHS is applied to predicting cetane number of a light cycle oil stream, and has discovered the influence of the composition of hydrocarbon types on the cetane number in specified temperature cuts. Furthermore, the MTHS methodology is applied in the molecular modelling of diesel hydrotreating and hydrocracking. For diesel hydrotreater, a molecular modelling of three-phase reactor is developed, and the effects of various operation conditions on both the performance of the reactors and the changes of different compounds are investigated. According to the analysis of sulphur compounds concentration profile through the reactors and distribution of the molecules in the MTHS, a new two-parallel reactor process model is proposed in terms of ultra low sulphur diesel (ULSD) production, which benefits from not only lower capital and operating costs, but also flexible control to maintain high throughput and profits. A rigorous molecular modelling of hydrocracker is developed based on the MTHS characterisation of feedstock and product. Individual reaction kinetics in the complex reaction network is estimated by the quantitative structure/reactivity correlations (QSRC). The model is capable of predicting gas and liquid products properties, yields, distribution of naphtha, jet fuel, diesel fuel and residue in the liquid fraction as well as compositions of different types of hydrocarbon in specified temperature ranges with high accuracy.