Skip to content

Commit 7baf42e

Browse files
authored
Merge pull request brucefan1983#775 from brucefan1983/nep-mp
Nep mp
2 parents 869f1c0 + c6338a5 commit 7baf42e

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

src/main_nep/snes.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ void SNES::compute(Parameters& para, Fitness* fitness_function)
250250
int num_lines_to_be_skipped = 5;
251251
if (
252252
tokens[0] == "nep3_zbl" || tokens[0] == "nep4_zbl" || tokens[0] == "nep3_zbl_temperature" ||
253-
tokens[0] == "nep4_zbl_temperature") {
253+
tokens[0] == "nep4_zbl_temperature" || tokens[0] == "nep5_zbl") {
254254
num_lines_to_be_skipped = 6;
255255
}
256256

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
clear; close all;
2+
3+
% old file
4+
load nep.txt;
5+
6+
% inputs
7+
num_species=89;
8+
neuron=80;
9+
n_max=[6,4];
10+
l_max=[4,2,0];
11+
12+
% calculated
13+
num_angular=l_max(1)+(l_max(2)>0)+(l_max(3)>0);
14+
dim=(n_max(1)+1) + (n_max(2)+1)*num_angular;
15+
num_ann_para=(dim+2)*neuron;
16+
num_total=size(nep,1);
17+
18+
19+
% new file
20+
fid=fopen('nep_new.txt','w');
21+
22+
offset=1;
23+
for n=1:num_species
24+
for m=1:num_ann_para
25+
fprintf(fid,'%15.7e\n',nep(offset));
26+
offset=offset+1;
27+
end
28+
if n==10
29+
fprintf(fid,'%15.7e\n',-83.3674 +(0.0301684+0.0328734)/2);
30+
elseif n==18
31+
fprintf(fid,'%15.7e\n',-83.3674 +0.0587795);
32+
else
33+
fprintf(fid,'%15.7e\n',0);
34+
end
35+
end
36+
37+
for n=offset:num_total
38+
fprintf(fid,"%15.7e\n",nep(n));
39+
end
40+
41+
fclose(fid);
42+

0 commit comments

Comments
 (0)