C++ & Python code redesign of DNA Partition function calculations