Skip to main content

This library to treat output file from Stopping power calculation program of SRIM (http://www.srim.org/)

About this program

SRIM is one of the most famous program to simulate the atomic collision to various materials. This package supports the data format transfomation the output from SR.exe or SRModule in SRIM2013 to other modern formats, especially for JSON.

Install

pip install srim_srout

parser library and supporting script (cf. srim-srout-parse.py) are installed.

C:\Users\aoki\work\srim_srout>srim-srout-parse -h
usage: srim-srout-parse-script.py [-h] [--verbose] [input] [output]

positional arguments:
  input          input file to parse default is sys.stdin
  output         JSON output stream default is sys.stdout

optional arguments:
  -h, --help     show this help message and exit
  --verbose, -v  dump including raw input string data

RUN

In order to translate the file from SR.exe (i.e. input.txt) to JSON format (output.json):

srim-srout-parse input.txt output.json

where, input.txt and output.json are following;

input.txt:

 ==================================================================
              SRIM version ---> SRIM-2013.00
              Calc. date   ---> February 22, 2016
 ==================================================================

 Disk File Name = SRIM Outputs\Hydrogen in 1_3 Propanediol.txt

 Ion = Hydrogen [1] , Mass = 1.008 amu

 Target Density =  1.0597E+00 g/cm3 = 1.0903E+23 atoms/cm3
 ======= Target  Composition ========
    Atom   Atom   Atomic    Mass
    Name   Numb   Percent   Percent
    ----   ----   -------   -------
      H      1    061.54    010.60
      C      6    023.08    047.36
      O      8    015.38    042.04
 ====================================
 Bragg Correction = -5.43%
 Stopping Units =  MeV / (mg/cm2)
 See bottom of Table for other Stopping units

        Ion        dE/dx      dE/dx     Projected  Longitudinal   Lateral
       Energy      Elec.      Nuclear     Range     Straggling   Straggling
  --------------  ---------- ---------- ----------  ----------  ----------
  10.00 keV   4.945E-01  8.762E-03    2247 A       544 A       576 A
  11.00 keV   5.163E-01  8.188E-03    2416 A       559 A       599 A
  12.00 keV   5.369E-01  7.692E-03    2579 A       573 A       620 A
     :
  (skip)
     :
   8.00 MeV   5.620E-02  3.285E-05  754.39 um    33.18 um    20.29 um
   9.00 MeV   5.110E-02  2.954E-05  930.22 um    41.82 um    24.82 um
  10.00 MeV   4.691E-02  2.686E-05    1.12 mm    50.28 um    29.77 um
-----------------------------------------------------------
 Multiply Stopping by        for Stopping Units
 -------------------        ------------------
  1.0597E+01                 eV / Angstrom
  1.0597E+02                keV / micron
  1.0597E+02                MeV / mm
  1.0000E+00                keV / (ug/cm2)
  1.0000E+00                MeV / (mg/cm2)
  1.0000E+03                keV / (mg/cm2)
  9.7192E+00                 eV / (1E15 atoms/cm2)
  4.3191E+00                L.S.S. reduced units
 ==================================================================
 (a) 1984,1989,1992,1998,2008 by J.P. Biersack and J.F. Ziegler

output.json:

{
  "filetype": "sr.exe"
  "projectile_amu": 1.008,
  "projectile_z": 1,
  "projectile_name": "Hydrogen",
  "density_mass": 1.0597,
  "density_atom": 1.0903e+23,
  "bragg_corr": -5.43,
  "stopping_units": "MeV/(mg/cm2)",
  "target_composition": [
    [
      "H",
      1.0,
      61.54,
      10.6
    ],
    [
      "C",
      6.0,
      23.08,
      47.36
    ],
    [
      "O",
      8.0,
      15.38,
      42.04
    ]
  ],
  "tbl_data": [
    [
      10.0,
      0.4945,
      0.008762,
      2247.0,
      544.0,
      576.0
    ],
    [
      11.0,
      0.5163,
      0.008188,
      2416.0,
      559.0,
      599.0
    ],
    # (skip)
    [
      12.0,
      0.5369,
      0.007692,
      2579.0,
      573.0,
      620.0
    ],
    [
      13.0,
      0.5563,
      0.00726,
      2737.0,
      585.0,
      640.0
    ],
    [
      14.0,
      0.5746,
      0.006878,
      2891.0,
      596.0,
      659.0
    ],
    [
      15.0,
      0.592,
      0.006539,
      3041.0,
      607.0,
      676.0
    ],
    [
      16.0,
      0.6085,
      0.006235,
      3188.0,
      616.0,
      692.0
    ],
    [
      17.0,
      0.6241,
      0.005961,
      3331.0,
      625.0,
      707.0
    ],
    [
      18.0,
      0.639,
      0.005712,
      3472.0,
      633.0,
      722.0
    ],
    [
      20.0,
      0.6666,
      0.005279,
      3745.0,
      649.0,
      749.0
    ],
    [
      22.5,
      0.6976,
      0.004829,
      4074.0,
      666.0,
      779.0
    ],
    [
      25.0,
      0.7251,
      0.004456,
      4391.0,
      681.0,
      806.0
    ],
    [
      27.5,
      0.7495,
      0.004142,
      4698.0,
      694.0,
      831.0
    ],
    [
      30.0,
      0.7713,
      0.003873,
      4997.0,
      706.0,
      854.0
    ],
    [
      32.5,
      0.7907,
      0.00364,
      5289.0,
      717.0,
      875.0
    ],
    [
      35.0,
      0.808,
      0.003436,
      5575.0,
      728.0,
      895.0
    ],
    [
      37.5,
      0.8233,
      0.003255,
      5856.0,
      737.0,
      913.0
    ],
    [
      40.0,
      0.8369,
      0.003094,
      6133.0,
      746.0,
      931.0
    ],
    [
      45.0,
      0.8595,
      0.002819,
      6676.0,
      764.0,
      964.0
    ],
    [
      50.0,
      0.8766,
      0.002593,
      7208.0,
      780.0,
      994.0
    ],
    [
      55.0,
      0.8892,
      0.002403,
      7732.0,
      795.0,
      1022.0
    ],
    [
      60.0,
      0.8979,
      0.002241,
      8251.0,
      809.0,
      1048.0
    ],
    [
      65.0,
      0.9031,
      0.002101,
      8766.0,
      822.0,
      1073.0
    ],
    [
      70.0,
      0.9054,
      0.001979,
      9280.0,
      834.0,
      1097.0
    ],
    [
      80.0,
      0.903,
      0.001775,
      10300.0,
      863.0,
      1142.0
    ],
    [
      90.0,
      0.8934,
      0.001613,
      11299.999999999998,
      891.0,
      1185.0
    ],
    [
      100.0,
      0.8787,
      0.001479,
      12400.0,
      918.0,
      1227.0
    ],
    [
      110.0,
      0.8608,
      0.001368,
      13500.0,
      945.0,
      1267.0
    ],
    [
      120.0,
      0.8407,
      0.001273,
      14600.0,
      971.0,
      1308.0
    ],
    [
      130.0,
      0.8196,
      0.001191,
      15700.0,
      998.0,
      1348.0
    ],
    [
      140.0,
      0.7981,
      0.00112,
      16900.0,
      1025.0,
      1388.0
    ],
    [
      150.0,
      0.7766,
      0.001057,
      18100.0,
      1052.0,
      1428.0
    ],
    [
      160.0,
      0.7554,
      0.001002,
      19300.0,
      1079.0,
      1469.0
    ],
    [
      170.0,
      0.7349,
      0.0009524,
      20500.0,
      1108.0,
      1511.0
    ],
    [
      180.0,
      0.715,
      0.0009079,
      21800.0,
      1136.0,
      1553.0
    ],
    [
      200.0,
      0.6777,
      0.000831,
      24500.0,
      1225.0,
      1641.0
    ],
    [
      225.0,
      0.6357,
      0.0007524,
      28100.0,
      1359.0,
      1755.0
    ],
    [
      250.0,
      0.5985,
      0.0006883,
      31900.0,
      1495.0,
      1876.0
    ],
    [
      275.0,
      0.5657,
      0.0006348,
      35900.0,
      1634.0,
      2003.0
    ],
    [
      300.0,
      0.5367,
      0.0005896,
      40199.99999999999,
      1777.0,
      2138.0
    ],
    [
      325.0,
      0.5109,
      0.0005507,
      44700.0,
      1922.0,
      2279.0
    ],
    [
      350.0,
      0.4878,
      0.0005169,
      49400.00000000001,
      2071.0,
      2428.0
    ],
    [
      375.0,
      0.4671,
      0.0004873,
      54300.0,
      2223.0,
      2583.0
    ],
    [
      400.0,
      0.4484,
      0.0004611,
      59400.00000000001,
      2378.0,
      2746.0
    ],
    [
      450.0,
      0.416,
      0.0004167,
      70300.0,
      2906.0,
      3091.0
    ],
    [
      500.0,
      0.3888,
      0.0003806,
      82000.0,
      3418.0,
      3462.0
    ],
    [
      550.0,
      0.3656,
      0.0003505,
      94500.0,
      3922.0,
      3857.0
    ],
    [
      600.0,
      0.3457,
      0.0003251,
      107700.0,
      4424.0,
      4276.0
    ],
    [
      650.0,
      0.3284,
      0.0003034,
      121700.0,
      4926.0,
      4717.0
    ],
    [
      700.0,
      0.3132,
      0.0002845,
      136400.0,
      5429.0,
      5179.0
    ],
    [
      800.0,
      0.2878,
      0.0002533,
      167700.0,
      7160.0,
      6163.0
    ],
    [
      900.0,
      0.2676,
      0.0002286,
      201600.0,
      8771.0,
      7219.0
    ],
    [
      1000.0,
      0.2513,
      0.0002085,
      237900.0,
      10300.0,
      8340.0
    ],
    [
      1100.0,
      0.2416,
      0.0001918,
      276100.0,
      11800.0,
      9509.0
    ],
    [
      1200.0,
      0.2323,
      0.0001777,
      315800.0,
      13200.0,
      10700.0
    ],
    [
      1300.0,
      0.2214,
      0.0001657,
      357299.99999999994,
      14700.0,
      12000.0
    ],
    [
      1400.0,
      0.2115,
      0.0001552,
      400800.0,
      16100.000000000002,
      13200.0
    ],
    [
      1500.0,
      0.2025,
      0.0001461,
      446300.0,
      17500.0,
      14600.0
    ],
    [
      1600.0,
      0.1942,
      0.000138,
      493700.0,
      18900.0,
      16000.0
    ],
    [
      1700.0,
      0.1864,
      0.0001308,
      543200.0,
      20400.0,
      17400.0
    ],
    [
      1800.0,
      0.1792,
      0.0001244,
      594700.0,
      21900.0,
      18900.0
    ],
    [
      2000.0,
      0.1662,
      0.0001133,
      703900.0,
      27200.000000000004,
      22000.0
    ],
    [
      2250.0,
      0.1523,
      0.0001021,
      851900.0,
      34800.0,
      26100.0
    ],
    [
      2500.0,
      0.1406,
      9.298e-05,
      1012800.0,
      42100.0,
      30600.0
    ],
    [
      2750.0,
      0.1307,
      8.543e-05,
      1186500.0,
      49200.0,
      35300.0
    ],
    [
      3000.0,
      0.1222,
      7.907e-05,
      1372700.0,
      56400.0,
      40400.0
    ],
    [
      3250.0,
      0.1149,
      7.363e-05,
      1571399.9999999998,
      63600.0,
      45800.0
    ],
    [
      3500.0,
      0.1084,
      6.893e-05,
      1782400.0,
      70900.0,
      51500.0
    ],
    [
      3750.0,
      0.1027,
      6.481e-05,
      2005500.0,
      78300.0,
      57500.0
    ],
    [
      4000.0,
      0.09766,
      6.118e-05,
      2240600.0,
      85800.0,
      63800.0
    ],
    [
      4500.0,
      0.089,
      5.507e-05,
      2745899.9999999995,
      112899.99999999999,
      77300.0
    ],
    [
      5000.0,
      0.08188,
      5.011e-05,
      3297700.0,
      138700.0,
      91900.0
    ],
    [
      5500.0,
      0.0759,
      4.601e-05,
      3895200.0,
      163900.0,
      107700.0
    ],
    [
      6000.0,
      0.07081,
      4.255e-05,
      4537700.0,
      188900.0,
      124600.00000000001
    ],
    [
      6500.0,
      0.06642,
      3.96e-05,
      5224600.0,
      214200.00000000003,
      142500.0
    ],
    [
      7000.0,
      0.06258,
      3.705e-05,
      5955200.0,
      239600.0,
      161600.0
    ],
    [
      8000.0,
      0.0562,
      3.285e-05,
      7543900.0,
      331800.0,
      202900.0
    ],
    [
      9000.0,
      0.0511,
      2.954e-05,
      9302200.0,
      418200.0,
      248200.0
    ],
    [
      10000.0,
      0.04691,
      2.686e-05,
      11200000.000000002,
      502800.0,
      297700.0
    ]
  ],
}

Metadata

Release files for srim_srout 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for srim_srout 0.1.2
File Size Uploaded
srim_srout-0.1.2.zip 18.3 kB Details

Release files / srim_srout-0.1.2.zip

Download URL srim_srout-0.1.2.zip
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
be39cacd25728aa1b50df4e72b3e7b9ef2cb0c02a65b08db740a61357bbbb5d5
BLAKE2b-256 checksum
How to use checksums
3563c7a24ee1ed4ddab92131d51006bb1e59aca8615f9e895dad450eda054f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.2 This release

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page