Skip to content

Commit

Permalink
Merge pull request #137 from JaGeo/main
Browse files Browse the repository at this point in the history
[WIP] VASP/Phonopy Phonon Workflow
  • Loading branch information
utf committed Sep 6, 2022
2 parents ad3f188 + faf9515 commit 4dbeccb
Show file tree
Hide file tree
Showing 200 changed files with 2,782 additions and 23 deletions.
10 changes: 6 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ classifiers = [
"Topic :: Scientific/Engineering",
]
requires-python = '>="3.8"'
dependencies = [
"pymatgen>=2022.7.8",
"custodian>=2019.8.24",
dependencies =[
"pymatgen>=2022.8.23",
"custodian>=2022.5.26",
"pydantic",
"monty",
"jobflow>=0.1.5",
Expand All @@ -38,7 +38,7 @@ dependencies = [
[project.optional-dependencies]
amset = ["amset>=0.4.15", "pydash"]
cclib = ["cclib"]
phonons = ["phonopy>=1.10.8"]
phonons = ["phonopy>=1.10.8", "seekpath"]
docs = [
"numpydoc==1.3.1",
"mistune==0.8.4",
Expand All @@ -62,6 +62,8 @@ strict = [
"click==8.1.3",
"PyYAML==6.0",
"cclib==1.7.1",
"phonopy==2.15.1",
"seekpath==2.0.1",
"numpy",
]

Expand Down
39 changes: 30 additions & 9 deletions src/atomate2/common/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,46 @@

from atomate2 import SETTINGS

__all__ = ["structure_to_primitive", "structure_to_conventional"]


@job
def symmetrize_structure(
structure: Structure, symprec: float = SETTINGS.SYMPREC
) -> Structure:
def structure_to_primitive(structure: Structure, symprec: float = SETTINGS.SYMPREC):
"""
Symmetrize a structure.
Job that creates a standard primitive structure.
Parameters
----------
structure : .Structure
A structure.
symprec : float
The symmetry precision.
structure: Structure object
input structure that will be transformed
symprec: float
precision to determine symmetry
Returns
-------
.Structure
A symmetrized structure
"""
sga = SpacegroupAnalyzer(structure, symprec=symprec)
return sga.get_primitive_standard_structure()


@job
def structure_to_conventional(structure: Structure, symprec: float = SETTINGS.SYMPREC):
"""
Job hat creates a standard conventional structure.
Parameters
----------
structure: Structure object
input structure that will be transformed
symprec: float
precision to determine symmetry
Returns
-------
.Structure
"""
sga = SpacegroupAnalyzer(structure, symprec=symprec)
return sga.get_conventional_standard_structure()
Loading

0 comments on commit 4dbeccb

Please sign in to comment.