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

Replace "python3" in command by sys.executable #1105

Merged
merged 3 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion dpgen/data/gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ def pert_scaled(jdata) :
if jdata['init_fp_style'] == "ABACUS":
fp_style = "abacus"
poscar_name = "STRU"
pert_cmd = 'python3 ' + pert_cmd + ' -etmax %f -ofmt %s %s %d %f > /dev/null' %(pert_box, fp_style, poscar_name, pert_numb, pert_atom)
pert_cmd = sys.executable + ' ' + pert_cmd + ' -etmax %f -ofmt %s %s %d %f > /dev/null' %(pert_box, fp_style, poscar_name, pert_numb, pert_atom)
for ii in sys_pe :
for jj in scale :
path_work = path_sp
Expand Down
4 changes: 2 additions & 2 deletions dpgen/data/surf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3

import warnings
import os,json,shutil,re,glob,argparse
import os,json,shutil,re,glob,argparse,sys
import numpy as np
import subprocess as sp
import dpgen.data.tools.hcp as hcp
Expand Down Expand Up @@ -495,7 +495,7 @@ def pert_scaled(jdata) :
sys_pe.sort()
os.chdir(cwd)

pert_cmd = "python "+os.path.join(ROOT_PATH, 'data/tools/create_random_disturb.py')
pert_cmd = sys.executable + ' ' + os.path.join(ROOT_PATH, 'data/tools/create_random_disturb.py')
pert_cmd += ' -etmax %f -ofmt vasp POSCAR %d %f > /dev/null' %(pert_box, pert_numb, pert_atom)
for ii in sys_pe :
for jj in scale :
Expand Down