Skip to content

Obtaining database-ready dataclass#251

Open
MLovetroy wants to merge 101 commits intomasterfrom
to-database
Open

Obtaining database-ready dataclass#251
MLovetroy wants to merge 101 commits intomasterfrom
to-database

Conversation

@MLovetroy
Copy link
Collaborator

@MLovetroy MLovetroy commented Jan 20, 2026

  • Add Calculation._to_database

  • Add base.Refinery._read_to_database

  • Add implementation methods on base.Refinery subclasses, e.g., Band._to_database

  • Add some unit tests

  • Add integration tests for all base.Refinery children using their respective demos

  • Add type hint for base.Refinery._raw_data property on all relevant base.Refinery children

Use (note: also refer to Calculation._to_database and base.Refinery._read_to_database docstrings):

from py4vasp import Calculation
calculation = Calculation.from_path(".")
db_data = calculation._to_database()

Note that calculation._to_database is specifically private because it should never be called directly by the end user, only by the vaspdb module.

@MLovetroy MLovetroy force-pushed the to-database branch 2 times, most recently from 1d608af to 54ba586 Compare January 23, 2026 13:29
MLovetroy and others added 27 commits February 6, 2026 14:34
…a; add RunInfo dataclass & implementation, add to quantities; add additional properties to be written to database
…mple for Structure class for reference how to implement other _to_database methods); refactor some utility into _util.database; safe merging of returned dictionaries; add some explanation on how to implement Quantity._to_database in base.Refinery._read_to_database
[skip ci]
… places; add alias options to available_quantities

[skip ci]
[skip ci]
…utations of dielectric & piezoelectric tensor and elastic modulus; adjust tests accordingly
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 this pull request may close these issues.

2 participants