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

Define the generic format in a separate file #174

Closed
wants to merge 12 commits into from
Closed

Conversation

jan-janssen
Copy link
Member

@jan-janssen jan-janssen commented Jan 5, 2024

To make the code more human readable, I introduce atomistics/shared/generic.py, which defines the output keys in a human-readable way. For example for the static calculation:

static_calculation_output_keys = (
    "forces",  # np.ndarray (n, 3) [eV / Ang^2]
    "energy",  # float [eV]
    "stress",  # np.ndarray (3, 3) [GPa]
    "volume",  # float [Ang^3]
)

In atomistics/shared/output.py the data classes are then generated using dataclasses.make_dataclass.

@jan-janssen jan-janssen added the format_black Launch the pyiron/actions black formatting routine label Jan 5, 2024
pyiron-runner and others added 3 commits January 5, 2024 15:45
…ormat

# Conflicts:
#	atomistics/calculators/ase.py
#	atomistics/calculators/qe.py
#	atomistics/shared/thermal_expansion.py
#	atomistics/workflows/evcurve/debye.py
#	atomistics/workflows/evcurve/workflow.py
#	atomistics/workflows/phonons/workflow.py
#	atomistics/workflows/quasiharmonic.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
format_black Launch the pyiron/actions black formatting routine
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants