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

Addede schemas and new JDFTXOutfile methods #9

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions src/atomate2/jdftx/emmet/core/jdftx/calculation.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,21 +108,25 @@ class CalculationOutput(BaseModel):
@classmethod
def from_jdftxoutput(cls, jdftxoutput: JDFTXOutfile) -> "CalculationOutput":
"""
Create a QChem output document from a QCOutput object.
Create a JDFTx output document from a JDFTXOutfile object.

Parameters
----------
qcoutput
A QCOutput object.
jdftxoutput
A JDFTXOutfile object.

Returns
--------
CalculationOutput
The output document.
"""
optimized_structure = jdftxoutput.structure
electronic_output = jdftxoutput.electronic_output

return cls(
structure=optimized_structure,
Ecomponents=jdftxoutput.Ecomponents,
**electronic_output,

)

Expand All @@ -131,20 +135,17 @@ def from_jdftxoutput(cls, jdftxoutput: JDFTXOutfile) -> "CalculationOutput":


class Calculation(BaseModel):
"""Full QChem calculation inputs and outputs."""
"""Full JDFTx calculation inputs and outputs."""

dir_name: str = Field(None, description="The directory for this QChem calculation")
qchem_version: str = Field(
None, description="QChem version used to perform the current calculation"
)
has_qchem_completed: Union[QChemStatus, bool] = Field(
None, description="Whether QChem calculated the calculation successfully"
dir_name: str = Field(None, description="The directory for this JDFTx calculation")
has_jdftx_completed: Union[QChemStatus, bool] = Field(
None, description="Whether JDFTx calculated the calculation successfully"
)
input: CalculationInput = Field(
None, description="QChem input settings for the calculation"
None, description="JDFTx input settings for the calculation"
)
output: CalculationOutput = Field(
None, description="The QChem calculation output document"
None, description="The JDFTx calculation output document"
)
completed_at: str = Field(
None, description="Timestamp for when the calculation was completed"
Expand Down
Loading