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

[WIP] MPMorph Flows #818

Closed
wants to merge 206 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
44ce032
Added EOS and MP-compat EOS workflows
Oct 12, 2023
8975f6a
Add EOS jobs, fix broken wf
Oct 13, 2023
bd413a9
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Oct 13, 2023
17ee679
fix broken mp eos flow
Oct 13, 2023
ea784e8
Merge branch 'EOS_workflows' of https://github.com/esoteric-ephemera/…
Oct 13, 2023
68a4062
fix update_user_incar_settings
Oct 13, 2023
e3768fe
rewrite TransmuterMaker in vasp.EOS.jobs to allow changing transforma…
Oct 13, 2023
202222d
typo defomration --> deformation
Oct 13, 2023
fc1777e
fix accession of output reference objects
Oct 13, 2023
5f1538f
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Oct 16, 2023
2a2360e
Add postprocessing step to EOS flow
Oct 16, 2023
18b0f1f
Merge branch 'EOS_workflows' of https://github.com/esoteric-ephemera/…
Oct 16, 2023
5377b96
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Oct 18, 2023
3259de2
Add statics to MP-GGA EOS WFs, add MP-Meta-GGA compat WFs
Oct 19, 2023
519a987
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Oct 19, 2023
bca3ef4
bug fix r2SCAN EOS WF
Oct 19, 2023
d0a4b55
precommit fixes
Oct 19, 2023
7d8e7ea
fix ISMEAR/SIGMA in EOS relax
Oct 19, 2023
73f8fd8
Pop KSPACING from MP Meta-GGA INCAR tags
Oct 19, 2023
154710f
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Oct 20, 2023
825d109
Fix EOS input sets - incorrectly assumed inheritance of base class ge…
Oct 23, 2023
c27cdb5
overhaul legacy GGA and modern GGA sets/jobs/flows
Nov 3, 2023
4df690c
refactor flow / postprocess
Nov 3, 2023
7228d5d
fix typo in EOS flow
Nov 3, 2023
9248f01
Add tiered double-relaxation (coarse --> fine) for GGA EOS
Nov 3, 2023
d866319
Add failsafe for when EOS fitting fails
Nov 8, 2023
98cd125
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Nov 17, 2023
57e3cb0
Finished tests for MP EOS jobs and flows
esoteric-ephemera Nov 21, 2023
b429969
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Nov 21, 2023
18cafe0
Edits for maintainer comments: change EOS --> eos, pare down test files
esoteric-ephemera Nov 22, 2023
cc7ad4b
renaming EOS --> eos (why does MacOS have to be case-insensitive)
esoteric-ephemera Nov 22, 2023
0262d14
renamed EOS --> eos (why does MacOS have to be case-insensitive)
esoteric-ephemera Nov 22, 2023
0825d38
more case insensitive values why oh why oh why
esoteric-ephemera Nov 22, 2023
355cd90
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Dec 14, 2023
4541329
Generalization of EOS routines to make common template for flow; rema…
esoteric-ephemera Dec 15, 2023
c0bd2a3
Refactor generalized EOS wfs, ignore pre-commit
esoteric-ephemera Jan 18, 2024
a8d57aa
Refactor generalized EOS wfs, ignore pre-commit
esoteric-ephemera Jan 18, 2024
b85c932
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Jan 19, 2024
26cee09
Refactor to ensure correct flow
esoteric-ephemera Jan 19, 2024
d953305
remove key from jobs
esoteric-ephemera Jan 19, 2024
36a56b3
fix postprocess dict update
esoteric-ephemera Jan 22, 2024
585947b
Fix linting
esoteric-ephemera Jan 22, 2024
f34d353
fix init
esoteric-ephemera Jan 22, 2024
7a129dc
Add MLFF EOS workflows and tests for these
esoteric-ephemera Jan 22, 2024
bc52ff7
remove mystery vasp docs
esoteric-ephemera Jan 22, 2024
ca6404f
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Jan 22, 2024
dd34433
Clean up ML FF EOS test
esoteric-ephemera Jan 22, 2024
31975f7
Trying to suss why CHGNet and M3GNet tests pass locally but fail in CI
esoteric-ephemera Jan 22, 2024
5773d4b
Ensure consistent ML FF dtype in tests
esoteric-ephemera Jan 22, 2024
f97c8de
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Jan 24, 2024
46f579a
mpmorph features: added equilibrate.py in atomate2.common.jobs, amorp…
BryantLi-BLI Feb 2, 2024
14e74e2
small edits
BryantLi-BLI Feb 2, 2024
bc5748d
fixed some dataclasses that were not defined with Maker prorperly
BryantLi-BLI Feb 2, 2024
aaaaa62
fixed some dataclasses that were not defined with Maker prorperly v2
BryantLi-BLI Feb 2, 2024
d997594
Merge remote-tracking branch 'aaron/EOS_workflows' into feature/mpmorph
BryantLi-BLI Feb 3, 2024
68ab7a8
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Feb 3, 2024
5ca52b9
added EquilibriumVolumeMaker in atomate2.common.flows.amorphous.py to…
BryantLi-BLI Feb 3, 2024
7c2d799
modified beta version of EquilibriumVolumeMaker
BryantLi-BLI Feb 5, 2024
7faa846
Merge branch 'materialsproject:main' into EOS_workflows
esoteric-ephemera Feb 5, 2024
999d00d
debug EquilibriumVolumeMaker, modified eos.py in both flows and jobs …
BryantLi-BLI Feb 6, 2024
26b279a
modified logic of equilibriumvolumemaker
BryantLi-BLI Feb 6, 2024
6b870e3
current version of EVM (equilibriumvolumemaker) is stuck in an infini…
BryantLi-BLI Feb 6, 2024
b5d47e7
test
BryantLi-BLI Feb 6, 2024
9d0526e
added job decorator to make function in EVM
BryantLi-BLI Feb 6, 2024
bc8b145
refactor postprocessing step to be MSONable class, preparation for MP…
esoteric-ephemera Feb 7, 2024
ee3a37d
Merge remote-tracking branch 'atomate2/EOS_workflows' into feature/mp…
esoteric-ephemera Feb 7, 2024
44b4828
Slight refactor / typo cleanup
esoteric-ephemera Feb 7, 2024
63ec47f
Merge remote-tracking branch 'atomate2/EOS_workflows' into feature/mp…
esoteric-ephemera Feb 7, 2024
7b2b3f4
Refactor equilibration flow, add docstr
esoteric-ephemera Feb 7, 2024
3dff87d
correct typo
esoteric-ephemera Feb 7, 2024
c74c5d1
Merge branch 'materialsproject:main' into feature/mpmorph
BryantLi-BLI Feb 7, 2024
cf3d842
Merge branch 'feature/mpmorph' of https://github.com/BryantLi-BLI/ato…
BryantLi-BLI Feb 12, 2024
6ec384f
Rebased the feature/mpmorph branch on top of the latest master branch…
BryantLi-BLI Feb 12, 2024
f6ed5e2
modified EVM to streamline some bugs; first if statement can produce …
BryantLi-BLI Feb 13, 2024
9f0fe78
tests with postprocessor maker for EquilVolMaker
BryantLi-BLI Feb 13, 2024
1207216
Clean up equilibrate volume wf, add atomate2.vasp.flows.test_mpmorph
esoteric-ephemera Feb 14, 2024
a1fc273
resolve merge conflicts
esoteric-ephemera Feb 14, 2024
3d0f463
updates to pytest for test_mpmorph.py; seems like the flow works prop…
BryantLi-BLI Feb 15, 2024
ab90395
Cleanup, remove unneeded jobs
esoteric-ephemera Feb 15, 2024
d94dbb5
fix equilibration and mpmorph wflows
esoteric-ephemera Feb 15, 2024
7f7a14d
added tests and tes data for recursion and mpmorph maker test in test…
BryantLi-BLI Feb 15, 2024
e9d05f1
fix pressure updating in recursive equilibration
esoteric-ephemera Feb 15, 2024
8c5dd54
cleaned up test_mpmorph.py, tests should work now
BryantLi-BLI Feb 15, 2024
7637392
FF MD fully implemented
esoteric-ephemera Feb 15, 2024
659ad4a
change MD defaults to be NVT + Langevin dynamics
esoteric-ephemera Feb 15, 2024
524896c
added docstring to amorphous.py in common dir and cleaned up some files
BryantLi-BLI Feb 16, 2024
ade233e
add md defaults that are as consistent with vasp implementation as po…
esoteric-ephemera Feb 16, 2024
e27b3fa
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Feb 16, 2024
db51e23
correct typing of langevin friction coeff
esoteric-ephemera Feb 16, 2024
1dcad1d
Add option to ForceFieldTaskDocument to store trajectory information …
esoteric-ephemera Feb 16, 2024
47a6180
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Feb 16, 2024
35fa20d
Add tests, remove dependence on pickle for trajectory i/o
esoteric-ephemera Feb 16, 2024
0d8fdef
fix tests, update matgl dependence
esoteric-ephemera Feb 17, 2024
013d113
rename MD forcefield class vars to be consistent with VASP MDSetGener…
esoteric-ephemera Feb 20, 2024
56c81c0
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Feb 22, 2024
1ec5910
Add option to explicitly specify thermostat as ASE MolecularDynamics …
esoteric-ephemera Feb 22, 2024
1e4fcb7
refactoring and add T/P schedule
Feb 23, 2024
317412c
implement T/P schedule and attach callback func
Feb 24, 2024
76ffa66
np.nan
Feb 24, 2024
8253a35
np.nan
Feb 24, 2024
96ae784
Merge branch 'mlff_md' of github.com:esoteric-ephemera/atomate2 into …
Feb 24, 2024
fa83b5f
Merge remote-tracking branch 'aaron/mlff_md' into feature/mpmorph
BryantLi-BLI Feb 26, 2024
298250d
small fixes
Feb 27, 2024
0045b2b
pass ASE dynamics object instead of class, update docstring
Feb 27, 2024
b870c04
add temp ramp test and make sure upper tria matrix cell
Feb 28, 2024
71728a3
add stresses to trajeoctroy observer, add pressure schedule test
Feb 28, 2024
3256169
Merge branch 'mlff_md' of https://github.com/esoteric-ephemera/atomat…
BryantLi-BLI Feb 29, 2024
45ddaa1
avoid `stresses` key not in taskdoc bug
Feb 29, 2024
74bf6a0
Refactory TrajectoryObserver, add option to save trajectory as either…
esoteric-ephemera Mar 1, 2024
8f7fe84
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Mar 1, 2024
9ff7dae
Change decomposition to upper triangular cell only when Nose-Hoover r…
esoteric-ephemera Mar 1, 2024
4d0e2d3
Merge remote-tracking branch 'upstream/main' into feature/mpmorph
BryantLi-BLI Mar 1, 2024
9935928
readded MPMorphPostProcessor
BryantLi-BLI Mar 1, 2024
4e13971
fix on apply_strain_to_structure job in amorphous.py in common
BryantLi-BLI Mar 1, 2024
bc6adf5
un-jobbed apply_strain_to_structure
BryantLi-BLI Mar 1, 2024
e7bc9d2
debug after upstream merge. Pytests work now
BryantLi-BLI Mar 1, 2024
9ea1ef9
Fix failing tests
esoteric-ephemera Mar 1, 2024
8727300
Change MD default TaskDoc ionic step to only store mandatory info
esoteric-ephemera Mar 1, 2024
56edc31
update pymatgen requirement because of CifParser deprecation
esoteric-ephemera Mar 1, 2024
b52a888
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Mar 4, 2024
5bbe9d7
Significant refactor to all forcefield jobs. Use commmon ASE calc str…
esoteric-ephemera Mar 6, 2024
656c5d6
Merge branch 'main' into mlff_md
esoteric-ephemera Mar 6, 2024
21dd709
Fix forcefield utils test and lint
esoteric-ephemera Mar 6, 2024
9ba7d29
Add revert_dtype env for running forcefield relax and md jobs / undo …
esoteric-ephemera Mar 6, 2024
0e8cce1
Merge branch 'main' into mlff_md
esoteric-ephemera Mar 7, 2024
8a2451e
refactor nequip jobs, add md default for nequip
esoteric-ephemera Mar 8, 2024
38ad2d6
Add GAP and Nequip MD tests, fix arg / kwarg passing in MD
esoteric-ephemera Mar 8, 2024
ac4916b
remove calculator_args / ase_calculator args, revert phonon job change
esoteric-ephemera Mar 8, 2024
21af2ae
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Mar 8, 2024
c19b39b
remove todo about adding magmoms to forcefield traj observer as that'…
esoteric-ephemera Mar 8, 2024
d95397d
Remove comments, add option to seed rng for MB velocities, turn on id…
esoteric-ephemera Mar 13, 2024
770aa3a
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Mar 13, 2024
3fa7b27
Merge branch 'materialsproject:main' into mlff_md
esoteric-ephemera Mar 25, 2024
8ecc1d1
Ensure CHGNet and M3GNet relax / static makers convert stress to eV/A…
esoteric-ephemera Mar 25, 2024
7b8f584
fix M3GNet test related to outdated cached model
esoteric-ephemera Mar 25, 2024
9dd428f
Merge branch 'mlff_md' of https://github.com/esoteric-ephemera/atomat…
BryantLi-BLI Mar 25, 2024
de912e3
refactor slightly
esoteric-ephemera Mar 26, 2024
030dc33
clean up names for files and docstrings
BryantLi-BLI Mar 27, 2024
516c954
implemented SlowQuench and FastQuench and finalized version of MPMorp…
BryantLi-BLI Mar 27, 2024
d6c9499
minor updates to imports in mpmorph.py in forcefields and vasp
BryantLi-BLI Mar 27, 2024
7362fc8
finalized format of mpmorph.py for forcefields and fixed some errors …
BryantLi-BLI Mar 27, 2024
53f6177
minor typos and errors fix in mpmorph.py of forcefields
BryantLi-BLI Mar 27, 2024
5ab1ae8
modified post init procedure for forcefields mpmorph.py
BryantLi-BLI Mar 28, 2024
c08c458
test for mpmorph.py in forcefields
BryantLi-BLI Apr 4, 2024
d39cd7e
fix field init
esoteric-ephemera Apr 4, 2024
eb8e2fd
remove test notebook
esoteric-ephemera Apr 4, 2024
5ffc21b
new forcefields edits
BryantLi-BLI Apr 4, 2024
e9217dc
refactor postprocessing
esoteric-ephemera Apr 4, 2024
0f4aaf5
finalized version of MPMorphMLFFMDMaker; the flows works with all inp…
BryantLi-BLI Apr 4, 2024
6c03bb0
added LJ potentials for tests; works with all forcefield jobs (static…
BryantLi-BLI Apr 4, 2024
08ca5b1
added mpmorph.py for LJ, CHGnet, M3GNet, MACE and fixed typos
BryantLi-BLI Apr 4, 2024
fe9327a
remove print statements in mpmorph.py
BryantLi-BLI Apr 4, 2024
32644d2
minor changes to mpmorph.py in vasp.flows
BryantLi-BLI Apr 4, 2024
537fac6
extra minor changes to mpmorph.py in vasp.flows
BryantLi-BLI Apr 4, 2024
57c1a05
cleaned up mpmorph.py in forcefields and how it calls slowquench and …
BryantLi-BLI Apr 9, 2024
bcfe83f
fixed some typos of which class is inherited in mpmorph.py in forcefi…
BryantLi-BLI Apr 9, 2024
9708e26
cleaned up mpmorph.py in vasp, similiar clean up to what was done in …
BryantLi-BLI Apr 9, 2024
c8928b1
minor typo fixes from previous commit
BryantLi-BLI Apr 9, 2024
b56bebc
fixed typos
BryantLi-BLI Apr 9, 2024
96214cf
fix recursion in equlibratemaker if use EV eos
BryantLi-BLI Apr 9, 2024
d9ba084
cleaned up some print statements
BryantLi-BLI Apr 9, 2024
25c6224
added old mpmorph code and preliminary draft of amorphouslimitmaker
BryantLi-BLI Apr 9, 2024
02215fb
update on repo for correct tests; added amorphous structure gen; and …
BryantLi-BLI Apr 15, 2024
85b4131
Merge remote-tracking branch 'upstream/main' into feature/mpmorph
esoteric-ephemera Apr 16, 2024
e6c5e62
cleanup after merge
esoteric-ephemera Apr 16, 2024
fc38d46
remove potcar / vaspout
esoteric-ephemera Apr 16, 2024
da06e67
add back missing docs and .git* files
esoteric-ephemera Apr 16, 2024
df6931e
adding back more missing docs
esoteric-ephemera Apr 16, 2024
261048b
add post init methods
esoteric-ephemera Apr 17, 2024
a3f80d7
Add LJ potential back
esoteric-ephemera Apr 17, 2024
5ad19a0
temp pytest modificiations and others
BryantLi-BLI Apr 17, 2024
27c13ed
nsteps --> n_steps conversion for all but VASP input sets
esoteric-ephemera Apr 17, 2024
513d867
added pyace MDMaker and also tinkering with test_mpmorph in mlff
BryantLi-BLI Apr 19, 2024
d2994cc
added tests; working for regular MPMorph, Slow quench, and Fast quench
BryantLi-BLI Apr 23, 2024
bb88329
add quench_maker_kwargs to MPMorphMLFFMDMaker / post-init method
esoteric-ephemera Apr 23, 2024
a7c0f5e
linting, in part
esoteric-ephemera Apr 23, 2024
eaaff72
remove potcar
esoteric-ephemera Apr 23, 2024
a677f4b
cleaned up new post init method for updating quench kwargs; applied f…
BryantLi-BLI Apr 24, 2024
7c5ae6e
added linear quench and hold functionality to all mpmorph slowquench …
BryantLi-BLI Apr 24, 2024
bf07e24
mlff mpmorph pytest all complete and passing
BryantLi-BLI Apr 24, 2024
7f59817
sync test data with remote
esoteric-ephemera Apr 24, 2024
d795b93
remove psps
esoteric-ephemera Apr 24, 2024
d6ee033
import error for DEFAULT HANDLERS is now resolved
BryantLi-BLI Apr 25, 2024
d3afe6a
typo fix on DEFAULT HANDLERS
BryantLi-BLI Apr 25, 2024
5fd1b4e
Merge branch 'materialsproject:main' into feature/mpmorph
BryantLi-BLI May 1, 2024
3ddb302
Merge branch 'materialsproject:main' into feature/mpmorph
BryantLi-BLI May 14, 2024
63f8d31
added mpmorph vasp pytests base; improvements coming soon
BryantLi-BLI May 22, 2024
cdd6137
format corrections
BryantLi-BLI May 22, 2024
4f3a05e
finalized pytests for mpmorph_vasp_maker
BryantLi-BLI May 22, 2024
ff55bb1
Merge branch 'feature/mpmorph' of https://github.com/BryantLi-BLI/ato…
BryantLi-BLI May 22, 2024
e96bcb4
changed single_steps default settings for vasps slowquench and fastqu…
BryantLi-BLI May 22, 2024
3f58bc3
minor fixes for lambda function for fast quench
BryantLi-BLI May 22, 2024
59f7293
fixed typo in return statement for how slowquenchvasp works
BryantLi-BLI May 22, 2024
6233177
partial linting/pre-commit
esoteric-ephemera May 22, 2024
5b5a9ec
functioning pytest for mpmorph vasp and slow quench makers
BryantLi-BLI May 30, 2024
34c6619
Merge branch 'feature/mpmorph' of https://github.com/BryantLi-BLI/ato…
BryantLi-BLI May 30, 2024
7be4983
Merge branch 'materialsproject:main' into feature/mpmorph
BryantLi-BLI May 30, 2024
db85df0
draft of pytest
BryantLi-BLI Jun 3, 2024
a8c5dc7
Merge branch 'feature/mpmorph' of https://github.com/BryantLi-BLI/ato…
BryantLi-BLI Jun 3, 2024
67b78ff
fixed pyacemdmaker
BryantLi-BLI Jun 4, 2024
fc18223
Merge branch 'materialsproject:main' into feature/mpmorph
BryantLi-BLI Jun 4, 2024
7909b81
update gamma-point only generation
esoteric-ephemera Jun 4, 2024
97d5879
fix mpmorph tests
esoteric-ephemera Jun 4, 2024
dbeb1cf
finalize small fixes to pytest for mpmorph
BryantLi-BLI Jun 4, 2024
0840bac
fixed gamma k points error in test_mpmorph.py
BryantLi-BLI Jun 25, 2024
3032dd8
sketch energy averaging for EOS fit
esoteric-ephemera Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
517 changes: 517 additions & 0 deletions src/atomate2/common/flows/mpmorph.py

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions src/atomate2/common/jobs/eos.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,3 +358,96 @@ def apply_strain_to_structure(structure: Structure, deformations: list) -> list:
)
transformations += [ts]
return transformations


