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

Devel 1.2.0 #83

Merged
merged 25 commits into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b296768
update version tag to 1.2.7
ZLI-afk Jul 26, 2024
ef48e49
feat: support fix shape only setting for ABACUS.py
ZLI-afk Jul 26, 2024
ea3ade2
fix: fix old relaxation post logic from dpgen in abacus_utils.py
ZLI-afk Jul 26, 2024
baadc1a
fix: update test_abacus_property.py
ZLI-afk Jul 26, 2024
951b136
fix: fix wrong attribute error of add_fix in __stru_fix for ABACUS Ga…
ZLI-afk Jul 27, 2024
0325033
update tag to 1.2.8
ZLI-afk Jul 27, 2024
511af16
chore: reform log
ZLI-afk Jul 31, 2024
2b0ebc2
chore: keep `POSCAR` within tasks when make_conf with ABACUS
ZLI-afk Aug 1, 2024
f9b10b5
feat: add user indicate exclude upload files function
ZLI-afk Aug 10, 2024
558e2fd
fix: NoneType error of exclude upload files list
ZLI-afk Aug 10, 2024
09a1b69
feat: keep POSCAR in ABACUS relax_task
ZLI-afk Aug 15, 2024
4164e71
fix: Unrecognizable `gap` type pair coeff context
ZLI-afk Aug 15, 2024
c7cd03d
feat: support multi potential xml files for `gap` pair type
ZLI-afk Aug 15, 2024
a6e4f16
fix: change default `cal_type` in Phonon.py into `static`
ZLI-afk Aug 16, 2024
f7041d0
fix: copy samefile error of Phonon.py for ABACUS
ZLI-afk Aug 16, 2024
49ffd47
fix: copy samefile error of Phonon.py for ABACUS
ZLI-afk Aug 16, 2024
e88112a
feat: print out tmp `debug_workdir` info when activate `debug` mode
ZLI-afk Aug 29, 2024
ee58add
update version tag to 1.2.9
ZLI-afk Aug 29, 2024
8e906dc
fix: wrong bcc crowdion coordinate in Interstitial.py
ZLI-afk Sep 13, 2024
8bd6c3b
fix: only `STRU` provided submission error: `POSCAR` not found error
ZLI-afk Sep 19, 2024
e99322f
change: change default value of `ieee` to be `False` in Elastic.py
ZLI-afk Sep 19, 2024
d758c2b
change: change default value of `ieee` to be `False` in Elastic.py
ZLI-afk Sep 19, 2024
b663c6a
docs: update README.md
ZLI-afk Oct 10, 2024
f50dad2
Merge branch 'deepmodeling:main' into v1.2
ZLI-afk Oct 11, 2024
c69b55a
Merge pull request #82 from ZLI-afk/v1.2
kevinwenminion Oct 11, 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
265 changes: 149 additions & 116 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion apex/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import os
__version__ = '1.2.6'
__version__ = '1.2.9'
LOCAL_PATH = os.getcwd()


Expand Down
1 change: 1 addition & 0 deletions apex/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class Config:
group_size: int = None
pool_size: int = None
upload_python_packages: list = field(default_factory=list)
exclude_upload_files: list = field(default_factory=list)
lammps_image_name: str = None
lammps_run_command: str = None
vasp_image_name: str = None
Expand Down
3 changes: 3 additions & 0 deletions apex/core/calculator/ABACUS.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@
elif [relax_pos, relax_shape, relax_vol] == [False, True, True]:
self.modify_input(incar, "calculation", "cell-relax")
fix_atom = [True, True, True]
elif [relax_pos, relax_shape, relax_vol] == [True, False, True]:
self.modify_input(incar, "calculation", "cell-relax")
self.modify_input(incar, "fixed_axes", "shape")

Check warning on line 153 in apex/core/calculator/ABACUS.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/ABACUS.py#L151-L153

