The paper focuses on the problem of electrostatic interactions in molecular dynamics simulations of thermal properties of heterocyclic polymers. The study focuses on three thermoplastic polyimides synthesized on the basis of 1,3-bis-(3 0 ,4-dicarboxyphenoxy)benzene (dianhydride R) and three diamines: 4,4 0 -bis-(4 00 -aminophenoxy) diphenylsulfone (diamine BAPS), 4,4 0 -bis-(4 00 -aminophenoxy) biphenyl (diamine BAPB), and 4,4 0 -bis-(4''-aminophenoxy) diphenyloxide (diamine BAPO). In the molecular dynamics simulations these polyimides were described by the Gromos53a5 force field. To parameterize the electrostatic interactions four methods of calculating the partial atomic charges were chosen: B3LYP/6-31G*(Mulliken), AM1(Mulliken), HF/6-31G*(Mulliken), and HF/6-31G*(ChelpG). As our parameterization is targeted to reproduce thermal properties of the thermoplastic polyimides, the choice of proper partial charges was finalized on a basis of the closest match between computational and experimental data for the thermal expansion coefficients of the polyimides below glass transition temperatures. Our finding clearly show that the best agreement with experimental data is achieved with the Mulliken partial atomic charges calculated by the Hartree-Fock method with 6-31G* basis set. Furthermore, in addition to the thermal expansion coefficients this set of partial atomic charges predicts an experimentally observed relationship between glass transition temperatures of the three polyimides under study:. A mechanism behind the change in thermal properties upon the change in the chemical structure in considered polyimides may be related to an additional spatial ordering of sulfone groups due to dipole-dipole interactions. Overall, the modified force-field is proved to be suitable for accurate prediction of thermal properties of thermoplastic polyimides and can serve as a basis for building up atomistic theoretical models for describing other heterocyclic polymers in bulk.