G4NDL file format and altering physics constructors to add cross section data

I’m attempting to add cross section files to be used by NEUTRONHP to include temperature-dependent neutron capture cross section datasets as well as ENDF data for nuclei that are not currently in G4NDL. I see I can set my environmental variable to point to the location of the .z files which leads me to 2 questions.

The first is, what is the G4NDL file format? When I decompress a .z file I see a file with 6 columns (excerpt below). The first, third, and fifth columns appears to be energy with the second, fourth, and sixth being cross sections. I assume this is cross section and error? Additionally what is the format of the FS and FSMF6 files for the capture cross section data sets? I cannot find any documentation talking about formatting and it appears I will need to create my own files.
Excerpt of file:
G4NDL
ENDF/B-VII.1
102
0
56237
1.000000e-05 6.873897e+03 1.031250e-05 6.768949e+03 1.062500e-05 6.668666e+03
1.093750e-05 6.572712e+03 1.125000e-05 6.480785e+03 1.156250e-05 6.392610e+03
1.187500e-05 6.307938e+03 1.218750e-05 6.226545e+03 1.250000e-05 6.148224e+03
1.281250e-05 6.072785e+03 1.312500e-05 6.000058e+03 1.343750e-05 5.929882e+03
1.375000e-05 5.862112e+03 1.437500e-05 5.733264e+03 1.500000e-05 5.612556e+03
1.562500e-05 5.499164e+03 1.625000e-05 5.392379e+03 1.687500e-05 5.291583e+03
1.750000e-05 5.196236e+03 1.812500e-05 5.105865e+03 1.875000e-05 5.020050e+03
1.937500e-05 4.938423e+03 2.000000e-05 4.860652e+03 2.093750e-05 4.750592e+03
2.187500e-05 4.647685e+03 2.281250e-05 4.551189e+03 2.375000e-05 4.460465e+03
2.468750e-05 4.374959e+03 2.562500e-05 4.294190e+03 2.656250e-05 4.217735e+03
2.750000e-05 4.145224e+03 2.843750e-05 4.076330e+03 2.937500e-05 4.010760e+03
3.031250e-05 3.948256e+03 3.125000e-05 3.888587e+03 3.218750e-05 3.831544e+03
3.312500e-05 3.776940e+03 3.406250e-05 3.724607e+03 3.500000e-05 3.674390e+03
3.593750e-05 3.626152e+03 3.687500e-05 3.579765e+03 3.781250e-05 3.535114e+03
3.875000e-05 3.492093e+03 3.968750e-05 3.450607e+03 4.062500e-05 3.410564e+03
4.250000e-05 3.334492e+03 4.437500e-05 3.263294e+03 4.625000e-05 3.196471e+03
4.812500e-05 3.133592e+03 5.000000e-05 3.074284e+03 5.156250e-05 3.027353e+03
5.312500e-05 2.982508e+03 5.468750e-05 2.939599e+03 5.625000e-05 2.898490e+03
5.781250e-05 2.859060e+03 5.937500e-05 2.821196e+03 6.093750e-05 2.784799e+03
6.250000e-05 2.749775e+03 6.406250e-05 2.716040e+03 6.562500e-05 2.683518e+03
6.718750e-05 2.652137e+03 6.875000e-05 2.621832e+03 7.187500e-05 2.564214e+03
7.500000e-05 2.510236e+03 7.812500e-05 2.459531e+03 8.125000e-05 2.411780e+03
8.437500e-05 2.366707e+03 8.750000e-05 2.324071e+03 9.062500e-05 2.283660e+03
9.375000e-05 2.245287e+03 9.687500e-05 2.208786e+03 1.000000e-04 2.174010e+03
1.031250e-04 2.140827e+03 1.062500e-04 2.109119e+03 1.093750e-04 2.078780e+03
1.125000e-04 2.049714e+03 1.156250e-04 2.021835e+03 1.187500e-04 1.995064e+03

My second question is, I saw in another question someone referenced being able to alter the physics constructors to accept different cross section files which strikes me as a more user friendly way to achieve what I am after. Are there any examples for that?

Thank you all!

1 Like

Any luck with this? I have been trying to find documentation on the G4NDL format as well but had no luck…

Yes and no. I never managed to find any sort of documentation. I did however find that the IAEA has G4NDL files for all the current databases (ENDF, JEFF, etc) available here if you are just looking for what is currently in the databases: https://www-nds.iaea.org/geant4/

Unfortunately the group that generated them hasn’t included any information about the structure of the files in their papers that I could find. However, after playing around with the files, i noticed that they are alternating: so column 1 is energy, column 2 is cross section, column 3 is energy, column 4 is cross section etc

I still am not entirely sure what the headers are outside of the the large number which appears to be number of data points in the file.

1 Like

Thanks for letting me know! Yeah, the cross sections were easy enough to crack, but I need to look into product angular-energy distributions, and those are a bit more unintelligible :smiley:

G4NDL uses ENDF/B-VIII data which uses the ENDF-6 format. That format is documented at https://www-nds.iaea.org/geant4/ . Under the Quick Links menu there, click on ENDF-6 format. This brings you to the Brookhaven manual for the format. It’s long and complicated, but it is the definitive description.

1 Like

To add onto that: as of Geant4 10.6.2, the data is based mostly on JEFF3.3.

From G4NDL4.6 README file:

G4NDL4.6 neutron cross sections and final states have been obtained from
JEFF-3.3 [1]. The previous release, G4NDL4.5, was based mainly on
ENDF/B-VII.1 [2]. Details concerning older G4NDL versions can be found in
README.old2 (which is the old README file).

In case this is of help to someone, I leave here a comparison between the formats. Here is an excerpt from JEFF3.3 (JEFF3.3-n/1-H-1g.jeff3, lines 418-433):

 1.001000+3 9.991673-1          0          2          2          0 125 6102    1
 0.000000+0 2.223300+6          0          2          1          2 125 6102    2
          2          2                                             125 6102    3
 1.000000-5 1.000000+0 2.000000+7 1.000000+0                       125 6102    4
 0.000000+0 0.000000+0          0          0          1         96 125 6102    5
         96          2                                             125 6102    6
 0.000000+0 1.000000-5          0          0          2          2 125 6102    7
-6.160950-8-8.86237-13                                             125 6102    8
 0.000000+0 2.000000-5          0          0          2          2 125 6102    9
-8.712894-8-1.77244-12                                             125 6102   10
 0.000000+0 5.000000-5          0          0          2          2 125 6102   11
-1.377628-7-4.43100-12                                             125 6102   12
 0.000000+0 1.000000-4          0          0          2          2 125 6102   13
-1.948257-7-8.86201-12                                             125 6102   14
 0.000000+0 2.000000-4          0          0          2          2 125 6102   15
-2.755246-7-1.77240-11                                             125 6102   16
...

Compare to G4NDL4.6/Capture/FSMF6/1_1_Hydrogen.z (compressed with zlib; you can uncompress using zlib-flate -uncompress < 1_1_Hydrogen.z):

        0.999167        2       2
  0.000000e+00  2.223300e+06    0       2
  2.224631e+06  2.224631e+06
        2
        1
        2       2
        1.000000e-05    1.000000e+00    2.000000e+07    1.000000e+00
        96
        1
        96      2
  1e-05         0       2
-6.160950e-08   -8.862370e-13   
  2e-05         0       2
-8.712894e-08   -1.772440e-12   
  5e-05         0       2
-1.377628e-07   -4.431000e-12   
  0.0001        0       2
-1.948257e-07   -8.862010e-12   
  0.0002        0       2
-2.755246e-07   -1.772400e-11   
...

The formats should be similar enough to be “mutually intelligible”.

I am also finding the information in here quite useful. It seems a bit out of date, but it is much nicer to follow than the manual in my opinion.
https://t2.lanl.gov/nis/endf/title.html

1 Like