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
diff --git a/Readme.md b/Readme.md
index 48e8f03..d86185b 100644
--- a/Readme.md
+++ b/Readme.md
@@ -2,40 +2,83 @@
### 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.
+
+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
+* [Linux]
* Online at: http://musruser.psi.ch/cgi-bin/TrimSP.cgi
### 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
diff --git a/TrimSP.html b/TrimSP.html
index 55bc118..75af87f 100644
--- a/TrimSP.html
+++ b/TrimSP.html
@@ -24,7 +24,7 @@
-
+
@@ -51,7 +51,7 @@
-
Layer #
Composition
Density [g/cm3]
Thickness [A]
+
Layer #
Composition
Density [g/cm3]
Thickness [Å]
@@ -61,22 +61,23 @@
Projectile parameters
Projectile
Number of projectiles
-
Starting depth [A]
-
Depth increment [A]
+
Starting depth [Å]
+
Depth increment [Å]
Energy [eV]
Energy sigma [eV]
-
Angel [deg]
+
Angle [deg]
Angle sigma [deg]
Random seed
@@ -89,22 +90,22 @@
Enable scan on
- Set of Values:
- corresponding depth increment
+ Set of values:
+ Corresponding depth increment:
Scan parameter
@@ -134,61 +135,188 @@
-
EF
+
+
+ EF
+ 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.
+
+
-
KK0
+
+
+ KK0
+ Maximum order of weak (simultaneous) collisions between projectile and target atoms:
+
+
No weak collisions included.
+
???
+
Sufficient for most calculations.
+
Only useful for very heavy particles; increases computing time.
+
Only useful for very heavy particles; increases computing time.
+
+
+
-
ESB
+
+
+ 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.
+
+
-
KK0R
+
+
+ KK0R
+ Maximum order of weak (simultaneous) collisions between target atoms:
+
+
No weak collisions included.
+
???
+
Sufficient for most calculations.
+
Only useful for very heavy particles; increases computing time.
+
Only useful for very heavy particles; increases computing time.
+
+
+
-
SHEATH
+
+
+ SHEATH
+ Sheath potential (in eV);
+ typically 3 * kT (i.e., 3 * |projectile energy|).
+
+
-
KDEE1
+
+
+ KDEE1
+ Inelastic energy loss model for projectiles:
+
+
Nonlocal (Lindhard-Scharff).
+
Local (Oen-Robinson).
+
+ Equipartition of local and nonlocal models (i.e., options 1 & 2).
+
+
+ Nonlocal (Anderson-Ziegler tables for hydrogen);
+ must be used for hydrogen-like projectile with energies > 10 keV.
+
+
+ Nonlocal (Ziegler tables for helium);
+ must be used for helium-like projectiles with energies > 50 keV.
+
+
+ Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
+
+
-
ERC
+
+
+ ERC
+ Recoil cutoff energy (in eV);
+ usually equal to the surface binding energy.
+
+
-
KDEE2
+
+
+ KDEE2
+ Inelastic energy loss for target atoms:
+
+
Nonlocal (Lindhard-Scharff).
+
Local (Oen-Robinson).
+
+ Equipartition of local and nonlocal models (i.e., options 1 & 2).
+
+
+ Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
+
+
-
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 collision cascade.
+
+
-
IPOT
+
+
+ IPOT
+ Interaction potential between projectile and target atoms:
+
+
Krypton-Carbon (Kr-C) potential.
+
Molière potential.
+
Ziegler-Biersack-Littmark (ZBL) potential.
+
+
+
-
CA
+
+
+ CA
+ 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.
+
+