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

Allow generation of Fortran include or module file from NIST codata #256

Closed
awvwgk opened this issue Mar 12, 2021 · 3 comments · Fixed by #257
Closed

Allow generation of Fortran include or module file from NIST codata #256

awvwgk opened this issue Mar 12, 2021 · 3 comments · Fixed by #257

Comments

@awvwgk
Copy link
Contributor

awvwgk commented Mar 12, 2021

Is your feature request related to a problem? Please describe.

The NIST codata available in qcel can currently be exported to a C header, it would be interesting to have an export to a Fortran include or module file as well.

Describe the solution you'd like

Have an additional function in https://github.com/MolSSI/QCElemental/blob/master/qcelemental/physical_constants/context.py to export a Fortran include or module file.

Describe alternatives you've considered

The C header could be included in Fortran as well since it only contains macro definitions.

Additional context

Discussion on parsing NIST codata on the Fortran discourse: https://fortran-lang.discourse.group/t/tips-to-make-this-toy-program-faster/803/38

@loriab
Copy link
Collaborator

loriab commented Mar 12, 2021

Generating a Fortran header would be a welcome addition. That C header is tailored for Psi4, and the idea was any number of header exporters could be added to bridge btwn the qcel representation and whatever downstream programs need.

@awvwgk
Copy link
Contributor Author

awvwgk commented Mar 12, 2021

Is there a CI check in this repository of the C header we could replicate in Fortran?

@loriab
Copy link
Collaborator

loriab commented Mar 12, 2021

Only that it writes, not that it roundtrips. https://github.com/MolSSI/QCElemental/blob/master/qcelemental/tests/test_constants.py#L106-L110

Diff with the existing header has been the sanity/format check. Admittedly not very strong w/o an existing downstream.

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

Successfully merging a pull request may close this issue.

2 participants