File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed
tools/for_coding/nep4nep5 Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments