Skip to content

Free energy calculation #30

@fedluc

Description

@fedluc

Problem Statement

Currently, it is not possible to compute the free energy for schemes that are not VS schemes. There are two potential solutions to address this limitation:

  • User-Implemented Integration
    Users can extract the static structure factors from the output files and manually compute the free energy by performing integration over different coupling parameter values using their own implementation of an integration routine.

  • Built-In Python Method (Preferred Solution)
    Implement a Python method that computes the free energy directly, eliminating the need for users to implement their own integration routine.
    Proposed Solution

Proposed Solution

The second approach is the preferred one as it provides a more robust and user-friendly solution. It ensures consistent and accurate integral evaluations using the same routines across all calculations. Below is a high-level implementation plan:

  • Expose the computeFreeEnergy method in thermo_util.cpp to Python.
  • Implement a computeFreeEnergy function in util.py that calls the exposed C++ method.
  • Allow the Python function to accept either:
    • A list of HDF files from which static structure factor data can be extracted.
    • Directly provided internal energy data.
  • Ensure that the HDF files contain data for the lower integration limit (rs = 0):
    • If not provided, compute it automatically.
    • Since all schemes reduce to the HF approximation at rs = 0, a simple RPA solution with default input parameters should be sufficient to obtain the necessary data.

This enhancement would simplify the workflow, improve stability, and ensure consistent free energy computations across different schemes.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions