Insert chem formula in input/output files of fortran code.

This commit is contained in:
2023-01-20 16:01:58 +01:00
parent d865e7ef08
commit c2f0513f4a
2 changed files with 6 additions and 2 deletions

View File

@@ -915,7 +915,7 @@ function CreateInpFile(All) {
TemplateFile=TemplateFile+"\n"+"N_Layers=numLayer";
// Then loop over the layers and for each give the following structure
var TemplateLayer= "L1d L1rho L1CK\n L1ELZ1 L1ELZ2 L1ELZ3 L1ELZ4 L1ELZ5\n L1ELW1 L1ELW2 L1ELW3 L1ELW4 L1ELW5\n L1ELC1 L1ELC2 L1ELC3 L1ELC4 L1ELC5\n L1ELE1 L1ELE2 L1ELE3 L1ELE4 L1ELE5\n L10301 L10302 L10303 L10304 L10305\n 0.0000 0.0000 0.0000 0.0000 0.0000\n L1ELST11 L1ELST21 L1ELST31 L1ELST41 L1ELST51\n L1ELST12 L1ELST22 L1ELST32 L1ELST42 L1ELST52\n L1ELST13 L1ELST23 L1ELST33 L1ELST43 L1ELST53\n L1ELST14 L1ELST24 L1ELST34 L1ELST44 L1ELST54\n L1ELST15 L1ELST25 L1ELST35 L1ELST45 L1ELST55";
var TemplateLayer= "L1d L1rho L1CK L1Comp\n L1ELZ1 L1ELZ2 L1ELZ3 L1ELZ4 L1ELZ5\n L1ELW1 L1ELW2 L1ELW3 L1ELW4 L1ELW5\n L1ELC1 L1ELC2 L1ELC3 L1ELC4 L1ELC5\n L1ELE1 L1ELE2 L1ELE3 L1ELE4 L1ELE5\n L10301 L10302 L10303 L10304 L10305\n 0.0000 0.0000 0.0000 0.0000 0.0000\n L1ELST11 L1ELST21 L1ELST31 L1ELST41 L1ELST51\n L1ELST12 L1ELST22 L1ELST32 L1ELST42 L1ELST52\n L1ELST13 L1ELST23 L1ELST33 L1ELST43 L1ELST53\n L1ELST14 L1ELST24 L1ELST34 L1ELST44 L1ELST54\n L1ELST15 L1ELST25 L1ELST35 L1ELST45 L1ELST55";
let projectile = All['ProjType'];
All['ProjZ']=Zof(projectile);
@@ -1187,6 +1187,8 @@ function startSequence(All) {
let chem_formula = "";
let place_holder = "";
let re = new RegExp(place_holder,"g");
// This is not needed if the chem formula is in the input file, handeled by the fortran code.
/*
for (let i=1;i<=All["numLayer"];i++) {
LComp = "L"+i+"Comp";
chem_formula = All[LComp];
@@ -1194,6 +1196,7 @@ function startSequence(All) {
re = new RegExp(place_holder,"g");
data = data.replace(re, chem_formula);
}
*/
let seq_file = All["workPath"]+"/"+All["fileNamePrefix"]+"_Seq_Results.dat";
writeAsciiFile(seq_file, data);

View File

@@ -3426,7 +3426,8 @@ c
& 5x,'imp',2x,'backsc',3x,'trans',3x,'tried',4x,'negE',3x,
& 'range',6x,'straggeling',2x, 'Eback',7x,'sigEback',4x
& ,'Etrans',6x,'SigEtrans',3x, 'red._E',6x ,'PRC',3x,999(A7
& I0,3x))
& ,3x))
C & I0,3x))
7801 FORMAT(F12.2,3(1x,F9.2),1x,6(I7,1x),6(E12.4),2(E12.4),999(I7
& ,1x))