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

Outputs - JDFTx IO Module #4190

Merged
merged 32 commits into from
Jan 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
d16358c
sourcing output code from master to this branch
benrich37 Nov 21, 2024
8d3cc80
sourcing output code from master to this branch
benrich37 Nov 21, 2024
d1204ba
Update from master
benrich37 Nov 22, 2024
7242584
source from master
benrich37 Nov 22, 2024
20139fb
update from master
benrich37 Nov 22, 2024
502d587
changing enumeration of valence electrons (the `valences` method does…
benrich37 Nov 22, 2024
4816d65
added "to_dict" method to JDFTXOutfile
benrich37 Nov 26, 2024
1ce7200
adding `JDFTXOutfileSlice` to "test_dict_repr" in "test_repr_out.py"
benrich37 Nov 26, 2024
09ee43d
removing fatal error from retrieving t_s from a JOutStructure that is…
benrich37 Nov 26, 2024
aa529b0
Correction for ruff - PLC0206 (Extracting value from dictionary witho…
benrich37 Nov 26, 2024
ccf6244
We found some weird behavior when trying to export the JDFTXOutfile o…
benrich37 Dec 3, 2024
26d08f3
adding **kwargs for JOutStructure for flexibility
benrich37 Dec 3, 2024
2b23543
Partial cleanup of tests
benrich37 Dec 4, 2024
6a63bf0
Partial cleanup of tests
benrich37 Dec 4, 2024
726a774
Partial cleanup of tests
benrich37 Dec 4, 2024
78ecd32
Adding "structure" attribute to JOutStructure for convenient way to a…
benrich37 Dec 9, 2024
54810fd
fixes for trajectory
benrich37 Dec 9, 2024
1eddaa6
fix "structure" attribute being initialized as a JOutStructure
benrich37 Dec 9, 2024
32dd0f9
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Dec 12, 2024
a3c2105
Merge branch 'master' into feature-jdftx-outputs
mkhorton Jan 8, 2025
887719d
old updates
benrich37 Jan 13, 2025
47027aa
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Jan 14, 2025
cc68dc3
Changing all "zopen" to just "open" due to an error raised when monty…
benrich37 Jan 14, 2025
6564411
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Jan 16, 2025
b81b892
Merge branch 'master' into feature-jdftx-outputs
shyuep Jan 18, 2025
7ade006
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Jan 21, 2025
2272c24
Merge branch 'master' into feature-jdftx-outputs
shyuep Jan 23, 2025
9ed6ea4
Merge branch 'master' into feature-jdftx-outputs
shyuep Jan 23, 2025
e0405b4
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Jan 23, 2025
ea78047
missing updated from master
benrich37 Jan 23, 2025
fa9c661
Oversight that causes ionic positions from previous strucure to be pa…
benrich37 Jan 24, 2025
c9e260c
Merge branch 'materialsproject:master' into feature-jdftx-outputs
benrich37 Jan 24, 2025
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
644 changes: 644 additions & 0 deletions src/pymatgen/io/jdftx/_output_utils.py

Large diffs are not rendered by default.

1,188 changes: 1,188 additions & 0 deletions src/pymatgen/io/jdftx/jdftxoutfileslice.py

Large diffs are not rendered by default.

532 changes: 532 additions & 0 deletions src/pymatgen/io/jdftx/jelstep.py

Large diffs are not rendered by default.

103 changes: 103 additions & 0 deletions src/pymatgen/io/jdftx/jminsettings.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
"""Store generic minimization settings read from a JDFTx out file.

This module contains the JMinSettings class for storing generic minimization
and mutants for storing specific minimization settings read from a JDFTx out
file.

@mkhorton - this file is ready to review.
"""

from __future__ import annotations

import pprint
from dataclasses import dataclass
from typing import Any


@dataclass
class JMinSettings:
"""Store generic minimization settings read from a JDFTx out file.

Store generic minimization settings read from a JDFTx out file.
"""

params: dict[str, Any] | None = None

def __init__(
self,
params: dict[str, Any] | None = None,
) -> None:
"""Initialize a generic JMinSettings class.

Args:
params (dict[str, Any] | None): A dictionary of minimization settings.
"""
self.params = None if params is None else dict(params)

def __str__(self) -> str:
"""Return a string representation of the minimization settings."""
return pprint.pformat(self)


@dataclass
class JMinSettingsElectronic(JMinSettings):
"""JMInSettings mutant for electronic minimization settings.

A class for storing electronic minimization settings read from a JDFTx out file.
"""

start_flag: str = "electronic-minimize"

def __init__(
self,
params: dict[str, Any] | None = None,
) -> None:
super().__init__(params=params)


@dataclass
class JMinSettingsFluid(JMinSettings):
"""JMInSettings mutant for fluid minimization settings.

A class for storing fluid minimization settings read from a JDFTx out file.
"""

start_flag: str = "fluid-minimize"

def __init__(
self,
params: dict[str, Any] | None = None,
) -> None:
super().__init__(params=params)


@dataclass
class JMinSettingsLattice(JMinSettings):
"""JMInSettings mutant for lattice minimization settings.

A class for storing lattice minimization settings read from a JDFTx out file.
"""

start_flag: str = "lattice-minimize"

def __init__(
self,
params: dict[str, Any] | None = None,
) -> None:
super().__init__(params=params)


@dataclass
class JMinSettingsIonic(JMinSettings):
"""JMInSettings mutant for ionic minimization settings.

A class for storing ionic minimization settings read from a JDFTx out file.
"""

start_flag: str = "ionic-minimize"

def __init__(
self,
params: dict[str, Any] | None = None,
) -> None:
super().__init__(params=params)
Loading
Loading