""" 
The main purpose of this script is to show how to compute the partition fonction
 of a molecule by using the database.

Author: J-M. Glorian
Author: M. Boiziot
Date: 01/20/16
Version: 2
Last update: 12-jan-2026
Licence: CeCILL-C
Tested on: CASSIS 6.5
"""


# The import
from eu.omp.irap.cassis.database.access import AccessDataBase

# Init the connection with the currently configured database.
connection = AccessDataBase.getDataBaseConnection()

"""
Compute the partition function of a molecule:
    .buildQt(temperature, moleculeTag) : this return the value of the partition function.

For exemple for the molecule tag 28503 (CO, v=0) with a temperature of 10:
"""
val = connection.buildQt(10, '28503');
print(val)