def _apply_strain_to_structure(structure: Structure, deformations: list) -> list:
"""
Apply strain(s) to input structure and return transformation(s) as list.

Parameters
----------
structure: .Structure
Input structure to apply strain to
deformations: list[.Deformation]
A list of deformations to apply **independently** to the input
structure, in anticipation of performing an EOS fit.
Deformations should be of the form of a 3x3 matrix, e.g.,
[[1.2, 0., 0.], [0., 1.2, 0.], [0., 0., 1.2]]
or
((1.2, 0., 0.), (0., 1.2, 0.), (0., 0., 1.2))

Returns
-------
list
A list of .TransformedStructure objects corresponding to the
list of input deformations.
"""
transformations = []
for deformation in deformations:
# deform the structure
ts = TransformedStructure(
structure,
transformations=[DeformStructureTransformation(deformation=deformation)],
)
transformations += [ts]
return transformations


class MPMorphPVPostProcess(PostProcessEosPressure):
"""Modified p(V) fit to accommodate MPMorph."""

def eval(self) -> None:
"""Fit the input data to the Birch-Murnaghan pressure EOS."""
initial_pars = self._initial_fit()
for jobtype in self._use_job_types:
eos_params, ierr = leastsq(
self._objective, initial_pars[jobtype], args=(jobtype,)
)
self.results[jobtype]["EOS"] = {}
if ierr not in (1, 2, 3, 4):
self.results[jobtype]["EOS"]["exception"] = (
"Optimal EOS parameters not found."
)
else:
for i, key in enumerate(["b0", "b1", "v0"]):
self.results[jobtype]["EOS"][key] = eos_params[i]

self.results["V0"] = self.results[jobtype]["EOS"].get("v0")
self.results["Vmax"] = max(self.results["relax"]["volume"])
self.results["Vmin"] = min(self.results["relax"]["volume"])


class MPMorphEVPostProcess(PostProcessEosEnergy):
"""Modified E(V) fit to accommodate MPMorph."""

eos_models: tuple[str, ...] = (
"vinet",
"birch_murnaghan",
"birch",
"pourier_tarantola",
"murnaghan",
)

def eval(self) -> None:
"""Fit the input data to the Birch-Murnaghan pressure EOS."""
for jobtype in self._use_job_types:
self.results[jobtype]["EOS"] = {}
for eos_name in self.eos_models:
try:
eos = EOS(eos_name=eos_name).fit(
self.results[jobtype]["volume"], self.results[jobtype]["energy"]
)
self.results[jobtype]["EOS"][eos_name] = {
**eos.results,
"b0 GPa": float(eos.b0_GPa),
}
except EOSError as exc:
self.results[jobtype]["EOS"][eos_name] = {"exception": str(exc)}

for eos_func in self.eos_models:
if v0 := self.results[jobtype]["EOS"][eos_func].get("v0"):
self.results["V0"] = v0
break

self.results["Vmax"] = max(self.results["relax"]["volume"])
self.results["Vmin"] = min(self.results["relax"]["volume"])
Loading
Loading