Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extracting the extrapolated energy #3

Open
mkrompiec opened this issue Nov 3, 2023 · 1 comment
Open

extracting the extrapolated energy #3

mkrompiec opened this issue Nov 3, 2023 · 1 comment

Comments

@mkrompiec
Copy link

mkrompiec commented Nov 3, 2023

The current parser extracts the first value of the energy, rather than the extrapolated one (if extrapolation is performed).
To get the extrapolated energy, extrapolate.py must be run after SHCI and the parser would have to be modified, e.g.:

def read_energy(shciobj, state_id=None):
    result = get_result(shciobj)

    if state_id is None:
        state_id = '%.2e' % (min(shciobj.config['eps_vars']))

    if 'energy_total' in result:
        if 'extrapolated' in result['energy_total']:
            e= result['energy_total']['extrapolated']['value']
        else:
            e = list(list(result["energy_total"].values())[0].values())[0]["value"]
    else:
        e = result['energy_var'][state_id]
    return e

@mkrompiec
Copy link
Author

Alternatively, extrapolation could be moved from extrapolate.py into the SHCISCF class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant