-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add FEFF schema #41
base: main
Are you sure you want to change the base?
Add FEFF schema #41
Changes from 1 commit
aecd753
afe5b50
69b7b8d
aac4c9e
6269e1b
edf3720
96ce6d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from tiled.adapters.dataframe import DataFrameAdapter | ||
|
||
|
||
# dataframe adapter representing FEFF data | ||
class FEFFAdapter(DataFrameAdapter): | ||
specs = ["FEFF"] |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,3 +145,66 @@ class BatteryChargeMetadataInternal(pydantic.BaseModel): | |
|
||
class BatteryChargeMetadata(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
charge: BatteryChargeMetadataInternal | ||
|
||
class FEFFpotentials(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
x: Optional[str] | ||
ipot: int | ||
Z: str | ||
element: int | ||
l_scmt: int | ||
l_fms: int | ||
#FEFFpotentials = (x, ipot, Z, element, l_scmt, l_fms) | ||
#converted_potentials = str(FEFFpotentials) | ||
#smiles = string | ||
|
||
class FEFFcards(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as my previous comment:
|
||
atoms: float | ||
control: int | ||
exchange: float | ||
title: Optional[str] | ||
rpath: int | ||
potentials: FEFFpotentials | ||
xanes: float | ||
edge: str | ||
scf: float | ||
fms: float | ||
S02: float | ||
corehole: str | ||
#smiles = string | ||
|
||
#class FEFFDataFrame(DataFrameStructure): | ||
#file_input = "xmu.dat" | ||
#omega: float | ||
#e: float | ||
#k: float | ||
#mu: float | ||
#mu0: float | ||
#chi: float | ||
#FEFFDataFrame_inputs = (omega, e, k, mu, mu0, chi) | ||
#smiles = string | ||
|
||
#need to write validation for the Dataframe | ||
|
||
#class ExperimentalFEFFMetadata(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
#FileType = "feff.out"; "feff.inp" | ||
#measurement_type: MeasurementEnum = pydantic.Field("feff", const=True) | ||
#title = measurement_type(pydantic.field("title")) | ||
#absorbing_atom = measurement_type(pydantic.field("edge")) | ||
#cards = measurement_type(FEFFcards) | ||
#smiles = string | ||
|
||
class FEFFInputMetadata(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
element: XDIElement | ||
measurement_type: MeasurementEnum = pydantic.Field("FEFF", const=True) | ||
dataset: str | ||
sample_id: str | ||
input_script: str | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
class FEFFOutputMetadata(pydantic.BaseModel, extra=pydantic.Extra.allow): | ||
element: XDIElement | ||
measurement_type: MeasurementEnum = pydantic.Field("FEFF", const=True) | ||
dataset: str | ||
sample_id: str | ||
#change to output log | ||
output_script: str | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Change to Also, needs a new key: |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is too fine-grained. We can simply remove it for now. All of this is going into
input_script
.