Added lines #L151 - L153 were not covered by tests
elif [relax_pos, relax_shape, relax_vol] == [False, False, True]:
raise RuntimeError(
"relax volume but fix shape is not supported for ABACUS"
Expand Down
28 changes: 19 additions & 9 deletions apex/core/calculator/Lammps.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
upload_packages.append(__file__)

# LAMMPS_INTER_TYPE = ['deepmd', 'eam_alloy', 'meam', 'eam_fs', 'meam_spline', 'snap', 'gap', 'rann', 'mace']

MULTI_MODELS_INTER_TYPE = ["meam", "snap", "gap"]

class Lammps(Task):
def __init__(self, inter_parameter, path_to_poscar):
self.inter = inter_parameter
self.inter_type = inter_parameter["type"]
self.type_map = inter_parameter["type_map"]
self.in_lammps = inter_parameter.get("in_lammps", "auto")
if self.inter_type in ["meam", "snap"]:
if self.inter_type in MULTI_MODELS_INTER_TYPE:
self.model = list(map(os.path.abspath, inter_parameter["model"]))
else:
self.model = os.path.abspath(inter_parameter["model"])
Expand Down Expand Up @@ -76,6 +76,16 @@
"param_type": self.type_map,
"deepmd_version": deepmd_version,
}
elif self.inter_type == "gap":
model_name = list(map(os.path.basename, self.model))
self.model_param = {

Check warning on line 81 in apex/core/calculator/Lammps.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/Lammps.py#L79-L81

Added lines #L79 - L81 were not covered by tests
"type": self.inter_type,
"model_name": model_name,
"param_type": self.type_map,
"init_string": self.inter.get("init_string", None),
"atomic_num_list": self.inter.get("atomic_num_list", None),
"deepmd_version": deepmd_version,
}
else:
model_name = os.path.basename(self.model)
self.model_param = {
Expand All @@ -101,10 +111,10 @@

def make_potential_files(self, output_dir):
parent_dir = os.path.join(output_dir, "../../")
if self.inter_type in ["meam", "snap"]:
model_lib, model_file = map(os.path.basename, self.model[:2])
targets = [self.model[0], self.model[1]]
link_names = [model_lib, model_file]
if self.inter_type in MULTI_MODELS_INTER_TYPE:
model_file = map(os.path.basename, self.model)
targets = self.model
link_names = list(model_file)

Check warning on line 117 in apex/core/calculator/Lammps.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/Lammps.py#L115-L117

Added lines #L115 - L117 were not covered by tests
else:
model_file = os.path.basename(self.model)
targets = [self.model]
Expand Down Expand Up @@ -516,19 +526,19 @@
return result_dict

def forward_files(self, property_type="relaxation"):
if self.inter_type in ["meam", "snap"]:
if self.inter_type in MULTI_MODELS_INTER_TYPE:

Check warning on line 529 in apex/core/calculator/Lammps.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/Lammps.py#L529

Added line #L529 was not covered by tests
return ["conf.lmp", "in.lammps"] + list(map(os.path.basename, self.model))
else:
return ["conf.lmp", "in.lammps", os.path.basename(self.model)]

def forward_common_files(self, property_type="relaxation"):
if property_type not in ["eos"]:
if self.inter_type in ["meam", "snap"]:
if self.inter_type in MULTI_MODELS_INTER_TYPE:
return ["in.lammps"] + list(map(os.path.basename, self.model))
else:
return ["in.lammps", os.path.basename(self.model)]
else:
if self.inter_type in ["meam", "snap"]:
if self.inter_type in MULTI_MODELS_INTER_TYPE:

Check warning on line 541 in apex/core/calculator/Lammps.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/Lammps.py#L541

Added line #L541 was not covered by tests
return list(map(os.path.basename, self.model))
else:
return [os.path.basename(self.model)]
Expand Down
8 changes: 5 additions & 3 deletions apex/core/calculator/VASP.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@

# revise INCAR based on the INCAR provided in the "interaction"
else:
approach = None
if prop_type == "phonon":
approach = task_param.get("approach", "linear")
approach = task_param.get("approach")

Check warning on line 83 in apex/core/calculator/VASP.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/VASP.py#L83

Added line #L83 was not covered by tests
logging.info(f"No specification of INCAR for {prop_type} calculation, will auto-generate")
if approach == "linear":
incar = incar_upper(Incar.from_str(
Expand Down Expand Up @@ -131,14 +132,15 @@
)
incar["ISIF"] = isif

elif cal_type == "static":
elif cal_type == "static" and not approach == "linear":

Check warning on line 135 in apex/core/calculator/VASP.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/VASP.py#L135

Added line #L135 was not covered by tests
nsw = 0
if not ("NSW" in incar and incar.get("NSW") == nsw):
logging.info(
"%s setting NSW to %d" % (self.make_input_file.__name__, nsw)
)
incar["NSW"] = nsw

elif cal_type == "static" and approach == "linear":
pass

Check warning on line 143 in apex/core/calculator/VASP.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/VASP.py#L142-L143

Added lines #L142 - L143 were not covered by tests
else:
raise RuntimeError("not supported calculation type for VASP")

Expand Down
25 changes: 16 additions & 9 deletions apex/core/calculator/lib/abacus_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python3
import logging
import os, re
import os, re, glob

import dpdata
import numpy as np
Expand Down Expand Up @@ -410,16 +410,23 @@
out_stru = bool(line.split()[1])
logf = os.path.join(abacus_path, "OUT.%s/running_%s.log" % (suffix, calculation))
if calculation in ["relax", "cell-relax"]:
if not out_stru:
if os.path.isfile(os.path.join(abacus_path, "OUT.%s/STRU_ION_D" % suffix)):
return "OUT.%s/STRU_ION_D" % suffix
else:
with open(logf) as f1:
lines = f1.readlines()
for i in range(1, len(lines)):
if lines[-i][36:41] == "istep":
max_step = int(lines[-i].split()[-1])
break
return "OUT.%s/STRU_ION%d_D" % (suffix, max_step)
# find the final name by STRU_ION*_D,
# for abacus version < v3.2.2, there has no STRU_ION_D file but has STRU_ION0_D STRU_ION1_D ... STRU_ION10_D ...
# so we need to find the last STRU_ION*_D file
stru_ions = glob.glob(

Check warning on line 419 in apex/core/calculator/lib/abacus_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/abacus_utils.py#L419

Added line #L419 was not covered by tests
os.path.join(abacus_path, f"OUT.{suffix}/STRU_ION*_D")
)
if len(stru_ions) > 0:

Check warning on line 422 in apex/core/calculator/lib/abacus_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/abacus_utils.py#L422

Added line #L422 was not covered by tests
# sort the file name by the number in the file name
stru_ions.sort(key=lambda x: int(x.split("_")[-2][3:]))
final_stru_ion = os.path.basename(stru_ions[-1])
return f"OUT.{suffix}/{final_stru_ion}"

Check warning on line 426 in apex/core/calculator/lib/abacus_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/abacus_utils.py#L424-L426

Added lines #L424 - L426 were not covered by tests
else:
# if there has no STRU_ION_D, return the input STRU
return "STRU"

Check warning on line 429 in apex/core/calculator/lib/abacus_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/abacus_utils.py#L429

Added line #L429 was not covered by tests
elif calculation == "md":
with open(logf) as f1:
lines = f1.readlines()
Expand Down
20 changes: 14 additions & 6 deletions apex/core/calculator/lib/lammps_utils.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
#!/usr/bin/env python3

import os
import random
import subprocess as sp
import sys
import re

import dpdata
from dpdata.periodic_table import Element
from packaging.version import Version

from apex.core.lib import util
from apex.core.constants import PERIOD_ELEMENTS_BY_SYMBOL
from dflow.python import upload_packages
upload_packages.append(__file__)

Expand Down Expand Up @@ -153,11 +152,20 @@


def inter_gap(param):
init_string = param["init_string"]
atomic_num_list = param["atomic_num_list"]
if init_string is None:
with open(param["model_name"][0], "r") as fp:
xml_contents = fp.read()
init_string = re.search(r'label="([^"]*)"', xml_contents).group(1)
if atomic_num_list is None:
atomic_num_list = [PERIOD_ELEMENTS_BY_SYMBOL.index(e) + 1 for e in param["param_type"]]

Check warning on line 162 in apex/core/calculator/lib/lammps_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/lammps_utils.py#L155-L162

Added lines #L155 - L162 were not covered by tests

ret = ""
line = "pair_style quip \n"
line += "pair_coeff * * %s " % param["model_name"][0]
for ii in param["param_type"]:
line += ii + " "
line += f'pair_coeff * * {param["model_name"][0]} "Potential xml_label={init_string}" '
for ii in atomic_num_list:
line += str(ii) + " "

Check warning on line 168 in apex/core/calculator/lib/lammps_utils.py

View check run for this annotation

Codecov / codecov/patch

apex/core/calculator/lib/lammps_utils.py#L166-L168

Added lines #L166 - L168 were not covered by tests
line += "\n"
ret += line
return ret
Expand Down
7 changes: 7 additions & 0 deletions apex/core/common_equi.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,14 @@ def make_equi(confs, inter_param, relax_param):
sys.to("abacus/stru", stru)
else:
raise FileNotFoundError("No file %s" % stru)
if not os.path.exists(os.path.join(ii, POSCAR)):
sys = dpdata.System(stru, fmt="abacus/stru")
sys.to("vasp/poscar", os.path.join(ii, POSCAR))

shutil.copyfile(stru, os.path.join(ii, "STRU.bk"))
abacus_utils.modify_stru_path(stru, "pp_orb/", inter_param)
orig_poscar = poscar
orig_POSCAR = POSCAR
poscar = os.path.abspath(stru)
POSCAR = "STRU"
if not os.path.exists(poscar):
Expand All @@ -105,6 +110,8 @@ def make_equi(confs, inter_param, relax_param):
if os.path.isfile(POSCAR):
os.remove(POSCAR)
os.symlink(os.path.relpath(poscar), POSCAR)
if inter_param["type"] == "abacus":
os.symlink(os.path.relpath(orig_poscar), orig_POSCAR)
os.chdir(cwd)
task_dirs.sort()
# generate task files
Expand Down
14 changes: 14 additions & 0 deletions apex/core/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
PERIOD_ELEMENTS_BY_SYMBOL = [
"H", "He", "Li", "Be", "B", "C", "N", "O", "F", "Ne",
"Na", "Mg", "Al", "Si", "P", "S", "Cl", "Ar", "K", "Ca",
"Sc", "Ti", "V", "Cr", "Mn", "Fe", "Co", "Ni", "Cu", "Zn",
"Ga", "Ge", "As", "Se", "Br", "Kr", "Rb", "Sr", "Y", "Zr",
"Nb", "Mo", "Tc", "Ru", "Rh", "Pd", "Ag", "Cd", "In", "Sn",
"Sb", "Te", "I", "Xe", "Cs", "Ba", "La", "Ce", "Pr", "Nd",
"Pm", "Sm", "Eu", "Gd", "Tb", "Dy", "Ho", "Er", "Tm", "Yb",
"Lu", "Hf", "Ta", "W", "Re", "Os", "Ir", "Pt", "Au", "Hg",
"Tl", "Pb", "Bi", "Po", "At", "Rn", "Fr", "Ra", "Ac", "Th",
"Pa", "U", "Np", "Pu", "Am", "Cm", "Bk", "Cf", "Es", "Fm",
"Md", "No", "Lr", "Rf", "Db", "Sg", "Bh", "Hs", "Mt", "Ds",
"Rg", "Cn", "Nh", "Fl", "Mc", "Lv", "Ts", "Og"
]
2 changes: 1 addition & 1 deletion apex/core/property/Elastic.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(self, parameter, inter_param=None):
self.shear_deform = parameter["shear_deform"]
parameter.setdefault("conventional", False)
self.conventional = parameter["conventional"]
parameter.setdefault("ieee", True)
parameter.setdefault("ieee", False)
self.ieee = parameter["ieee"]
parameter.setdefault("cal_type", "relaxation")
self.cal_type = parameter["cal_type"]
Expand Down
6 changes: 3 additions & 3 deletions apex/core/property/Gamma.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@
task_list.append(output_task)
# print("# %03d generate " % ii, output_task)

logging.info(f"# {count} generate {output_task}, with{len(obtained_slab.sites)} atoms")
logging.info(f"# {count} generate {output_task}, with {len(obtained_slab.sites)} atoms")

# make confs
obtained_slab.to("POSCAR.tmp", "POSCAR")
vasp_utils.regulate_poscar("POSCAR.tmp", "POSCAR")
vasp_utils.sort_poscar("POSCAR", "POSCAR", ptypes)
if self.inter_param["type"] == "abacus":
abacus_utils.poscar2stru("POSCAR", self.inter_param, "STRU")
os.remove("POSCAR")
#os.remove("POSCAR")
# vasp.perturb_xz('POSCAR', 'POSCAR', self.pert_xz)
# record miller
dumpfn(self.plane_miller, "miller.json")
Expand Down Expand Up @@ -433,7 +433,7 @@

def __stru_fix(self, stru) -> None:
fix_dict = {"true": True, "false": False}
fix_xyz = [fix_dict[i] for i in self.addfix]
fix_xyz = [fix_dict[i] for i in self.add_fix]

Check warning on line 436 in apex/core/property/Gamma.py

View check run for this annotation

Codecov / codecov/patch

apex/core/property/Gamma.py#L436

Added line #L436 was not covered by tests
abacus_utils.stru_fix_atom(stru, fix_atom=fix_xyz)

def __inLammpes_fix(self, inLammps) -> None:
Expand Down
4 changes: 2 additions & 2 deletions apex/core/property/Interstitial.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
bcc_interstital_dict = {
'tetrahedral': {chl: [0.25, 0.5, 0]},
'octahedral': {chl: [0.5, 0.5, 0]},
'crowdion': {chl: [0.25, 0.25, 0]},
'crowdion': {chl: [0.25, 0.25, 0.25]},
'<111>dumbbell': {chl: [1 / 3, 1 / 3, 1 / 3],
center: [2 / 3, 2 / 3, 2 / 3]},
'<110>dumbbell': {chl: [1 / 4, 3 / 4, 1 / 2],
Expand Down Expand Up @@ -408,7 +408,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
output_task = os.path.join(self.path_to_work, "task.%06d" % ii)
os.chdir(output_task)
abacus_utils.poscar2stru("POSCAR", self.inter_param, "STRU")
os.remove("POSCAR")
#os.remove("POSCAR")
os.chdir(cwd)
return self.task_list

Expand Down
24 changes: 14 additions & 10 deletions apex/core/property/Phonon.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
self.BAND_POINTS = parameter["BAND_POINTS"]
parameter["BAND_CONNECTION"] = parameter.get('BAND_CONNECTION', True)
self.BAND_CONNECTION = parameter["BAND_CONNECTION"]
parameter["cal_type"] = parameter.get("cal_type", "relaxation")
parameter["cal_type"] = parameter.get("cal_type", "static")
default_cal_setting = {
"relax_pos": True,
"relax_shape": False,
Expand Down Expand Up @@ -485,6 +485,12 @@
# return type -> list[list[dict[Any, Any]]]
return band_list

@staticmethod
def check_same_copy(src, dst):
if os.path.samefile(src, dst):
return
shutil.copyfile(src, dst)

Check warning on line 492 in apex/core/property/Phonon.py

View check run for this annotation

Codecov / codecov/patch

apex/core/property/Phonon.py#L490-L492

Added lines #L490 - L492 were not covered by tests

def _compute_lower(self, output_file, all_tasks, all_res):
cwd = Path.cwd()
work_path = Path(output_file).parent.absolute()
Expand All @@ -497,10 +503,9 @@
if not self.reprod:
os.chdir(work_path)
if self.inter_param["type"] == 'abacus':
shutil.copyfile("task.000000/band.conf", "band.conf")
shutil.copyfile("task.000000/STRU.ori", "STRU")
shutil.copyfile("task.000000/phonopy_disp.yaml", "phonopy_disp.yaml")
os.system('phonopy -f task.0*/OUT.ABACUS/running_scf.log')
self.check_same_copy("task.000000/band.conf", "band.conf")
self.check_same_copy("task.000000/STRU.ori", "STRU")
self.check_same_copy("task.000000/phonopy_disp.yaml", "phonopy_disp.yaml")

Check warning on line 508 in apex/core/property/Phonon.py

View check run for this annotation

Codecov / codecov/patch

apex/core/property/Phonon.py#L506-L508

Added lines #L506 - L508 were not covered by tests
os.system('phonopy -f task.0*/OUT.ABACUS/running_scf.log')
if os.path.exists("FORCE_SETS"):
print('FORCE_SETS is created')
Expand All @@ -510,9 +515,8 @@
os.system('phonopy-bandplot --gnuplot band.yaml > band.dat')

elif self.inter_param["type"] == 'vasp':
shutil.copyfile("task.000000/band.conf", "band.conf")
if not os.path.samefile("task.000000/POSCAR-unitcell", "POSCAR-unitcell"):
shutil.copyfile("task.000000/POSCAR-unitcell", "POSCAR-unitcell")
self.check_same_copy("task.000000/band.conf", "band.conf")
self.check_same_copy("task.000000/POSCAR-unitcell", "POSCAR-unitcell")

Check warning on line 519 in apex/core/property/Phonon.py

View check run for this annotation

Codecov / codecov/patch

apex/core/property/Phonon.py#L518-L519

Added lines #L518 - L519 were not covered by tests

if self.approach == "linear":
os.chdir(all_tasks[0])
Expand All @@ -528,8 +532,8 @@
shutil.copyfile("band.dat", work_path/"band.dat")

elif self.approach == "displacement":
shutil.copyfile("task.000000/band.conf", "band.conf")
shutil.copyfile("task.000000/phonopy_disp.yaml", "phonopy_disp.yaml")
self.check_same_copy("task.000000/band.conf", "band.conf")
self.check_same_copy("task.000000/phonopy_disp.yaml", "phonopy_disp.yaml")

Check warning on line 536 in apex/core/property/Phonon.py

View check run for this annotation

Codecov / codecov/patch

apex/core/property/Phonon.py#L535-L536

Added lines #L535 - L536 were not covered by tests
os.system('phonopy -f task.0*/vasprun.xml')
if os.path.exists("FORCE_SETS"):
print('FORCE_SETS is created')
Expand Down
2 changes: 1 addition & 1 deletion apex/core/property/Surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
vasp_utils.perturb_xz("POSCAR", "POSCAR", self.pert_xz)
if self.inter_param["type"] == "abacus":
abacus_utils.poscar2stru("POSCAR", self.inter_param, "STRU")
os.remove("POSCAR")
#os.remove("POSCAR")
# record miller
dumpfn(all_slabs[ii].miller_index, "miller.json")

Expand Down
2 changes: 1 addition & 1 deletion apex/core/property/Vacancy.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def make_confs(self, path_to_work, path_to_equi, refine=False):
dss[ii].to("POSCAR", "POSCAR")
if self.inter_param["type"] == "abacus":
abacus_utils.poscar2stru("POSCAR", self.inter_param, "STRU")
os.remove("POSCAR")
#os.remove("POSCAR")
# np.savetxt('supercell.out', self.supercell, fmt='%d')
dumpfn(self.supercell, "supercell.json")
os.chdir(cwd)
Expand Down
Loading