Skip to content

Commit 5765d13

Browse files
update examples
1 parent a57dce6 commit 5765d13

11 files changed

+212
-40
lines changed

apex/utils.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ def judge_flow(parameter: List[dict], specify: str) -> (Type[OP], str, str, dict
214214
props_param = parameter[0]
215215

216216
elif num_args == 2:
217-
task1, run_op1 = get_task_type(loadfn(parameter[0]))
218-
flow1 = get_flow_type(loadfn(parameter[0]))
219-
task2, run_op2 = get_task_type(loadfn(parameter[1]))
220-
flow2 = get_flow_type(loadfn(parameter[1]))
217+
task1, run_op1 = get_task_type(parameter[0])
218+
flow1 = get_flow_type(parameter[0])
219+
task2, run_op2 = get_task_type(parameter[1])
220+
flow2 = get_flow_type(parameter[1])
221221
if flow1 != flow2:
222222
if specify == 'relax':
223223
flow_type = 'relax'
@@ -233,8 +233,8 @@ def judge_flow(parameter: List[dict], specify: str) -> (Type[OP], str, str, dict
233233
props_param = parameter[0]
234234
else:
235235
raise RuntimeError(
236-
'confusion of jason arguments provided: '
237-
'joint type of jason conflicts with the other json argument'
236+
'confusion of json arguments provided: '
237+
'joint type of json conflicts with the other json argument'
238238
)
239239
else:
240240
raise RuntimeError('Same type of input json files')

examples/abacus_demo/global_bohrium.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"dflow_host": "https://workflows.deepmodeling.com",
33
"k8s_api_server": "https://workflows.deepmodeling.com",
4-
"email": "YOUR_EMAIL",
5-
"password": "YOUR_PASSWD",
6-
"program_id": 1234,
7-
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.1.0",
4+
"email": "",
5+
"password": "",
6+
"program_id": xxxx,
7+
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
88
"abacus_image_name":"registry.dp.tech/dptech/abacus:3.2.3",
99
"abacus_run_command":"mpirun -n 32 abacus",
1010
"batch_type": "Bohrium",

examples/abacus_demo/param_joint.json

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"structures": ["confs/fcc-Al"],
3+
"interaction": {
4+
"type": "abacus",
5+
"incar": "abacus_input/INPUT",
6+
"potcar_prefix": "abacus_input",
7+
"potcars": {"Al": "Al_ONCV_PBE-1.0.upf"},
8+
"orb_files": {"Al":"Al_gga_9au_100Ry_4s4p1d.orb"}
9+
},
10+
"relaxation": {
11+
"cal_type": "relaxation",
12+
"cal_setting": {"relax_pos":true,
13+
"relax_shape":true,
14+
"relax_vol":true}
15+
},
16+
17+
"properties": [
18+
{
19+
"type": "eos",
20+
"skip": false,
21+
"vol_start": 0.6,
22+
"vol_end": 1.4,
23+
"vol_step": 0.05
24+
},
25+
{
26+
"type": "elastic",
27+
"skip": true,
28+
"norm_deform": 1e-2,
29+
"shear_deform": 1e-2
30+
},
31+
{
32+
"type": "surface",
33+
"skip": true,
34+
"min_slab_size": 10,
35+
"min_vacuum_size":11,
36+
"max_miller": 2,
37+
"cal_type": "static"
38+
},
39+
{
40+
"type": "interstitial",
41+
"skip": true,
42+
"supercell": [1, 1, 1],
43+
"insert_ele": ["Mo"]
44+
},
45+
{
46+
"type": "gamma",
47+
"skip": true,
48+
"plane_miller": [1,2,3],
49+
"slip_direction": [1,1,-1],
50+
"hcp": {
51+
"plane_miller": [0,0,0,1],
52+
"slip_direction": [2,-1,-1,0],
53+
"slip_length": 1
54+
},
55+
"supercell_size": [1,1,20],
56+
"vacuum_size": 15,
57+
"add_fix": ["true","true","false"],
58+
"n_steps": 20
59+
},
60+
{
61+
"type": "phonon",
62+
"skip": true,
63+
"BAND": "0.5000 0.5000 0.5000 0.0000 0.0000 0.0000 0.5000 0.0000 0.5000 0.5000 0.2500 0.7500",
64+
"supercell_size":[1,1,1],
65+
"MESH":[8,8,8],
66+
"PRIMITIVE_AXES": "0 1/2 1/2 1/2 0 1/2 1/2 1/2 0",
67+
"BAND_POINTS":21,
68+
"BAND_CONNECTION" :true,
69+
"cal_setting": {
70+
"K_POINTS": [6,6,6,0,0,0],
71+
"input_prop": "abacus_input/INPUT_phonon"
72+
}
73+
}
74+
75+
]
76+
}

examples/abacus_demo/param_props.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"structures": ["confs/fcc-Al"],
33
"interaction": {
44
"type": "abacus",
5-
"incar": "abacus_input/INPUT_phonon",
5+
"incar": "abacus_input/INPUT",
66
"potcar_prefix": "abacus_input",
7-
"potcars": {"Al": "Al.PD04.PBE.UPF"},
8-
"orb_files": {"Al":"Al_gga_10au_100Ry_3s3p2d.orb"}
7+
"potcars": {"Al": "Al_ONCV_PBE-1.0.upf"},
8+
"orb_files": {"Al":"Al_gga_9au_100Ry_4s4p1d.orb"}
99
},
1010
"properties": [
1111
{
1212
"type": "eos",
13-
"skip": true,
13+
"skip": false,
1414
"vol_start": 0.6,
1515
"vol_end": 1.4,
1616
"vol_step": 0.05
@@ -52,7 +52,7 @@
5252
},
5353
{
5454
"type": "phonon",
55-
"skip": false,
55+
"skip": true,
5656
"BAND": "0.5000 0.5000 0.5000 0.0000 0.0000 0.0000 0.5000 0.0000 0.5000 0.5000 0.2500 0.7500",
5757
"supercell_size":[1,1,1],
5858
"MESH":[8,8,8],

examples/abacus_demo/param_relax.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"type": "abacus",
55
"incar": "abacus_input/INPUT",
66
"potcar_prefix": "abacus_input",
7-
"potcars": {"Al": "Al.PD04.PBE.UPF"},
8-
"orb_files": {"Al":"Al_gga_10au_100Ry_3s3p2d.orb"}
7+
"potcars": {"Al": "Al_ONCV_PBE-1.0.upf"},
8+
"orb_files": {"Al":"Al_gga_9au_100Ry_4s4p1d.orb"}
99

1010
},
1111
"relaxation": {

examples/lammps_demo/global_bohrium.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"dflow_host": "https://workflows.deepmodeling.com",
33
"k8s_api_server": "https://workflows.deepmodeling.com",
4-
"email": "YOUR_EMAIL",
5-
"password": "YOUR_PASSWD",
6-
"program_id": 1234,
4+
"email": "",
5+
"password": "",
6+
"program_id": xxxx,
77
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
88
"lammps_image_name": "registry.dp.tech/dptech/prod-11045/deepmdkit-phonolammps:2.1.1",
99
"group_size": 4,

examples/lammps_demo/param_joint.json

+11-10
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@
2323
},
2424
{
2525
"type": "elastic",
26-
"skip": true,
2726
"norm_deform": 1e-2,
2827
"shear_deform": 1e-2,
2928
"cal_setting": {"etol": 0,
3029
"ftol": 1e-10}
3130
},
31+
{
32+
"type": "vacancy",
33+
"skip": true,
34+
"supercell": [2, 2, 2]
35+
},
36+
3237
{
3338
"type": "surface",
3439
"skip": true,
@@ -40,31 +45,27 @@
4045
{
4146
"type": "interstitial",
4247
"skip": true,
43-
"supercell": [1, 1, 1],
48+
"supercell": [2, 2, 2],
4449
"insert_ele": ["Mo"]
4550
},
46-
{
47-
"skip": true,
48-
"supercell": [2, 2, 2]
49-
},
5051
{
5152
"type": "gamma",
5253
"skip": true,
53-
"plane_miller": [1,2,3],
54-
"slip_direction": [1,1,-1],
54+
"plane_miller": [1,1,0],
55+
"slip_direction": [-1,1,1],
5556
"hcp": {
5657
"plane_miller": [0,0,0,1],
5758
"slip_direction": [2,-1,-1,0],
5859
"slip_length": 1
5960
},
60-
"supercell_size": [2,2,100],
61+
"supercell_size": [2,2,50],
6162
"vacuum_size": 15,
6263
"add_fix": ["true","true","false"],
6364
"n_steps": 20
6465
},
6566
{
6667
"type": "phonon",
67-
"skip": false,
68+
"skip": true,
6869
"BAND": "0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.5000 -0.5000 0.5000 0.25000 0.2500 0.2500 0 0 0",
6970
"supercell_size":[4,4,4],
7071
"PRIMITIVE_AXES": "Auto"

examples/vasp_demo/global_bohrium.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"dflow_host": "https://workflows.deepmodeling.com",
33
"k8s_api_server": "https://workflows.deepmodeling.com",
4-
"email": "YOUR_EMAIL",
5-
"password": "YOUR_PASSWD",
6-
"program_id": 1234,
4+
"email": "",
5+
"password": "",
6+
"program_id": xxxx,
77
"group_size": 1,
8-
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.1.0",
8+
"apex_image_name":"registry.dp.tech/dptech/prod-11045/apex-dependency:1.2.0",
99
"vasp_image_name":"registry.dp.tech/dptech/vasp:5.4.4-dflow",
1010
"vasp_run_command":"bash -c \"source /opt/intel/oneapi/setvars.sh && ulimit -s unlimited && mpirun -n 32 /opt/vasp.5.4.4/bin/vasp_std \"",
1111
"batch_type": "Bohrium",

examples/vasp_demo/param_joint.json

+91
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
{
2+
"structures": ["confs/std-*"],
3+
"interaction": {
4+
"type": "vasp",
5+
"incar": "vasp_input/INCAR",
6+
"potcar_prefix": "vasp_input",
7+
"potcars": {"Mo": "POTCAR.Mo"}
8+
},
9+
"relaxation": {
10+
"cal_type": "relaxation",
11+
"cal_setting": {"relax_pos": true,
12+
"relax_shape": true,
13+
"relax_vol": true,
14+
"ediff": 1e-6,
15+
"ediffg": -0.01,
16+
"encut": 400,
17+
"kspacing": 0.2,
18+
"kgamma": false}
19+
},
20+
"properties": [
21+
{
22+
"type": "eos",
23+
"skip": true,
24+
"vol_start": 0.6,
25+
"vol_end": 1.4,
26+
"vol_step": 0.4
27+
},
28+
{
29+
"type": "eos",
30+
"skip": false,
31+
"suffix": "4_step",
32+
"vol_start": 0.6,
33+
"vol_end": 1.4,
34+
"vol_step": 0.2
35+
},
36+
{
37+
"type": "elastic",
38+
"norm_deform": 1e-2,
39+
"shear_deform": 1e-2
40+
},
41+
{
42+
"type": "surface",
43+
"skip": true,
44+
"min_slab_size": 10,
45+
"min_vacuum_size":11,
46+
"max_miller": 2,
47+
"cal_type": "static"
48+
},
49+
{
50+
"type": "vacancy",
51+
"skip": true,
52+
"supercell": [2, 2, 2]
53+
},
54+
{
55+
"type": "interstitial",
56+
"skip": true,
57+
"supercell": [1, 1, 1],
58+
"insert_ele": ["Mo"]
59+
},
60+
{
61+
"type": "gamma",
62+
"skip": true,
63+
"plane_miller": [1,2,3],
64+
"slip_direction": [1,1,-1],
65+
"hcp": {
66+
"plane_miller": [0,0,0,1],
67+
"slip_direction": [2,-1,-1,0],
68+
"slip_length": 1
69+
},
70+
"supercell_size": [1,1,20],
71+
"vacuum_size": 15,
72+
"add_fix": ["true","true","false"],
73+
"n_steps": 20
74+
},
75+
{
76+
"type": "phonon",
77+
"skip": true,
78+
"suffix": "linear",
79+
"BAND": "0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.5000 -0.5000 0.5000 0.25000 0.2500 0.2500 0 0 0",
80+
"supercell_size":[2,2,2]
81+
},
82+
{
83+
"type": "phonon",
84+
"skip": true,
85+
"suffix": "displacement",
86+
"approach": "displacement",
87+
"BAND": "0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.5000 -0.5000 0.5000 0.25000 0.2500 0.2500 0 0 0",
88+
"supercell_size":[2,2,2]
89+
}
90+
]
91+
}

examples/vasp_demo/param_props.json

+9-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"structures": ["confs/std-bcc"],
2+
"structures": ["confs/std-*"],
33
"interaction": {
44
"type": "vasp",
55
"incar": "vasp_input/INCAR",
@@ -16,15 +16,14 @@
1616
},
1717
{
1818
"type": "eos",
19-
"skip": true,
19+
"skip": false,
2020
"suffix": "4_step",
2121
"vol_start": 0.6,
2222
"vol_end": 1.4,
2323
"vol_step": 0.2
2424
},
2525
{
2626
"type": "elastic",
27-
"skip": true,
2827
"norm_deform": 1e-2,
2928
"shear_deform": 1e-2
3029
},
@@ -36,6 +35,11 @@
3635
"max_miller": 2,
3736
"cal_type": "static"
3837
},
38+
{
39+
"type": "vacancy",
40+
"skip": true,
41+
"supercell": [2, 2, 2]
42+
},
3943
{
4044
"type": "interstitial",
4145
"skip": true,
@@ -59,14 +63,14 @@
5963
},
6064
{
6165
"type": "phonon",
62-
"skip": false,
66+
"skip": true,
6367
"suffix": "linear",
6468
"BAND": "0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.5000 -0.5000 0.5000 0.25000 0.2500 0.2500 0 0 0",
6569
"supercell_size":[2,2,2]
6670
},
6771
{
6872
"type": "phonon",
69-
"skip": false,
73+
"skip": true,
7074
"suffix": "displacement",
7175
"approach": "displacement",
7276
"BAND": "0.0000 0.0000 0.5000 0.0000 0.0000 0.0000 0.5000 -0.5000 0.5000 0.25000 0.2500 0.2500 0 0 0",

examples/vasp_demo/param_relax.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"structures": ["confs/std-bcc"],
2+
"structures": ["confs/std-*"],
33
"interaction": {
44
"type": "vasp",
55
"incar": "vasp_input/INCAR",

0 commit comments

Comments
 (0)