From e286702731ce1515abd4a068eba880a3b56a3234 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 09:07:06 -0700 Subject: [PATCH 01/16] update the muon mass - use the 2018 CODATA recommended value, see: https://doi.org/10.1103/RevModPhys.93.025010 https://physics.nist.gov/cuu/Constants/index.html --- TrimSPlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index c46fff0..0950b33 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -141,7 +141,7 @@ function Zof(Element) function Massof(Element) { var ElementsA = { - "Muon":0.113, + "Muon":0.1134289259, "Li8":8.0, "B12":12.0, "H":1.00800, From 42d131ebaef7f09c4dccafac45a993d5b6b6440d Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 09:18:52 -0700 Subject: [PATCH 02/16] update the masses of lithium-8 and boron-12 - use results from the new atomic mass evaluation AME2020: https://doi.org/10.1088/1674-1137/abddb0 https://doi.org/10.1088/1674-1137/abddaf --- TrimSPlib.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index 0950b33..2622b61 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -142,8 +142,8 @@ function Massof(Element) { var ElementsA = { "Muon":0.1134289259, - "Li8":8.0, - "B12":12.0, + "Li8":8.02248624, + "B12":12.0143526, "H":1.00800, "He":4.00300, "Li":6.93900, From d2c985ed8737cbdbadf8944b8f58cbcdbb052450 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 09:28:44 -0700 Subject: [PATCH 03/16] add magnesium-31 as a projectile option - use its AME2020 mass --- TrimSP.html | 7 ++++--- TrimSPlib.js | 2 ++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/TrimSP.html b/TrimSP.html index 0344bce..55fa9a8 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -62,9 +62,10 @@ Projectile diff --git a/TrimSPlib.js b/TrimSPlib.js index 2622b61..d50114e 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -41,6 +41,7 @@ function Zof(Element) "Muon":1, "Li8":3, "B12":5, + "Mg31":12, "H":1, "He":2, "Li":3, @@ -144,6 +145,7 @@ function Massof(Element) "Muon":0.1134289259, "Li8":8.02248624, "B12":12.0143526, + "Mg31":30.996648, "H":1.00800, "He":4.00300, "Li":6.93900, From 306fe57d32723c95aabd77e88dcdbec64a581f13 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 10:48:02 -0700 Subject: [PATCH 04/16] update the README - add some hyperlinks - small updates to the text/formatting --- Readme.md | 57 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/Readme.md b/Readme.md index 5fd58bb..d4899d0 100644 --- a/Readme.md +++ b/Readme.md @@ -2,39 +2,62 @@ ### Contents ### -This is the fortran source code and GUI of TrimSP Monte-Carlo simulations. +This repository contains the [Fortran] source code and an accompanying +graphical user interface ([GUI]) for TrimSP - +an application for performing [Monte Carlo] simulations of ion implantation. -* This code is specifically tuned to simulate implantation of low energy projectiles in materials. -* The code is maintained by the Low Energy Muons group at PSI. -* The GUI is written in Node.js, JavaScript and Electron. -* The binary (statically linked) from the fortran code is also included. -* RPM and DEB packages are also included +* This code is specifically tuned to simulate implantation of low-energy projectiles in materials. +* The code is maintained by the Low Energy Muons ([LEM]) group at the Paul Scherrer Institute ([PSI]). +* The [GUI] is written in [Node.js], [JavaScript] and [Electron]. +* The binary (statically linked) from the [Fortran] code is also included. +* [RPM] and [DEB] packages are also included. ### Supported platforms ### -* Linux +* [Linux] ### Installation ### + ###### Fortran code compilation ###### -Install gfortran compiler, then: +Install the `gfortran` compiler, then: - cd trimsp/fortran - make - make install +```bash +cd trimsp/fortran +make +make install +``` -This will install the `trimspNL` in `/usr/local/bin`, but can be moved to any other directory in your `PATH`. +This will install the `trimspNL` binary in `/usr/local/bin`, +but it can be moved to any other directory in your `PATH`. ###### Running the GUI ###### -Install Node.js (nodejs, nodejs-libs and npm), then +Install [Node.js] (`nodejs`, `nodejs-libs` and `npm`), +then run: - cd trimsp - npm install - npm start +```bash +cd trimsp +npm install +npm start +``` -You do not need to run `npm install` every time. Next time you can simply run `npm start` only. +Note: you do not need to run `npm install` every time. +Next time you can simply run `npm start` only. ### Contact ### + Zaher Salman + +[Fortran]: https://fortran-lang.org/ +[Node.js]: https://nodejs.org/en/ +[JavaScript]: https://www.javascript.com/ +[Electron]: https://www.electronjs.org/ +[PSI]: https://www.psi.ch/en +[LEM]: https://www.psi.ch/en/low-energy-muons +[RPM]: https://rpm.org/ +[DEB]: https://en.wikipedia.org/wiki/Deb_(file_format) +[Linux]: https://en.wikipedia.org/wiki/Linux +[Monte Carlo]: https://en.wikipedia.org/wiki/Monte_Carlo_method +[GUI]: https://en.wikipedia.org/wiki/Graphical_user_interface \ No newline at end of file From 824f24261b73affccfdea5e4ad6ca2d269406ae5 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 11:24:16 -0700 Subject: [PATCH 05/16] add .gitignore template for javascript - from: https://github.com/github/gitignore --- .gitignore | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..943af75 --- /dev/null +++ b/.gitignore @@ -0,0 +1,118 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env.production + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* \ No newline at end of file From 5fa07b0e394f77af9a662336c3a4136051ea5b41 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 11:27:03 -0700 Subject: [PATCH 06/16] fix typo --- TrimSP.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrimSP.html b/TrimSP.html index 55fa9a8..e9482d9 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -76,7 +76,7 @@ Depth increment [A] Energy [eV] Energy sigma [eV] - Angel [deg] + Angle [deg] Angle sigma [deg] Random seed From 1bb1972e9ea610e338813eb83d87b23685aba125 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 29 Sep 2021 12:51:54 -0700 Subject: [PATCH 07/16] add optimizations when compiling trimspNL - this shortens the runtime a simulation significantly (by a factor of ~2). - the output from trimspNL is identical to when no optimizations are used --- fortran/Makefile | 2 +- trimspNL => trimspNL-static | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename trimspNL => trimspNL-static (100%) diff --git a/fortran/Makefile b/fortran/Makefile index 06bdfd5..e78f305 100644 --- a/fortran/Makefile +++ b/fortran/Makefile @@ -19,7 +19,7 @@ OPS=-c $(DIALECT) $(WARN) $(DEBUG) all : trimspNL trimspNL : trimspNL.F - $(FC) -o $@ $< + $(FC) -O3 -o $@ $< clean: rm -f *.o *~ \#* .#* trimspNL diff --git a/trimspNL b/trimspNL-static similarity index 100% rename from trimspNL rename to trimspNL-static From 644d0479d8ea52732394ec0a9eaddbdbd2fa9efa Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Thu, 30 Sep 2021 09:17:20 -0700 Subject: [PATCH 08/16] increase the maximum number of points in the depth distribution - this mitigates the liklihood of truncated output when the "bin" size is small (e.g., < 1 nm). - an additional compiler flag is needed for this (-mcmodel=medium), which relaxes some of the assumptions about addresses and sizes of sections in the generated code. See: https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html - improve the Makefile during the update, too. --- fortran/Makefile | 16 ++++++++-------- fortran/trimspNL.F | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fortran/Makefile b/fortran/Makefile index e78f305..0c45fd8 100644 --- a/fortran/Makefile +++ b/fortran/Makefile @@ -7,19 +7,19 @@ # generator in the code. Use gfortran which is now # a standard part of gcc in moder systems. # -FC=gfortran -#DEBUG = -g -O -fbacktrace -ffpe-trap='underflow' -DEBUG = -#WARN= -Wall -W -WARN= -DIALECT = + +FC = gfortran +DEBUG = # -g -O -fbacktrace -ffpe-trap='underflow' +WARN = # -Wall -Wextra +DIALECT = -std=gnu prefix = /usr/local -OPS=-c $(DIALECT) $(WARN) $(DEBUG) +# OPS = -c $(DIALECT) $(WARN) $(DEBUG) +FCFLAGS = $(DIALECT) $(WARN) $(DEBUG) -O3 -mcmodel=medium all : trimspNL trimspNL : trimspNL.F - $(FC) -O3 -o $@ $< + $(FC) $(FCFLAGS) -o $@ $< clean: rm -f *.o *~ \#* .#* trimspNL diff --git a/fortran/trimspNL.F b/fortran/trimspNL.F index 50067f9..54cf15b 100644 --- a/fortran/trimspNL.F +++ b/fortran/trimspNL.F @@ -53,7 +53,7 @@ C and maximum number of points in the depth distribution MAXD C This is the only point where the number of layers and depth C profile are changed. All other parameters shouold be changed C accordingly. - PARAMETER (MAXD=500) + PARAMETER (MAXD=10000) PARAMETER (MAXNL=100) PARAMETER (MAXD1=MAXD+1) PARAMETER (MAXD2=MAXD+2) From 4683945a711963e00b528254d7be3abf8808ced0 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Tue, 27 Dec 2022 17:06:52 -0400 Subject: [PATCH 09/16] add better labelling of internals/externals - use clearer notation for isotope-specific projectiles - harmonize formatting of GUI labels (consistent naming, add missing units, fix typos, etc.) - use more verbose/descriptive naming of the function/dictionary handelling the electronic stopping coefficients (for easier extension later). --- TrimSP.html | 34 +++++++++++++++++----------------- TrimSPlib.js | 24 ++++++++++++------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/TrimSP.html b/TrimSP.html index e9482d9..ee9964d 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -24,7 +24,7 @@ - +
@@ -51,7 +51,7 @@
- +
Layer #CompositionDensity [g/cm3]Thickness [A]
Layer #CompositionDensity [g/cm3]Thickness [Å]
@@ -61,10 +61,10 @@ Projectile parameters Projectile @@ -72,8 +72,8 @@ Number of projectiles - Starting depth [A] - Depth increment [A] + Starting depth [Å] + Depth increment [Å] Energy [eV] Energy sigma [eV] Angle [deg] @@ -89,22 +89,22 @@ Enable scan on diff --git a/TrimSPlib.js b/TrimSPlib.js index d50114e..ed1fdf6 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -38,10 +38,10 @@ function parse_formula (mf) { function Zof(Element) { var ElementsZ = { - "Muon":1, - "Li8":3, - "B12":5, - "Mg31":12, + "muon":1, + "lithium-8":3, + "boron-12":5, + "magnesium-31":12, "H":1, "He":2, "Li":3, @@ -142,10 +142,10 @@ function Zof(Element) function Massof(Element) { var ElementsA = { - "Muon":0.1134289259, - "Li8":8.02248624, - "B12":12.0143526, - "Mg31":30.996648, + "muon":0.1134289259, + "lithium-8":8.02248624, + "boron-12":12.0143526, + "magnesium-31":30.996648, "H":1.00800, "He":4.00300, "Li":6.93900, @@ -342,9 +342,9 @@ function Elastof(Element) { return Elast[Element]; } -function Stopicru(Element) +function StoppingCoefficients(Element) { - var Stopicru = { + var StoppingCoefficientsICRU = { "H":"1.25400,1.44000,242.60001,12000.00000,0.11590", "He":"1.22900,1.39700,484.50000,5873.00000,0.05225", "Li":"1.41100,1.60000,725.59998,3013.00000,0.04578", @@ -439,7 +439,7 @@ function Stopicru(Element) "U":"7.29000,8.20400,19180.00000,586.29999,0.00267", "":"0.00000,0.00000,0.00000,0.00000,0.00000" }; - return Stopicru[Element]; + return StoppingCoefficientsICRU[Element]; } @@ -891,7 +891,7 @@ function CreateInpFile(All) { All[LEkey+"E"+NEl]=ElE; // sprintf("%8.4f",$ElE); All["L"+i+"030"+NEl]=El030; // sprintf("%8.4f",$El030); - let ElST = Stopicru(El); + let ElST = StoppingCoefficients(El); let ElSTs = ElST.split(','); let j=1; for (let iElST of ElSTs) { From 9551cbdd01326f1e5caf364088ae113fac043d8b Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Wed, 28 Dec 2022 12:45:48 -0400 Subject: [PATCH 10/16] add explanatory text for the "other" simulation parameters - also include link to Eckstein's book --- TrimSP.html | 123 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 110 insertions(+), 13 deletions(-) diff --git a/TrimSP.html b/TrimSP.html index ee9964d..ba6d600 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -134,61 +134,142 @@
- + - + - + - + - + - + - + - + - + - + - + - + @@ -196,12 +277,28 @@ - +
EF +
+ EF + Cutoff energy of projectiles (in eV);
+ must be greater than zero. +
+
KK0 +
+ KK0 + Maximum order of weak (simultaneous) collisions between projectiles and target atoms;
+ must be between 0 and 4 (0 means no weak collisions included). +
+
ESB +
+ ESB + Surface binding energy for projectiles (in eV). +
+
KK0R +
+ KK0R + Maximum order of weak (simultaneous) collisions between target atoms;
+ must be between 0 and 4 (0 means no weak collisions included). +
+
SHEATH +
+ SHEATH + Sheath potential (in eV); typically 3 * kT (i.e., 3 * |projectile energy|). +
+
KDEE1 +
+ KDEE1 + Inelastic energy loss model for projectiles:
+ 1 = nonlocal (Lindhard-Scharff);
+ 2 = local (Oen-Robinson);
+ 3 = equipartition of 1 & 2;
+ 4 = nonlocal (Anderson-Ziegler tables for hydrogen);
+ 5 = nonlocal (Ziegler tables for helium). +
+
ERC +
+ ERC + Recoil cutoff energy (in eV);
+ usually equal to the surface binding energy. +
+
KDEE2 +
+ KDEE2 + Inelastic energy loss for target atoms:
+ 1 = nonlocal (Lindhard-Scharff);
+ 2 = local (Oen-Robinson);
+ 3 = equipartition of 1 and 2. +
+
RD +
+ RD + Depth (in Å) to which recoils are followed.
+ RD = 50 is usually sufficient for sputtering
+ (if the projectile energy is not too high).
+ Use RD = 100 * CW (i.e., the depth increment) for following the full cascade. +
+
IPOT +
+ IPOT + Interaction potential between projectiles and target atoms:
+ 1 = krypton-carbon (Kr-C) potential;
+ 2 = Molière potential;
+ 3 = Ziegler-Biersack-Littmark (ZBL) potential.
CA +
+ CA + Correction factor to the Firsov screening length for collisions between projectile and target atoms
+ (only for application of the Molière potential);
+ usually on the order of ~1.0. +
+
IPOTR +
+ IPOTR + Interaction potential between target atoms:
+ 1 = krypton-carbon (Kr-C) potential;
+ 2 = Molière potential;
+ 3 = Ziegler-Biersack-Littmark (ZBL) potential. +
+
IRL +
+ IRL + 0 = no recoils are generated (i.e., no sputtering effects);
+ used to speed up the calculation if only projectile ranges are of interest. +
+
+

+ For further details see: +

+

+ W. Eckstein, Computer Simulation of Ion-Solid Interactions,
+ Springer Series in Materials Science, Vol. 10 (Springer-Verlag, Berlin, 1991).
+ + https://doi.org/10.1007/978-3-642-73513-4 + +

From 4e68962937857acf9193fa6e0f94c00e397f2bb6 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Thu, 29 Dec 2022 19:54:01 -0400 Subject: [PATCH 11/16] fix "smart" matching of projectile & parameter defaults - mismatch caused by changes in commit 4683945a711963e00b528254d7be3abf8808ced0 --- TrimSPlib.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index add3998..1e52dd2 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -678,7 +678,7 @@ function ProjSmartDefaults() var sigEnergy = document.getElementById("sigEnergy"); var sigAngle = document.getElementById("sigAngle"); - if (Proj == "Muon") { + if (Proj == "muon") { sigEnergy.value = "450"; sigAngle.value = "15"; } else { From 7c9360875c8c8724933d45177201df5e58798eac Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Thu, 29 Dec 2022 22:02:15 -0400 Subject: [PATCH 12/16] improve handeling of layer densities - when a layer's composition isn't found in the (internal) dictionary of compounds, estimate its density using a weighted average of elemental densities. - this fixes the annoying behaviour of having an "undefined" density passed to the generated input file when the user forgets to update the density manually. --- TrimSPlib.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/TrimSPlib.js b/TrimSPlib.js index 1e52dd2..4b1679d 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -581,6 +581,27 @@ function rho_fun() "":"" } document.getElementById(rhoLi).value = rhos[chem]; + + // suggest a material density based on composition (when it's undefined) + if (!isFinite(document.getElementById(rhoLi).value)) { + let layer_formula = parse_formula(chem); + + // determine the stoichiometry sum (for normalization) + let stoichiometry_sum = 0; + for (key of Object.keys(layer_formula)) { + stoichiometry_sum = stoichiometry_sum + layer_formula[key]; + } + + // determine the density using on a weighted average of the elemental densities + let density_estimate = 0; + for (key of Object.keys(layer_formula)) { + if (layer_formula[key] != null) { + density_estimate = density_estimate + (layer_formula[key] / stoichiometry_sum) * rhos[key]; + } + } + + document.getElementById(rhoLi).value = density_estimate; + } } function openTab(event, tabName) { From 98e79d861fa8f5d051009a93653d3cf5a9730c60 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Sat, 31 Dec 2022 17:05:13 -0400 Subject: [PATCH 13/16] better formatting of *.rge output - increase both the width & decimals when formatting the bin centres - this fixes a "rounding" bug in the formatting of bin centres when small depth increments (e.g., <= 1 angstrom) were used. --- fortran/trimspNL.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fortran/trimspNL.F b/fortran/trimspNL.F index 475cce2..b06ec93 100644 --- a/fortran/trimspNL.F +++ b/fortran/trimspNL.F @@ -2737,7 +2737,7 @@ C size! Dmid=(D2-D1)/2+D1 WRITE(22,701) Dmid,IRP(I) 700 FORMAT(1X,F6.0,1H-,F6.0,I10,E12.4,I10,1P1E14.4,5E12.4,I8) - 701 FORMAT(1X,F6.0,2x,I10) + 701 FORMAT(1X, F16.4, 2X, I10) D1=D2 11 D2=D2+CW WRITE(21,604) D2-CW,IRP(MAXD1),RIRP(MAXD1) From 86992133f0c830a8abffa2c71a517ed60ea52ed8 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Sat, 31 Dec 2022 20:04:46 -0400 Subject: [PATCH 14/16] further refinement to the "other parameters" tab - expand/improve parameter descriptions - use ordered lists to display value options - allow text wrapping in table cells --- TrimSP.html | 120 +++++++++++++++++++++++++++++++++++++--------------- ZGUI.css | 2 +- 2 files changed, 87 insertions(+), 35 deletions(-) diff --git a/TrimSP.html b/TrimSP.html index b6af2c8..9ae3097 100644 --- a/TrimSP.html +++ b/TrimSP.html @@ -138,8 +138,13 @@
EF - Cutoff energy of projectiles (in eV);
+ Cutoff energy of projectiles (in eV); must be greater than zero. + Used for low projectile energies (< 1000 eV) and ESB = 0. + EF should be of the order of ~0.2 eV, + but not above SBE (for sputtering data). + With increasing projectile energy, + EF can be increased to save computing time.
@@ -148,8 +153,14 @@
KK0 - Maximum order of weak (simultaneous) collisions between projectiles and target atoms;
- must be between 0 and 4 (0 means no weak collisions included). + Maximum order of weak (simultaneous) collisions between projectile and target atoms: +
    +
  1. No weak collisions included.
  2. +
  3. ???
  4. +
  5. Sufficient for most calculations.
  6. +
  7. Only useful for very heavy particles; increases computing time.
  8. +
  9. Only useful for very heavy particles; increases computing time.
  10. +
@@ -161,6 +172,10 @@
ESB Surface binding energy for projectiles (in eV). + This value is zero for the noble gases, + but ESB should be larger than zero if the projectile is an active + chemically species. + ESB = SBE for self-sputtering calculations.
@@ -169,8 +184,14 @@
KK0R - Maximum order of weak (simultaneous) collisions between target atoms;
- must be between 0 and 4 (0 means no weak collisions included). + Maximum order of weak (simultaneous) collisions between target atoms: +
    +
  1. No weak collisions included.
  2. +
  3. ???
  4. +
  5. Sufficient for most calculations.
  6. +
  7. Only useful for very heavy particles; increases computing time.
  8. +
  9. Only useful for very heavy particles; increases computing time.
  10. +
@@ -181,7 +202,8 @@
SHEATH - Sheath potential (in eV); typically 3 * kT (i.e., 3 * |projectile energy|). + Sheath potential (in eV); + typically 3 * kT (i.e., 3 * |projectile energy|).
@@ -190,12 +212,23 @@
KDEE1 - Inelastic energy loss model for projectiles:
- 1 = nonlocal (Lindhard-Scharff);
- 2 = local (Oen-Robinson);
- 3 = equipartition of 1 & 2;
- 4 = nonlocal (Anderson-Ziegler tables for hydrogen);
- 5 = nonlocal (Ziegler tables for helium). + Inelastic energy loss model for projectiles: +
    +
  1. Nonlocal (Lindhard-Scharff).
  2. +
  3. Local (Oen-Robinson).
  4. +
  5. + Equipartition of local and nonlocal models (i.e., options 1 & 2). +
  6. +
  7. + Nonlocal (Anderson-Ziegler tables for hydrogen); + must be used for hydrogen-like projectile with energies > 10 keV. +
  8. +
  9. + Nonlocal (Ziegler tables for helium); + must be used for helium-like projectiles with energies > 50 keV. +
  10. +
+ Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
@@ -206,7 +239,7 @@
ERC - Recoil cutoff energy (in eV);
+ Recoil cutoff energy (in eV); usually equal to the surface binding energy.
@@ -216,10 +249,15 @@
KDEE2 - Inelastic energy loss for target atoms:
- 1 = nonlocal (Lindhard-Scharff);
- 2 = local (Oen-Robinson);
- 3 = equipartition of 1 and 2. + Inelastic energy loss for target atoms: +
    +
  1. Nonlocal (Lindhard-Scharff).
  2. +
  3. Local (Oen-Robinson).
  4. +
  5. + Equipartition of local and nonlocal models (i.e., options 1 & 2). +
  6. +
+ Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
@@ -230,10 +268,11 @@
RD - Depth (in Å) to which recoils are followed.
- RD = 50 is usually sufficient for sputtering
- (if the projectile energy is not too high).
- Use RD = 100 * CW (i.e., the depth increment) for following the full cascade. + Depth (in Å) to which recoils are followed. + RD = 50 is usually sufficient for sputtering + (if the projectile energy is not too high). + Use RD = 100 * CW (i.e., the depth increment) + for following the full collision cascade.
@@ -242,10 +281,14 @@
IPOT - Interaction potential between projectiles and target atoms:
- 1 = krypton-carbon (Kr-C) potential;
- 2 = Molière potential;
- 3 = Ziegler-Biersack-Littmark (ZBL) potential.
+ Interaction potential between projectile and target atoms: +
    +
  1. Krypton-Carbon (Kr-C) potential.
  2. +
  3. Molière potential.
  4. +
  5. Ziegler-Biersack-Littmark (ZBL) potential.
  6. +
+ + @@ -254,8 +297,9 @@
CA - Correction factor to the Firsov screening length for collisions between projectile and target atoms
- (only for application of the Molière potential);
+ Correction factor to the Firsov screening length for + collisions between projectile and target atoms + (only used in the application of the Molière potential); usually on the order of ~1.0.
@@ -265,10 +309,12 @@
IPOTR - Interaction potential between target atoms:
- 1 = krypton-carbon (Kr-C) potential;
- 2 = Molière potential;
- 3 = Ziegler-Biersack-Littmark (ZBL) potential. + Interaction potential between target atoms: +
    +
  1. Krypton-Carbon (Kr-C) potential.
  2. +
  3. Molière potential.
  4. +
  5. Ziegler-Biersack-Littmark (ZBL) potential.
  6. +
@@ -281,12 +327,18 @@
IRL - 0 = no recoils are generated (i.e., no sputtering effects);
- used to speed up the calculation if only projectile ranges are of interest. + Collision recoils: +
    +
  1. + No recoils are generated (i.e., no sputtering effects); + used to speed up the calculation if only projectile ranges are of interest. +
  2. +
  3. Calculate collision recoils.
  4. +
- + diff --git a/ZGUI.css b/ZGUI.css index 36482d3..806521d 100644 --- a/ZGUI.css +++ b/ZGUI.css @@ -3,7 +3,7 @@ } td { - white-space: nowrap; + white-space: wrap; } .guitable { From 183e2ac3604386ef07d1a106fbef68161154d014 Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Sun, 1 Jan 2023 11:56:32 -0400 Subject: [PATCH 15/16] add literature links to the readme --- Readme.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/Readme.md b/Readme.md index 670063b..d86185b 100644 --- a/Readme.md +++ b/Readme.md @@ -12,6 +12,26 @@ an application for performing [Monte Carlo] simulations of ion implantation. * The binary (statically linked) from the [Fortran] code is also included. * [RPM] and [DEB] packages are also included. +Further information can be found in the following publications: + +- J. P. Biersack and W. Eckstein, + Sputtering studies with the Monte Carlo program TRIM.SP, + Appl. Phys. A 34 (2), 73-94 (1984). + +- W. Eckstein, + Computer Simulation of Ion-Solid Interactions, + Springer Series in Materials Science Vol. 10 + (Springer-Verlag, Berlin, Heidelberg, 1991). + +- W. Eckstein, + Backscattering and sputtering with the Monte-Carlo program TRIM.SP, + Radiat. Eff. Defects Solids 130-131 (1), 239-250 (1994). + +- E. Morenzoni et al., + Implantation studies of keV positive muons in thin metallic layers, + Nucl. Instrum. Methods Phys. Res., Sect. B 192 (3), 245-266 (2002). + + ### Supported platforms ### * [Linux] From 9916d70d84bc3e36a669cddce31fc9d6b759068c Mon Sep 17 00:00:00 2001 From: "Ryan M. L. McFadden" Date: Tue, 3 Jan 2023 12:35:26 -0400 Subject: [PATCH 16/16] use updated stopping coefficients for hydrogen-like projectiles - The stopping coefficients from ICRU Report 49 (published in 1993) are now fairly old, with many originating from the even older compilation by Anderson & Ziegler (published in 1977). For some target elements, little experimental data was available at the time of publication and the tabulated values are not necessarily reliable. - This patch provides revised values for stopping coefficients in select elemental targets derived from Varelas-Biersack fits to stopping data compiled in the IAEA's database (https://www-nds.iaea.org/stopping/). For further details on their determination, see e.g.: https://doi.org/10.48550/arXiv.2212.11081 - When creating input files for trimspNL using the GUI, the default behaviour is changed to prefer using the revised coefficients. In instances where updated values are unavailable (e.g., due to lack of experimental data), fall back to using the coefficients from ICRU Report 49. --- TrimSPlib.js | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/TrimSPlib.js b/TrimSPlib.js index 4b1679d..d98d44a 100644 --- a/TrimSPlib.js +++ b/TrimSPlib.js @@ -448,7 +448,75 @@ function StoppingCoefficients(Element) "U":"7.29000,8.20400,19180.00000,586.29999,0.00267", "":"0.00000,0.00000,0.00000,0.00000,0.00000" }; - return StoppingCoefficientsICRU[Element]; + + // Updated Anderson-Ziegler table values for hydrogen projectiles using + // up-to-date stopping data from the IAEA database (https://www-nds.iaea.org/stopping/). + // For further details on their determination, see e.g.: + // R. M. L. McFadden at al., arXiv:2212.11081 [cond-mat.supr-con] + // https://doi.org/10.48550/arXiv.2212.11081 + var StoppingCoefficientsIAEA = { + "H": "1.21941306,1.39705253,316.72610292,3622.08960714,0.03609996", + "Li": "2.55867734,2.98398784,672.22623329,223.63937274,0.05756479", + "Be": "2.13846776,2.43024550,1353.80005691,500.78353377,0.01143076", + "B": "2.92598306,3.33271910,1523.83401267,574.31712932,0.01671298", + "C": "2.51057212,2.84874359,1325.63086028,2111.57332043,0.03815981", + "N": "3.03231463,3.44621744,1287.27189959,3445.25706665,0.06909550", + "O": "2.58218404,2.91913321,2066.69556610,1937.28839450,0.01708201", + "Mg": "4.32219620,4.95332934,2711.05757349,99.32422512,0.01692829", + "Al": "4.16266645,4.73942640,3007.21967155,192.15430476,0.01478852", + "Si": "4.56277193,5.17964542,3812.93366288,249.45105835,0.00951865", + "Cl": "5.18954121,5.87010049,5726.20198003,338.90592713,0.00527894", + "Ca": "7.38419020,8.41800474,4257.94547049,311.84732092,0.01482602", + "Sc": "6.27366940,7.11486087,5202.32117316,349.64931132,0.00808596", + "Ti": "4.89215322,5.52996090,4733.05002706,821.54929980,0.01141794", + "V": "4.39418898,4.95984106,5216.28902299,873.00768319,0.00982301", + "Cr": "4.22355616,4.76724205,4805.40719904,1062.25237873,0.01508696", + "Mn": "3.45870888,3.89580224,5452.18588822,1778.16054656,0.01057380", + "Fe": "3.69846643,4.16916938,5392.90710239,1040.38447053,0.01152298", + "Co": "3.55890909,4.00775461,6796.04145497,933.86447935,0.00558368", + "Ni": "3.42262695,3.86234880,4759.65515188,520.18934465,0.02026669", + "Cu": "3.54912421,4.02142201,4344.22605325,128.32905834,0.02886218", + "Zn": "4.31895518,4.91763977,5346.03925560,46.16548699,0.01518164", + "Ga": "4.11015447,4.63998531,7681.41419449,149.38563152,0.00628772", + "Ge": "5.80984815,6.60667983,6039.04808738,87.19744473,0.01158192", + "Se": "5.58734301,6.31119973,8423.01872583,221.61559131,0.00530434", + "Br": "6.28480648,7.09489448,11732.76411988,150.96205589,0.00281298", + "Kr": "6.47378266,7.31581518,9199.06183849,216.98680923,0.00437111", + "Rb": "8.48759187,9.62951209,7271.11124671,272.67996745,0.00818815", + "Sr": "8.66447838,9.84912713,5979.31960977,334.15705556,0.01184544", + "Y": "7.54854264,8.54789357,6885.34110669,429.53252110,0.00930644", + "Zr": "6.24168401,7.04236496,10674.06252597,269.66181445,0.00339805", + "Nb": "5.96194954,6.72632300,10250.57513827,275.25886405,0.00386599", + "Mo": "5.58867862,6.29983727,9573.16605660,523.57577519,0.00473082", + "Pd": "4.74762031,5.34871025,8086.17802763,942.05721488,0.00842671", + "Ag": "5.42052240,6.17824432,4642.18214950,90.75350922,0.06061521", + "Cd": "4.89128643,5.50754704,11831.77188508,396.06905848,0.00412049", + "In": "5.98978289,6.77050040,6343.54720062,564.65410792,0.02270520", + "Sn": "6.73191335,7.61854414,6946.18830598,347.19391310,0.01677246", + "Sb": "7.92400389,8.99628409,5736.29881090,403.11722206,0.02973016", + "Xe": "8.96826400,10.16224223,8543.27304860,283.90067433,0.01019984", + "La": "8.16949326,9.21144395,13933.96869212,429.99442382,0.00347440", + "Nd": "8.60801371,10.26060598,6798.65217629,7.06731816,0.02713704", + "Gd": "8.38379061,9.50012183,10804.38767518,110.71066098,0.00761735", + "Tb": "8.69907359,10.36476708,5985.09307671,7.76175759,0.04237031", + "Dy": "6.69350026,7.81543484,5289.65107666,12.11560717,0.05746489", + "Er": "4.31497049,4.85346547,12995.54504003,691.00380321,0.00499022", + "Yb": "6.38304258,7.21491284,12327.74719685,82.30064162,0.00516845", + "Lu": "7.00205766,8.09268611,4589.67801229,31.06321362,0.11142124", + "Hf": "5.32763157,6.00140558,13853.49562768,206.93150053,0.00411522", + "Ta": "5.15280708,5.80545310,12417.25115167,231.48549646,0.00530723", + "W": "4.81261962,5.41579909,15245.84079976,286.09077182,0.00344862", + "Re": "4.26021967,4.80273372,3191.05524918,76051.48730893,0.00003161", + "Ir": "4.16543126,4.68849191,6887.94139926,4263.90641919,0.00000004", + "Pt": "4.62228847,5.20033612,16308.49878855,266.02263275,0.00309560", + "Au": "4.84253074,5.44769072,15602.21662947,412.25485588,0.00331383", + "Pb": "9.42473604,17.46235676,11946.86905435,0.00000001,0.00652912", + "Bi": "10.25823796,12.26670424,7765.05387481,7.37274504,0.02310050" + }; + + // prefer using stopping coefficients derived from data in the IAEA database; + // however, if they are unavailable, return those from ICRU Report 49 + return (Element in StoppingCoefficientsIAEA) ? StoppingCoefficientsIAEA[Element] : StoppingCoefficientsICRU[Element]; }