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] Multi step lattice dynamics workflow using hiPhive #559

Open
wants to merge 223 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
223 commits
Select commit Hold shift + click to select a range
43dae04
adding a function to copy hiphive outputs
hrushikesh-s Sep 14, 2023
c163fac
Merge branch 'hiphive' of https://github.com/hrushikesh-s/atomate2 in…
hrushikesh-s Oct 4, 2023
4424f40
hiphive flow and job
hrushikesh-s Oct 4, 2023
8a08ab9
bug fix
hrushikesh-s Oct 4, 2023
1421e04
Merge branch 'materialsproject:main' into hiphive
hrushikesh-s Oct 11, 2023
d15921b
first attempt at adding tests
hrushikesh-s Oct 12, 2023
dcfda62
Merge branch 'hiphive' of https://github.com/hrushikesh-s/atomate2 in…
hrushikesh-s Oct 12, 2023
d5ad270
Merge branch 'materialsproject:main' into hiphive
hrushikesh-s Oct 22, 2023
b635753
updates
hrushikesh-s Oct 23, 2023
c16e280
debugging error in generate_hiphive_displacements
hrushikesh-s Oct 23, 2023
3df39f5
Update hiphive.py
hrushikesh-s Oct 23, 2023
065d908
bug fixes
hrushikesh-s Oct 23, 2023
968f359
uncommenting remaining jobs
hrushikesh-s Oct 23, 2023
4ec85ce
updates
hrushikesh-s Oct 27, 2023
ef0638e
bug fix
hrushikesh-s Oct 27, 2023
ca44a18
bug fix
hrushikesh-s Oct 27, 2023
51a790f
updates
hrushikesh-s Oct 27, 2023
c8e1a51
updates
hrushikesh-s Oct 27, 2023
627654a
Update phonons.py
hrushikesh-s Oct 27, 2023
f30d29c
Update hiphive.py
hrushikesh-s Oct 27, 2023
365775f
bug fixes
hrushikesh-s Oct 27, 2023
113e970
Update hiphive.py
hrushikesh-s Oct 27, 2023
b055aad
using the decorator @job(data=["forces", "displaced_structures"])
hrushikesh-s Oct 27, 2023
adfd241
Update hiphive.py
hrushikesh-s Oct 27, 2023
9f61b69
Update hiphive.py
hrushikesh-s Oct 27, 2023
2a4c89c
Update hiphive.py
hrushikesh-s Oct 27, 2023
4c7c26c
Update hiphive.py
hrushikesh-s Oct 27, 2023
13edc4c
Update hiphive.py
hrushikesh-s Oct 27, 2023
82c1b94
changes to dict
hrushikesh-s Oct 27, 2023
a330832
Update hiphive.py
hrushikesh-s Oct 27, 2023
3577e6e
Update hiphive.py
hrushikesh-s Oct 27, 2023
5d46f41
Update hiphive.py
hrushikesh-s Oct 27, 2023
cff4cbf
Update hiphive.py
hrushikesh-s Oct 27, 2023
73e84af
bug fixes
hrushikesh-s Oct 31, 2023
41679a0
updates
hrushikesh-s Nov 1, 2023
28b31ac
Update phonons.py
hrushikesh-s Nov 2, 2023
c7b2273
Update hiphive.py
hrushikesh-s Nov 2, 2023
816d911
Update hiphive.py
hrushikesh-s Nov 2, 2023
12073e3
fixes
hrushikesh-s Nov 4, 2023
1f41a93
Update hiphive.py
hrushikesh-s Nov 4, 2023
10bfc7b
Update hiphive.py
hrushikesh-s Nov 4, 2023
5655a49
adding a function to copy hiphive outputs
hrushikesh-s Sep 14, 2023
dfcc83a
hiphive flow and job
hrushikesh-s Oct 4, 2023
7c45eba
bug fix
hrushikesh-s Oct 4, 2023
e10f4b1
first attempt at adding tests
hrushikesh-s Oct 12, 2023
3927b38
updates
hrushikesh-s Oct 23, 2023
2d4b42a
debugging error in generate_hiphive_displacements
hrushikesh-s Oct 23, 2023
402e1ce
Update hiphive.py
hrushikesh-s Oct 23, 2023
d8037ff
bug fixes
hrushikesh-s Oct 23, 2023
b6a571f
uncommenting remaining jobs
hrushikesh-s Oct 23, 2023
fd279ff
updates
hrushikesh-s Oct 27, 2023
b6f8d7c
bug fix
hrushikesh-s Oct 27, 2023
dfb4f7c
bug fix
hrushikesh-s Oct 27, 2023
b83853a
updates
hrushikesh-s Oct 27, 2023
ce9db37
updates
hrushikesh-s Oct 27, 2023
fa87a92
Update phonons.py
hrushikesh-s Oct 27, 2023
c20b11d
Update hiphive.py
hrushikesh-s Oct 27, 2023
f8b37ab
bug fixes
hrushikesh-s Oct 27, 2023
c3ff2e6
Update hiphive.py
hrushikesh-s Oct 27, 2023
94226f3
using the decorator @job(data=["forces", "displaced_structures"])
hrushikesh-s Oct 27, 2023
84bdd02
Update hiphive.py
hrushikesh-s Oct 27, 2023
bf0002f
Update hiphive.py
hrushikesh-s Oct 27, 2023
17b6b42
Update hiphive.py
hrushikesh-s Oct 27, 2023
2b875e4
Update hiphive.py
hrushikesh-s Oct 27, 2023
9c0886e
Update hiphive.py
hrushikesh-s Oct 27, 2023
7e84f7c
changes to dict
hrushikesh-s Oct 27, 2023
763348e
Update hiphive.py
hrushikesh-s Oct 27, 2023
69d0dc7
Update hiphive.py
hrushikesh-s Oct 27, 2023
54ee859
Update hiphive.py
hrushikesh-s Oct 27, 2023
6466bb9
Update hiphive.py
hrushikesh-s Oct 27, 2023
8edb536
bug fixes
hrushikesh-s Oct 31, 2023
884d84f
updates
hrushikesh-s Nov 1, 2023
030fbd0
Update hiphive.py
hrushikesh-s Nov 2, 2023
ba5e108
Update hiphive.py
hrushikesh-s Nov 2, 2023
8505caa
fixes
hrushikesh-s Nov 4, 2023
7f31016
Update hiphive.py
hrushikesh-s Nov 4, 2023
a5f295a
Update hiphive.py
hrushikesh-s Nov 4, 2023
c773efc
Merge branch 'hiphive_trial' of https://github.com/hrushikesh-s/atoma…
hrushikesh-s Jan 19, 2024
3837694
fixes to structure relax
hrushikesh-s Jan 19, 2024
59b6b80
fixes
hrushikesh-s Jan 19, 2024
72c4986
code cleanup
hrushikesh-s Feb 15, 2024
de363c4
bug fixes
hrushikesh-s Feb 18, 2024
511253e
Added shengbte support via Atomate2.SETTINGS
hrushikesh-s Feb 20, 2024
3e0c570
temporary directory change for running LTC calc
hrushikesh-s Feb 20, 2024
11cfc5e
Merge remote-tracking branch 'upstream/main' into hiphive_trial
hrushikesh-s Mar 1, 2024
30940f5
Merge remote-tracking branch 'upstream/main' into hiphive
hrushikesh-s Mar 1, 2024
90f7fb1
missing comma after one of the dependencies
hrushikesh-s Mar 1, 2024
cfda488
basic structure of a HiphiveMaker
hrushikesh-s Mar 1, 2024
6e389c9
removing duplicated arguments
hrushikesh-s Mar 1, 2024
111c770
customized the input VASP set for STATIC calcs
hrushikesh-s Mar 1, 2024
ca47cbf
explictly setting LREAL=True
hrushikesh-s Mar 1, 2024
f0ff47c
changing the location of (jobs) hiphive.py
hrushikesh-s Mar 1, 2024
7111126
adding support of almabte, shengbte & phono3py
hrushikesh-s Mar 1, 2024
31e9def
adding "structure" to the output
hrushikesh-s Mar 1, 2024
3b93a06
refactor, ruff fixes
hrushikesh-s Mar 1, 2024
4851a45
Merge branch 'hiphive' into hiphive_trial
hrushikesh-s Mar 1, 2024
3c877d9
Merge pull request #1 from hrushikesh-s/hiphive_trial
hrushikesh-s Mar 1, 2024
8c20724
commenting out quality control
hrushikesh-s Mar 4, 2024
f731419
Merge branch 'materialsproject:main' into hiphive_trial
hrushikesh-s Mar 4, 2024
3b49eb3
Merge branch 'materialsproject:main' into hiphive
hrushikesh-s Mar 7, 2024
a077560
adding renormalization changes from Junsoo
hrushikesh-s Mar 8, 2024
11c7ff1
fixes
hrushikesh-s Mar 29, 2024
bad7f5e
fixes
hrushikesh-s Mar 29, 2024
c45b616
customized INCAR tags
hrushikesh-s Mar 29, 2024
7250e2a
adding LTC calculators
hrushikesh-s Mar 29, 2024
82ef1c0
added anharmonicphonons block in pyproject.yaml
hrushikesh-s Mar 29, 2024
8889d3e
update the logic to use lambda=0 for TI
hrushikesh-s Mar 29, 2024
6e9da67
updating the logic to generate fixed displacements
hrushikesh-s Apr 4, 2024
c18fe93
can now run hiphive fitting individually
hrushikesh-s Apr 5, 2024
60e9a7b
adding fw configs to individual jobs
hrushikesh-s Apr 30, 2024
300da7b
new displacement strategy
hrushikesh-s May 27, 2024
4f7c264
added CHGNet MD step to generate displacement snapshots
hrushikesh-s May 28, 2024
5283d9e
updateing arguments of the MD run
hrushikesh-s May 28, 2024
2fb63c2
minor bug fixes to MD flow
hrushikesh-s May 28, 2024
a249cb8
updated MD args for running mp-23339
hrushikesh-s May 29, 2024
d5090fb
new cutoffs sampling startegy
hrushikesh-s Jun 26, 2024
49ae442
1. reorganized the imports
hrushikesh-s Jun 28, 2024
8b0019d
1. refactored the hiphive flow
hrushikesh-s Jun 28, 2024
8144b7b
Merge branch 'main' into hiphive_new_sampling_startegy
hrushikesh-s Jun 28, 2024
5239a79
Bump monty from 2024.2.2 to 2024.2.26 (#762)
dependabot[bot] Mar 8, 2024
e06dd99
Bump pytest from 8.0.2 to 8.1.0 (#761)
dependabot[bot] Mar 8, 2024
4e90106
revert to pytest 8.0.2, 8.1.0 was yanked due to breaking few plugins
janosh Mar 8, 2024
228641a
Auto-update pre-commit hooks (#756)
github-actions[bot] Mar 8, 2024
4aca655
Bump ipython from 8.22.1 to 8.22.2 (#770)
dependabot[bot] Mar 11, 2024
092baf5
Bump chgnet from 0.3.4 to 0.3.5 (#778)
dependabot[bot] Mar 18, 2024
edf646b
Bump pydantic from 2.6.3 to 2.6.4 (#777)
dependabot[bot] Mar 18, 2024
ed0458f
Bump custodian from 2024.2.15 to 2024.3.12 (#779)
dependabot[bot] Mar 18, 2024
c9a9b62
Bump phonopy from 2.21.2 to 2.22.0 (#784)
dependabot[bot] Mar 25, 2024
522b593
Bump autodoc-pydantic from 2.0.1 to 2.1.0 (#786)
dependabot[bot] Mar 25, 2024
675db1f
Bump pytest-cov from 4.1.0 to 5.0.0 (#785)
dependabot[bot] Mar 25, 2024
1132bbc
Bump python-ulid from 2.2.0 to 2.3.0 (#787)
dependabot[bot] Mar 25, 2024
0e3f11f
Bump cclib from 1.8 to 1.8.1 (#788)
dependabot[bot] Mar 25, 2024
848633a
Corrected typo in doc (#775)
rul048 Mar 28, 2024
bf6c01c
Warn on non-default `ATOMATE2_CONFIG_FILE` that's not found (#794)
janosh Apr 1, 2024
86fa57e
Porting qchem into atomate2 (#689)
rdguha1995 Apr 3, 2024
f788405
Forcefield molecular dynamics and forcefield refactor (#722)
esoteric-ephemera Apr 3, 2024
20ecb5d
Add dir_name to ForceFieldMaker and **task_document_kwargs to from_as…
QuantumChemist Apr 4, 2024
7571fad
Add flexible filename and extension to phonon new_plotter (#792)
QuantumChemist Apr 4, 2024
d17f1c3
Bump monty from 2024.2.26 to 2024.3.31 (#797)
dependabot[bot] Apr 4, 2024
a88147b
Bump phonopy from 2.22.0 to 2.22.1 (#795)
dependabot[bot] Apr 4, 2024
1a4ff45
Bump ipython from 8.22.2 to 8.23.0 (#798)
dependabot[bot] Apr 4, 2024
8d80ab9
Bump numpydoc from 1.6.0 to 1.7.0 (#796)
dependabot[bot] Apr 4, 2024
1096e99
Bump typing-extensions from 4.10.0 to 4.11.0 (#801)
dependabot[bot] Apr 8, 2024
027ef9b
Bump python-ulid from 2.3.0 to 2.4.0.post0 (#803)
dependabot[bot] Apr 8, 2024
bf9d481
Abinit workflows: static, non-scf and relaxation. (#183)
davidwaroquiers Apr 8, 2024
5f87e84
Remove `abinit` `__all__` module star exports (#804)
janosh Apr 10, 2024
26221c9
Bump pydantic from 2.6.4 to 2.7.0 (#806)
dependabot[bot] Apr 15, 2024
c2ee042
Simplify phonon `get_supercell_size()` and test clean up (#783)
janosh Apr 25, 2024
0cc0627
Add `fix_symmetry: bool = False` option to forcefield relax makers (#…
JonathanSchmidt1 Apr 26, 2024
eb0a801
Add more details to the installation guide (#810)
JaGeo Apr 26, 2024
1a2cf21
Bump mp-api from 0.40.2 to 0.41.2 (#824)
dependabot[bot] Apr 29, 2024
623201a
Bump emmet-core from 0.78.0rc4 to 0.82.2 (#823)
dependabot[bot] Apr 29, 2024
9fbd3d1
Add missing `calculator_kwargs` and remove outdated `model`/`model_kw…
janosh May 3, 2024
f95073c
Bump pydantic from 2.7.0 to 2.7.1 (#832)
dependabot[bot] May 6, 2024
faefc1e
Bump python-ulid from 2.4.0.post0 to 2.5.0 (#828)
dependabot[bot] May 6, 2024
ee70772
Bump pymatgen-analysis-defects from 2024.2.24 to 2024.4.23 (#827)
dependabot[bot] May 6, 2024
f267351
Turn `ForceFieldRelaxMaker._calculator` method into `calculator` prop…
janosh May 10, 2024
fcd1f4d
Update LobsterTaskDoc (#723)
naik-aakash May 11, 2024
a93b1ab
clean up test_lobster_task_document
janosh May 11, 2024
0cfbd60
Document the option to run LOBSTER with one jobscript only (#811)
JaGeo May 11, 2024
697d1d8
Add magnetic orderings workflow (#432)
mattmcdermott May 11, 2024
c263f2a
`from_...` class methods now return `typing_extensions.Self` (#840)
janosh May 11, 2024
a019641
Update LobsterPy version (#841)
JaGeo May 11, 2024
81f5841
CI add `repository_dispatch` event for `pymatgen_ci_trigger` (#835)
janosh May 11, 2024
ed274ab
Bump phonopy from 2.22.1 to 2.23.1 (#846)
dependabot[bot] May 13, 2024
d2fe199
Bump lobsterpy from 0.4.0 to 0.4.4 (#848)
dependabot[bot] May 13, 2024
56185f6
Bump furo from 2024.1.29 to 2024.5.6 (#847)
dependabot[bot] May 13, 2024
5296606
Fix `TrajectoryObserver.to_ase_trajectory` return type (#852)
janosh May 14, 2024
dc4eaf0
Fix title hierarchies in VASP documentation (#853)
JaGeo May 15, 2024
d474d21
fix typos
janosh May 15, 2024
7a9e856
Make Fermi Energy Optional for FHI-aims (#793)
tpurcell90 May 16, 2024
0c4da0a
Bump python-ulid from 2.5.0 to 2.6.0 (#858)
dependabot[bot] May 27, 2024
f5498c5
Bump typing-extensions from 4.11.0 to 4.12.0 (#859)
dependabot[bot] May 27, 2024
c3150fa
Bump sphinx-design from 0.5.0 to 0.6.0 (#857)
dependabot[bot] May 27, 2024
5f6abad
Bump monty from 2024.3.31 to 2024.5.24 (#860)
dependabot[bot] May 27, 2024
d53beab
Handling failures in elastic flow (#861)
gpetretto May 29, 2024
6d3754d
Bump typing-extensions from 4.12.0 to 4.12.1 (#864)
dependabot[bot] Jun 3, 2024
4b2d62f
Bump pymatgen from 2024.5.1 to 2024.5.31 (#867)
dependabot[bot] Jun 3, 2024
11ac2fc
Bump ipython from 8.23.0 to 8.25.0 (#869)
dependabot[bot] Jun 3, 2024
69f4ff5
Bump pydantic from 2.7.1 to 2.7.2 (#868)
dependabot[bot] Jun 3, 2024
d2e483e
Bump dscribe from 2.1.0 to 2.1.1 (#865)
dependabot[bot] Jun 3, 2024
36b7977
transpose matrix (#872)
JaGeo Jun 4, 2024
3db684d
Add test for supercell matrix creation in phonon workflow (#873)
JaGeo Jun 5, 2024
55aceb8
Bump typing-extensions from 4.12.1 to 4.12.2 (#877)
dependabot[bot] Jun 10, 2024
7b986d6
Bump ijson from 3.2.3 to 3.3.0 (#876)
dependabot[bot] Jun 10, 2024
7f474a3
Bump pydantic-settings from 2.2.1 to 2.3.1 (#875)
dependabot[bot] Jun 10, 2024
25f931e
Bump matgl from 1.1.1 to 1.1.2 (#882)
dependabot[bot] Jun 10, 2024
9706bd8
Bump chgnet from 0.3.5 to 0.3.8 (#881)
dependabot[bot] Jun 10, 2024
87d8c32
Bump pydantic from 2.7.2 to 2.7.3 (#884)
dependabot[bot] Jun 10, 2024
f34d369
Bump phonopy from 2.23.1 to 2.24.2 (#879)
dependabot[bot] Jun 10, 2024
13e731a
`ruff` fixes (#894)
janosh Jun 22, 2024
ff770f3
Bump pydantic from 2.7.3 to 2.7.4 (#886)
dependabot[bot] Jun 22, 2024
9770434
Bump pymatgen from 2024.5.31 to 2024.6.10 (#887)
dependabot[bot] Jun 22, 2024
2b95bd0
Bump pydantic-settings from 2.3.1 to 2.3.3 (#888)
dependabot[bot] Jun 22, 2024
738d825
Bump python-ulid from 2.6.0 to 2.7.0 (#897)
dependabot[bot] Jun 24, 2024
3d5d4dc
Bump phonopy from 2.24.2 to 2.24.3 (#898)
dependabot[bot] Jun 24, 2024
1f638c6
commenting out quality control
hrushikesh-s Mar 4, 2024
a0d76b6
adding renormalization changes from Junsoo
hrushikesh-s Mar 8, 2024
b1e5dd7
fixes
hrushikesh-s Mar 29, 2024
2f6f9f1
fixes
hrushikesh-s Mar 29, 2024
319cfc6
customized INCAR tags
hrushikesh-s Mar 29, 2024
3991202
adding LTC calculators
hrushikesh-s Mar 29, 2024
5515d1a
added anharmonicphonons block in pyproject.yaml
hrushikesh-s Mar 29, 2024
e957c61
update the logic to use lambda=0 for TI
hrushikesh-s Mar 29, 2024
4593415
updating the logic to generate fixed displacements
hrushikesh-s Apr 4, 2024
5c9e168
can now run hiphive fitting individually
hrushikesh-s Apr 5, 2024
b1f93de
adding fw configs to individual jobs
hrushikesh-s Apr 30, 2024
4bcd97e
new displacement strategy
hrushikesh-s May 27, 2024
a41d31e
added CHGNet MD step to generate displacement snapshots
hrushikesh-s May 28, 2024
a0d2050
updateing arguments of the MD run
hrushikesh-s May 28, 2024
f1217b6
minor bug fixes to MD flow
hrushikesh-s May 28, 2024
2790070
updated MD args for running mp-23339
hrushikesh-s May 29, 2024
58aedd1
new cutoffs sampling startegy
hrushikesh-s Jun 26, 2024
f92a7a4
1. reorganized the imports
hrushikesh-s Jun 28, 2024
7befb93
1. refactored the hiphive flow
hrushikesh-s Jun 28, 2024
06b2a3a
Merge branch 'hiphive_new_sampling_startegy' into hiphive
hrushikesh-s Jun 28, 2024
c61dcf7
fixes
hrushikesh-s Jun 28, 2024
dbbfa40
Merge pull request #11 from hrushikesh-s/hiphive_new_sampling_startegy
hrushikesh-s Jun 28, 2024
af590ba
ruff fixes
hrushikesh-s Jun 28, 2024
20ad5c3
mypy fixes to hiphive flow
hrushikesh-s Jun 28, 2024
bbebbd4
updated logic to remove cutoffs that result in 0 constraints!
hrushikesh-s Jun 28, 2024
5f977f0
1. no major code logic updates
hrushikesh-s Jul 29, 2024
02ff2cc
reduced the user_kpoints_settings -- "reciprocal_density" to 100
hrushikesh-s Jul 29, 2024
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
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ strict = [
"quippy-ase==0.9.14",
"seekpath==2.1.0",
"typing-extensions==4.8.0",
"phono3py==2.5.1"
]

[project.scripts]
Expand Down
7 changes: 6 additions & 1 deletion src/atomate2/common/jobs/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,8 @@ def generate_frequencies_eigenvectors(
)


@job(data=["forces", "displaced_structures"])
# @job(data=["forces", "displaced_structures"])
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a reminder: this is really important for large structures. Just saw this change by chance.

@job
def run_phonon_displacements(
displacements,
structure: Structure,
Expand Down Expand Up @@ -279,6 +280,7 @@ def run_phonon_displacements(
"forces": [],
"uuids": [],
"dirs": [],
"structure": []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pay attention if your changes are likely to break another workflow, such as PhononMakerhere (unless it is necessary). If so, you are supposed to fix bugs/updates for those codes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to mention this: for large structures, this needs to be in the document store then. (E.g., you could use a forcefield to run a common version of your workflow with a larger structure)

I made this experience with the phonon workflow before.

}

for i, displacement in enumerate(displacements):
Expand Down Expand Up @@ -306,6 +308,9 @@ def run_phonon_displacements(
outputs["uuids"].append(phonon_job.output.uuid)
outputs["dirs"].append(phonon_job.output.dir_name)
outputs["forces"].append(phonon_job.output.output.forces)
outputs["structure"].append(phonon_job.output.output.structure)
# outputs["forces"].append(phonon_job.output.output.output.forces)
# outputs["structure"].append(phonon_job.output.output.output.structure)

displacement_flow = Flow(phonon_jobs, outputs)
return Response(replace=displacement_flow)
Expand Down
73 changes: 73 additions & 0 deletions src/atomate2/vasp/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

from atomate2.vasp.sets.base import VaspInputGenerator

__all__ = ["copy_vasp_outputs", "get_largest_relax_extension", "copy_hiphive_outputs"]


logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -200,3 +202,74 @@ def write_vasp_input_set(

logger.info("Writing VASP input set.")
vis.write_input(directory, potcar_spec=potcar_spec, **kwargs)


@auto_fileclient
def copy_hiphive_outputs(
src_dir: Path | str,
src_host: str | None = None,
file_client: FileClient | None = None,
):
"""
Copy Non-VASP output files to the current directory.

Parameters
----------
src_dir : str or Path
The source directory.
src_host : str or None
The source hostname used to specify a remote filesystem. Can be given as
either "username@remote_host" or just "remote_host" in which case the username
will be inferred from the current user. If ``None``, the local filesystem will
be used as the source.
file_client : .FileClient
A file client to use for performing file operations.
"""
src_dir = strip_hostname(src_dir) # TODO: Handle hostnames properly.

logger.info(f"Copying Non-VASP inputs from {src_dir}")

directory_listing = file_client.listdir(src_dir, host=src_host)
optional_files = []

for loop in range(1, 100):
for file in [
f"structure_data_{loop}.json",
f"perturbed_structures_{loop}.json",
f"perturbed_forces_{loop}.json",
f"perturbed_forces_{loop}_new.json",
]:
found_file = get_zfile(directory_listing, file, allow_missing=True)
if found_file is not None:
optional_files.append(found_file)

for file in [
"cluster_space.cs",
"force_constants.fcs",
"parameters.txt",
"fitting_data.json",
"phonopy_params.yaml",
"thermal_data.json",
"structure.json",
"relaxed_structure.json",
"structure_data.json",
"perturbed_structures.json",
"perturbed_forces.json",
"fc2.hdf5",
"fc3.hdf5",
"FORCE_CONSTANTS_2ND",
"FORCE_CONSTANTS_3RD",
]:
found_file = get_zfile(directory_listing, file, allow_missing=True)
if found_file is not None:
optional_files.append(found_file)

copy_files(
src_dir,
src_host=src_host,
# include_files=required_files + optional_files,
include_files=optional_files,
file_client=file_client,
)

logger.info("Finished copying Non-VASP inputs")
Loading
Loading