1
1
# Run multiple fitting experiments in serial or parallel.
2
2
#
3
3
# 1. Update parameters ranges in run-experiments.jl
4
- # 2. Run: $ julia run-experiments.jl
4
+ # 2. Run: $ julia --project=../../ run-experiments.jl
5
5
# 3. After all experiments have been completed, run the following script to gather
6
6
# the results into a single csv: $ ./gather-results.sh
7
7
#
@@ -11,11 +11,10 @@ using IterTools
11
11
# Parameter labels
12
12
labels = [ " experiment_path" ,
13
13
" dataset_path" ,
14
- " trainingset_filename" ,
15
- " testset_filename" ,
16
- " n_train_sys" ,
17
- " n_test_sys" ,
18
- " n_batches" ,
14
+ " dataset_filename" ,
15
+ " split_prop" ,
16
+ " max_train_sys" ,
17
+ " max_test_sys" ,
19
18
" n_body" ,
20
19
" max_deg" ,
21
20
" r0" ,
@@ -25,9 +24,8 @@ labels = [ "experiment_path",
25
24
" w_e" ,
26
25
" w_f" ]
27
26
28
-
29
27
# Parallel execution. Warning: a high number of parallel experiments may degrade system performance.
30
- parallel = false
28
+ parallel = true
31
29
32
30
# Experiment folder
33
31
experiments_path = " experiments/"
@@ -38,25 +36,27 @@ juliafile = "fit-ace.jl"
38
36
# Parameter definitions ########################################################
39
37
40
38
# dataset path
41
- dataset_path = [" ../data/" ]
39
+ dataset_path = [" ../../../data/" ]
40
+
41
+ # dataset filename
42
+ dataset_filename = [ " HfB2-n24-585.exyz" ,
43
+ " HfO2_cpmd_1000.xyz" ,
44
+ " HfO2_cpmd_train_0_94_11_7700.xyz" ,
45
+ " HfO2_relax_1000_989.xyz" ]
42
46
43
- # datasets filename
44
- trainingset_filename = [" TiO2trainingset.xyz" ]
45
- testset_filename = [" TiO2testset.xyz" ]
47
+ # Split proportoin
48
+ split_prop = 0.8 : 0.8
46
49
47
50
# number of atomic configurations
48
- # n_systems = 100:100
49
- n_train_sys = 80 : 80
50
- n_test_sys = 20 : 20
51
+ max_train_sys = 800 : 800
52
+ max_test_sys = 200 : 200
51
53
52
- # number of batches per dataset
53
- n_batches = 8 : 8
54
54
55
55
# n_body: body order. N: correlation order (N = n_body - 1)
56
- n_body = 2 : 5
56
+ n_body = 2 : 2
57
57
58
58
# max_deg: maximum polynomial degree
59
- max_deg = 3 : 6
59
+ max_deg = 3 : 3
60
60
61
61
# r0: An estimate on the nearest-neighbour distance for scaling, JuLIP.rnn()
62
62
# function returns element specific earest-neighbour distance
@@ -66,43 +66,42 @@ r0 = 1.0:1.0 # ( rnn(:Hf) + rnn(:O) ) / 2.0 ?
66
66
# rin = 0.65*r0 is the default
67
67
68
68
# rcutoff or rcut: outer cutoff radius
69
- rcutoff = 4 .0: 7 .0
69
+ rcutoff = 5 .0: 5 .0
70
70
71
71
# D: specifies the notion of polynomial degree for which there is no canonical
72
72
# definition in the multivariate setting. Here we use SparsePSHDegree which
73
73
# specifies a general class of sparse basis sets; see its documentation for
74
74
# more details. Default: D = ACE1.SparsePSHDegree(; wL = rpi.wL, csp = rpi.csp)
75
75
# wL: ?
76
- wL = 0.5 : 0.5 : 1.5
76
+ wL = 1.0 : 1.0
77
77
# csp: ?
78
- csp = 0.5 : 0.5 : 1.5
78
+ csp = 1.0 : 1.0
79
79
80
80
# pin: specifies the behaviour of the basis as the inner cutoff radius.
81
81
# pin = 0 is the default.
82
82
83
83
# w_e: energy weight, used during fitting in normal equations
84
- w_e = [ 1e-8 , 1.0 , 100.0 ]
84
+ w_e = 1.0 : 1.0
85
85
86
86
# w_f: force weight, used during fitting in normal equations
87
- w_f = [ 1e-8 , 1.0 , 100.0 ]
87
+ w_f = 1.0 : 1.0
88
88
89
89
90
90
# Run experiments ##############################################################
91
91
92
- run (` mkdir $experiments_path ` )
93
- for params in product (dataset_path, trainingset_filename, testset_filename,
94
- n_train_sys, n_test_sys, n_batches,
95
- n_body, max_deg, r0, rcutoff, wL, csp, w_e, w_f)
92
+ run (` mkdir -p $experiments_path ` )
93
+ for params in product ( dataset_path, dataset_filename, split_prop, max_train_sys,
94
+ max_test_sys, n_body, max_deg, r0, rcutoff, wL, csp, w_e, w_f)
96
95
print (" Launching experiment with parameters: " )
97
96
currexp_path = reduce (* ,map (s-> " $s " * " -" , params[2 : end ]))[1 : end - 1 ]
98
97
params = vcat ([" $(labels[1 ]) " , " $experiments_path$currexp_path /" ],
99
98
vcat ([ [" $l " , " $p " ] for (l, p) in zip (labels[2 : end ], params)]. .. ))
100
99
println (" $params " )
101
100
102
101
if parallel
103
- @async run (Cmd (` nohup julia $juliafile $params ` , dir= " ./" ));
102
+ @async run (Cmd (` nohup julia --project=../../ $juliafile $params ` , dir= " ./" ));
104
103
else
105
- run (Cmd (` julia $juliafile $params ` , dir= " ./" ));
104
+ run (Cmd (` julia --project=../../ $juliafile $params ` , dir= " ./" ));
106
105
end
107
106
108
107
println (" " )
0 commit comments