393 lines
15 KiB
HTML
393 lines
15 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
|
|
<link rel="stylesheet" href="ZGUI.css">
|
|
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
|
|
<script src="TrimSPelec.js"></script>
|
|
<!script src="TrimSPWeb.js"></script>
|
|
<script src="TrimSPlib.js"></script>
|
|
<script src="myplots.js"></script>
|
|
<!script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
|
|
<title>Trim.SP</title>
|
|
</head>
|
|
<body onresize="resizePl()" onload="adjust_table();adjust_scans();">
|
|
<table style="width: 100%;">
|
|
<tr><td>
|
|
<div class="col-full">
|
|
<div class="tab">
|
|
<button class="tablinks" onclick="openTab(event,'Layers')" id="btnLayers">Layers</button>
|
|
<button class="tablinks" onclick="openTab(event,'Scans')" id="btnScans">Scans</button>
|
|
<button class="tablinks" onclick="openTab(event,'Plots')" id="btnPlots">Plots</button>
|
|
<button class="tablinks" onclick="openTab(event,'Other')" id="btnOther">Other Parameters</button>
|
|
</div>
|
|
<div id="Layers" class="tabcontent">
|
|
<table style="width: 100%;">
|
|
<tr>
|
|
<td style="vertical-align: top;">
|
|
<table cellpadding="5">
|
|
<tr id="FileRow">
|
|
<td><label>File name prefix:</label></td>
|
|
<td>
|
|
<input name="fileNamePrefix" id="fileNamePrefix" type="text" style="width:70%" value="SrTiO3"/>
|
|
<input name="trimPath" id="trimPath" type="text" style="width:70%;visibility:hidden;"/>
|
|
</td>
|
|
</tr>
|
|
<tr id="FolderRow">
|
|
<td><label>Save folder:</label></td>
|
|
<td>
|
|
<input type="text" style="width:70%" id="workPath" name="workPath" readonly/>
|
|
<input type="button" value="Browse"
|
|
id="browseFolde" onclick="ipcRenderer.send('browseFolder');">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td><label>Number of Layers:</label></td>
|
|
<td><input name="numLayer" id="numLayer" type="number" size="3" step="1" min="1" max="100" value="1" onchange="adjust_table()"></td>
|
|
</tr>
|
|
<tr><td colspan="2">
|
|
<table id="LTable" border="2" cellpadding="10">
|
|
<tr><td><b>Layer #</b></td><td><b>Composition</b></td><td><b>Density [g/cm<sup>3</sup>]</b></td><td><b>Thickness [Å]</b></td></tr>
|
|
</table>
|
|
</td></tr>
|
|
</table>
|
|
</td>
|
|
<td style="vertical-align: top;">
|
|
<table cellpadding="5">
|
|
<tr><td collspan="2"><b>Projectile parameters</b></td></tr>
|
|
<tr><td>Projectile</td>
|
|
<td><select name="ProjType" id="ProjType" onchange="ProjSmartDefaults()" onload="ProjSmartDefaults()">
|
|
<option selected="selected" value="muon">muon</option>
|
|
<option value="Li-8">Li-8</option>
|
|
<option value="B-12">B-12</option>
|
|
<option value="Mg-31">Mg-31</option>
|
|
<option value="H">H</option>
|
|
<option value="He">He</option>
|
|
<option value="Ar">Ar</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr><td>Number of projectiles</td>
|
|
<td><input name="numberProj" id="numberProj" type="text" size="7" value="1000" onchange="//ProjNumberLimit()"></td>
|
|
</tr>
|
|
<tr><td>Starting depth [Å]</td><td><input name="z0" id="z0" type="text" size="7" value="0"></td></tr>
|
|
<tr><td>Depth increment [Å]</td><td><input name="dz" id="dz" type="text" size="7" value="20"></td></tr>
|
|
<tr><td>Energy [eV]</td><td><input name="valEnergy" id="valEnergy" type="text" size="7" value="2000"></td></tr>
|
|
<tr><td>Energy sigma [eV]</td><td><input name="sigEnergy" id="sigEnergy" type="text" size="7" value="450"></td></tr>
|
|
<tr><td>Angle [deg]</td><td><input name="valAngle" id="valAngle" type="text" size="7" value="0"></td></tr>
|
|
<tr><td>Angle sigma [deg]</td><td><input name="sigAngle" id="sigAngle" type="text" size="7" value="15"></td></tr>
|
|
<tr><td>Random seed</td><td><input name="ranSeed" id="ranSeed" type="text" size="7" value="78741"></td></tr>
|
|
<tr><td><button onclick="startSim();">Start</button></td><td></td></tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="Scans" class="tabcontent">
|
|
<input type="checkbox" name="scanSeq" id="scanSeq" onChange="adjust_scans();"> Enable scan on
|
|
<select name="scanType" id="scanType" onchange="adjust_scans();">
|
|
<option value="scanLoop">Loop</option>
|
|
<option value="scanVals">Set of values</option>
|
|
</select>
|
|
<div id="ScansLine" style="visibility: hidden;">
|
|
<br>Set of values: <input name="scanList" id="scanList" type="text" value="1000">
|
|
Corresponding depth increment: <input name="scanListdz" id="scanListdz" type="text" value="">
|
|
</div>
|
|
<table id="ScansTable" style="width: 100%;visibility: hidden;">
|
|
<tr>
|
|
<td colspan="3">Scan parameter
|
|
<select name="comboScan" id="comboScan" onchange="">
|
|
<option value="EScan">Energy [eV]</option>
|
|
<option value="SigEScan">Energy sigma [eV]</option>
|
|
<option value="AngleScan">Angle [deg]</option>
|
|
<option value="SigAngleScan">Angle sigma [deg]</option>
|
|
<option value="NProjScan">Number of projectiles</option>
|
|
<option value="dScan">Thickness of layer # 1</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<!input type="radio" name="ScanType" value="Loop" checked onChange="">
|
|
<!input type="radio" name="ScanType" value="ScanList" onChange="">
|
|
From: <input name="scanFrom" id="scanFrom" type="text" value="1000">
|
|
</td>
|
|
<td>
|
|
Step: <input name="scanStep" id="scanStep" type="text" value="2000">
|
|
</td>
|
|
<td>
|
|
To: <input name="scanTo" id="scanTo" type="text" value="14000">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="Plots" class="tabcontent">
|
|
<table style="width: 100%;">
|
|
<tr>
|
|
<td align="center"><div id="plotRge"><!-- Plotly chart will be drawn inside this DIV --></div></td>
|
|
<td align="center"><div id="plotFrac"><!-- Plotly chart will be drawn inside this DIV --></div></td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="Other" class="tabcontent">
|
|
<table cellpadding="5">
|
|
<tr>
|
|
<td class="tooltip">
|
|
EF
|
|
<span class="tooltiptext">
|
|
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.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parEF" id="parEF" type="number" size="7" step="0.1" value="0.5">
|
|
</td>
|
|
<td class="tooltip">
|
|
KK0
|
|
<span class="tooltiptext">
|
|
Maximum order of weak (simultaneous) collisions between projectile and target atoms:
|
|
<ol>
|
|
<li value="0">No weak collisions included.</li>
|
|
<li value="1">???</li>
|
|
<li value="2">Sufficient for most calculations.</li>
|
|
<li value="3">Only useful for very heavy particles; increases computing time.</li>
|
|
<li value="4">Only useful for very heavy particles; increases computing time.</li>
|
|
</ol>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parKK0" id="parKK0" type="number" step="1" min="0" max="4" value="2">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
ESB
|
|
<span class="tooltiptext">
|
|
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.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parESB" id="parESB" type="number" size="7" step="0.1" value="0.0">
|
|
</td>
|
|
<td class="tooltip">
|
|
KK0R
|
|
<span class="tooltiptext">
|
|
Maximum order of weak (simultaneous) collisions between target atoms:
|
|
<ol>
|
|
<li value="0">No weak collisions included.</li>
|
|
<li value="1">???</li>
|
|
<li value="2">Sufficient for most calculations.</li>
|
|
<li value="3">Only useful for very heavy particles; increases computing time.</li>
|
|
<li value="4">Only useful for very heavy particles; increases computing time.</li>
|
|
</ol>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parKK0R" id="parKK0R" type="number" step="1" min="0" max="4" value="2">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
SHEATH
|
|
<span class="tooltiptext">
|
|
Sheath potential (in eV);
|
|
typically 3 * kT (i.e., 3 * |projectile energy|).
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parSHEATH" id="parSHEATH" type="number" size="7" step="0.1" value="0.0">
|
|
</td>
|
|
<td class="tooltip">
|
|
KDEE1
|
|
<span class="tooltiptext">
|
|
Inelastic energy loss model for projectiles:
|
|
<ol>
|
|
<li value="1">Nonlocal (Lindhard-Scharff).</li>
|
|
<li value="2">Local (Oen-Robinson).</li>
|
|
<li value="3">Equipartition of local and nonlocal models (i.e., options 1 & 2).</li>
|
|
<li value="4">Nonlocal (Anderson-Ziegler tables for hydrogen); must be used for hydrogen-like projectile with energies > 10 keV.</li>
|
|
<li value="5">Nonlocal (Ziegler tables for helium); must be used for helium-like projectiles with energies > 50 keV.</li>
|
|
</ol>
|
|
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parKDEE1" id="parKDEE1" type="number" step="1" min="1" max="5" value="4">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
ERC
|
|
<span class="tooltiptext">
|
|
Recoil cutoff energy (in eV);
|
|
usually equal to the surface binding energy.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parERC" id="parERC" type="number" size="7" step="0.1" value="0.0">
|
|
</td>
|
|
<td class="tooltip">
|
|
KDEE2
|
|
<span class="tooltiptext">
|
|
Inelastic energy loss for target atoms:
|
|
<ol>
|
|
<li value="1">Nonlocal (Lindhard-Scharff).</li>
|
|
<li value="2">Local (Oen-Robinson).</li>
|
|
<li value="3">Equipartition of local and nonlocal models (i.e., options 1 & 2).
|
|
</li>
|
|
</ol>
|
|
Note: options 1, 2, and 3 can only be used at energies below the stopping power maximum.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parKDEE2" id="parKDEE2" type="number" step="1" min="1" max="3" value="3">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
RD
|
|
<span class="tooltiptext">
|
|
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.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parRD" id="parRD" type="number" size="7" step="0.1" value="50.0">
|
|
</td>
|
|
<td class="tooltip">
|
|
IPOT
|
|
<span class="tooltiptext">
|
|
Interaction potential between projectile and target atoms:
|
|
<ol>
|
|
<li value="1">Krypton-Carbon (Kr-C) potential.</li>
|
|
<li value="2">Molière potential.</li>
|
|
<li value="3">Ziegler-Biersack-Littmark (ZBL) potential.</li>
|
|
</ol>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parIPOT" id="parIPOT" type="number" step="1" min="1" max="3" value="2">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
CA
|
|
<span class="tooltiptext">
|
|
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.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parCA" id="parCA" type="number" size="7" step="0.1" value="1.0">
|
|
</td>
|
|
<td class="tooltip">
|
|
IPOTR
|
|
<span class="tooltiptext">
|
|
Interaction potential between target atoms:
|
|
<ol>
|
|
<li value="1">Krypton-Carbon (Kr-C) potential.</li>
|
|
<li value="2">Molière potential.</li>
|
|
<li value="3">Ziegler-Biersack-Littmark (ZBL) potential.</li>
|
|
</ol>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parIPOTR" id="parIPOTR" type="number" step="1" min="0" max="3" value="1">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="tooltip">
|
|
<input type="checkbox" id="flagICRU" checked>
|
|
<span class="tooltiptext">
|
|
Force the TRIM.SP code to use stopping power
|
|
parameters from the old ICRU tables.
|
|
</span>
|
|
</td>
|
|
<td>
|
|
Use ICRU parameters
|
|
</td>
|
|
<td class="tooltip">
|
|
IRL
|
|
<span class="tooltiptext">
|
|
Collision recoils:
|
|
<ol>
|
|
<li value="0">
|
|
No recoils are generated (i.e., no sputtering effects);
|
|
used to speed up the calculation if only projectile ranges are of interest.
|
|
</li>
|
|
<li value="1">Calculate collision recoils.</li>
|
|
</ol>
|
|
</span>
|
|
</td>
|
|
<td>
|
|
<input name="parIRL" id="parIRL" type="number" step="1" min="0" max="1" value="0">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<p>
|
|
For further details see:
|
|
</p>
|
|
<p>
|
|
W. Eckstein, <i>Computer Simulation of Ion-Solid Interactions</i>,<br>
|
|
Springer Series in Materials Science, Vol. 10 (Springer-Verlag, Berlin, 1991).<br>
|
|
<a href="https://doi.org/10.1007/978-3-642-73513-4">
|
|
https://doi.org/10.1007/978-3-642-73513-4
|
|
</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</td></tr>
|
|
<tr style="width: 100%;//visibility: hidden;">
|
|
<td>
|
|
<div class="w3-light-grey">
|
|
<div id="pBar" class="w3-container w3-green w3-center" style="width:0%">0%</div>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
<script>
|
|
|
|
let workPath = document.getElementById("workPath");
|
|
// If empty or undefined use local folder as default
|
|
if (workPath.value == '' || workPath.value == undefined ) {
|
|
// workPath.value = process.cwd();
|
|
workPath.value = '/tmp';
|
|
//app.setPath('temp',process.cwd());
|
|
}
|
|
// Open the default Layers tab
|
|
document.getElementById("btnLayers").click();
|
|
|
|
let webOrApp = amIWeb();
|
|
|
|
if (webOrApp) {
|
|
console.log('this script is not running in Node.js');
|
|
// Run as a web app
|
|
//let row = document.getElementById("FileRow");
|
|
//row.parentNode.removeChild(row);
|
|
//row = document.getElementById("FolderRow");
|
|
//row.parentNode.removeChild(row);
|
|
document.getElementById("FileRow").style.visibility = "hidden";;
|
|
document.getElementById("FolderRow").style.visibility = "hidden";;
|
|
} else {
|
|
console.log('this script is running in Node.js');
|
|
// Run as standalone app
|
|
// Set up after first load (electron specific menu calls)
|
|
firstLoad();
|
|
}
|
|
</script>
|
|
</html>
|