The self-assembly of a hydrogen bond "donor-acceptor" system with fluorinated pyridyl groups is considered to study the emergence of different ordered structures bonded by weak C-H center dot center dot center dot F and C-H center dot center dot center dot N bonds. We model the ordering of 4,4'-bis(2,6-difluoropyridin4-yl)-1,1'-biphenyl (BDFPBP) as a typical example of this type of linear molecules. BDFPBP on Au(111) is known to assemble into four molecular arrangements: a herringbone phase at room temperature and three other structures at 450-460 K. In our model, we assume partial deprotonation of donor sites in phenyl and pyridyl rings during heating. Therefore, as representatives of the BDFPBP molecular system at higher temperatures, we choose seven types of molecules (one intact and six with differently damaged donor sites) and suggest the mechanisms of their bonding. Using density functional theory, we estimate the energies of different hydrogen-bonding motifs for intact and damaged molecules. We also perform Monte Carlo simulations for homo- and bimolecular ensembles to obtain all experimentally observed molecular phases. In addition, we reveal several new structures and their coexistences with the phases known from experiments.