First-Principles Study on the Structural and Thermal Properties of Molecular Crystals and Liquids