Skip to content

Commit 944ad5f

Browse files
committed
feat: support auto INPUT for ABACUS phonon; expose pre-defined structure list for Intersitial.py
1 parent 4da8270 commit 944ad5f

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

apex/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
__version__ = '1.2.16'
2+
__version__ = '1.2.17'
33
LOCAL_PATH = os.getcwd()
44

55

apex/core/calculator/ABACUS.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,12 @@ def make_input_file(self, output_dir, task_type, task_param):
159159
self.modify_input(incar, "calculation", "scf")
160160
else:
161161
raise RuntimeError("not supported calculation setting for ABACUS")
162-
163-
elif cal_type == "static":
162+
elif cal_type == "static" and task_type != "phonon":
163+
self.modify_input(incar, "calculation", "scf")
164+
elif task_type == "phonon":
164165
self.modify_input(incar, "calculation", "scf")
166+
self.modify_input(incar, "cal_force", "1")
167+
self.modify_input(incar, "cal_stress", "1")
165168

166169
else:
167170
raise RuntimeError("not supported calculation type for ABACUS")

apex/core/property/Interstitial.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
upload_packages.append(__file__)
2626

27-
PREDEFINED_LIST = ['bcc', 'fcc', 'hcp']
2827
TOL = 1e-5
2928

3029
class Interstitial(Property):
@@ -41,6 +40,9 @@ def __init__(self, parameter, inter_param=None):
4140
self.lattice_type = parameter["lattice_type"]
4241
parameter["voronoi_param"] = parameter.get("voronoi_param", {})
4342
self.voronoi_param = parameter["voronoi_param"]
43+
parameter["special_list"] = parameter.get("special_list", ['bcc', 'fcc', 'hcp'])
44+
self.special_list = parameter["special_list"]
45+
4446
parameter["cal_type"] = parameter.get("cal_type", "relaxation")
4547
default_cal_setting = {
4648
"relax_pos": True,
@@ -191,7 +193,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
191193
if not self.insert_ele:
192194
self.insert_ele = [str(ii) for ii in set(ss.composition.elements)]
193195
for ii in self.insert_ele:
194-
if self.structure_type in PREDEFINED_LIST:
196+
if self.structure_type in self.special_list:
195197
# rotate and translate hcp structure to specific orientation for interstitial generation
196198
if self.structure_type == 'hcp':
197199
theta = -2 * np.pi / 3
@@ -278,7 +280,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
278280
os.chdir(self.path_to_work)
279281

280282
# create pre-defined special SIA structure for bcc fcc and hcp
281-
if self.structure_type in PREDEFINED_LIST:
283+
if self.structure_type in self.special_list:
282284
self.task_list = []
283285
if not os.path.isfile("task.000000/POSCAR"):
284286
raise RuntimeError("need task.000000 structure as reference")

setup.py

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

66
setuptools.setup(
77
name="apex-flow",
8-
version="1.2.16",
8+
version="1.2.17",
99
author="Zhuoyuan Li, Tongqi Wen",
1010
author_email="zhuoyli@outlook.com",
1111
description="Alloy Properties EXplorer using simulations",

0 commit comments

Comments
 (0)