Skip to content

Commit bc3f03c

Browse files
committed
QEjob fix.
1 parent 3b30568 commit bc3f03c

File tree

4 files changed

+25
-3
lines changed

4 files changed

+25
-3
lines changed

jarvis/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""Version number."""
2-
__version__ = "2023.09.20"
2+
__version__ = "2023.10.10"
33

44
import os
55

jarvis/io/vasp/outputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def vac_potential(
281281
plt.savefig(filename)
282282
plt.close()
283283

284-
print("Ef,max,wf=", Ef, avg_max, dif)
284+
# print("Ef,max,wf=", Ef, avg_max, dif)
285285
return avg_max, dif
286286

287287

jarvis/tasks/qe/qe.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,28 @@ def write_input(self):
4848
"""Write inputs."""
4949
self.qeinput.write_file(self.input_file)
5050

51+
def to_dict(self):
52+
"""Get dictionary."""
53+
info = {}
54+
info["atoms"] = self.atoms.to_dict()
55+
56+
info["kpoints"] = self.kpoints.to_dict()
57+
info["qe_cmd"] = self.qe_cmd
58+
info["psp_dir"] = self.psp_dir
59+
info["url"] = self.url
60+
return info
61+
62+
@classmethod
63+
def from_dict(self, info={}):
64+
"""Load from a dictionary."""
65+
return QEjob(
66+
atoms=Atoms.from_dict(info["atoms"]),
67+
kpoints=Kpoints3D.from_dict(info["kpoints"]),
68+
qe_cmd=info["qe_cmd"],
69+
psp_dir=info["psp_dir"],
70+
url=info["url"],
71+
)
72+
5173
def runjob(self):
5274
"""Run job and make or return a metadata file."""
5375
fname = self.jobname + ".json"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="jarvis-tools",
15-
version="2023.09.20",
15+
version="2023.10.10",
1616
long_description=long_d,
1717
install_requires=[
1818
"numpy>=1.20.1",

0 commit comments

Comments
 (0)