Radiobiology module - add new lines in data/rbe/lem1.csv

Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!

Geant4 Version: 11.3.2
Operating System:
Compiler/Version:
CMake Version:


I try to add new lines for a normal cell in lem1.csv and I copy the same file with rename it with my modification in the same its path radiobiology/data/rbe/lem1_modify.csv

‘‘‘

build-radiobiology % ls
CMakeCache.txt Makefile data radiobiology
CMakeFiles cmake_install.cmake macro
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % nano macro/defaultMacro.mac

‘‘‘

‘‘‘

RBE

/rbe/reset
/rbe/verbose 1
#/rbe/loadLemTable data/rbe/lem1.csv
/rbe/loadLemTable data/rbe/lem1_modify.csv # Sarah add

/rbe/calculate true

#U87

#/rbe/cellLine U87
/rbe/cellLine CA1_Neuron

/rbe/print

‘‘‘

I got an error.

‘‘‘

→ G4TaskRunManager::CreateAndStartWorkers() → Initializing workers…

G4WT3 > Accumulable registered as “Dose”
G4WT1 > Accumulable registered as “Dose”
G4WT3 > Accumulable registered as “LET”
G4WT0 > Accumulable registered as “Dose”
G4WT3 > Accumulable registered as “RBE”
G4WT2 > Accumulable registered as “Dose”
G4WT0 > Accumulable registered as “LET”
G4WT2 > Accumulable registered as “LET”
G4WT0 > Accumulable registered as “RBE”
G4WT2 > Accumulable registered as “RBE”
G4WT1 > Accumulable registered as “LET”
G4WT1 > Accumulable registered as “RBE”


****** Parameters of the class Dose *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************



******* Parameters of the class LET *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : ColumnNotPresent
issued by : RBE::LoadLEMTable
Column alpha_x not present in the LEM table file.
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***
zsh: abort ./radiobiology macro/defaultMacro.mac

‘‘‘

I try to do this

‘‘‘

head -n 1 data/rbe/lem1_modify.csv | od -c
0000000 \t a l p h a _ x \t b e t a _ x \t
0000020 r _ n u c l e u s \t D _ t \t s p
0000040 e c i f i c _ e n e r g y \t l e
0000060 t \t a l p h a \t b e t a \t a l p
0000100 h a _ s i g m a \t b e t a _ s i
0000120 g m a \t c e l l \t p a r t i c l
0000140 e \t R B E _ a l p h a \n
0000154
sarahabdelaziz@Sarahs-MacBook-Pro radiobiology % sed -i ‘’ ‘1s/^\t//’ data/rbe/lem1_modify.csv
sarahabdelaziz@Sarahs-MacBook-Pro radiobiology % head -n 1 data/rbe/lem1_modify.csv | od -c
0000000 a l p h a _ x \t b e t a _ x \t r
0000020 _ n u c l e u s \t D _ t \t s p e
0000040 c i f i c _ e n e r g y \t l e t
0000060 \t a l p h a \t b e t a \t a l p h
0000100 a _ s i g m a \t b e t a _ s i g
0000120 m a \t c e l l \t p a r t i c l e
0000140 \t R B E _ a l p h a \n
0000153

‘‘‘

But I got the same problem. Could you help me, please?

I try by delete quotes in the txt file and again compile radiobiology but I got

‘‘‘

→ G4TaskRunManager::CreateAndStartWorkers() → Initializing workers…

G4WT1 > Accumulable registered as “Dose”
G4WT2 > Accumulable registered as “Dose”
G4WT1 > Accumulable registered as “LET”
G4WT1 > Accumulable registered as “RBE”
G4WT2 > Accumulable registered as “LET”
G4WT2 > Accumulable registered as “RBE”
G4WT0 > Accumulable registered as “Dose”
G4WT3 > Accumulable registered as “Dose”
G4WT0 > Accumulable registered as “LET”
G4WT0 > Accumulable registered as “RBE”
G4WT3 > Accumulable registered as “LET”
G4WT3 > Accumulable registered as “RBE”


****** Parameters of the class Dose *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************



******* Parameters of the class LET *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************


zsh: segmentation fault ./radiobiology macro/defaultMacro.mac
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology %

‘‘‘

@bmorgan @cirrone @lpandola and @ivana

Thanks

Sarah

Pinging @cirrone, @lpandola and @ivana as maintainers of this example!

@bmorgan Thanks for the ping, we are taking a closer look

1 Like

At first glance this looks like a delimiter/header parsing issue: your lem1_modify.csv header is tab-separated (note the \t in od -c), so the loader likely doesn’t recognize a column literally named alpha_x. Please make sure the modified file uses the same separator as the original lem1.csv (commas), and that every row has the same number of fields. If that checks out and you still see the error/segfault, we’re going to look deeper into it.

Thanks for your reply.

I try to take one of cell from original file (lem1.csv), but I got the same problem. I delete any tab and replace with comma. Do you think it is related to the operating system? My lab is macbook bro.

‘‘‘

alpha_x,beta_x,r_nucleus,D_t,specific_energy,let,alpha,beta,alpha_sigma,beta_sigma,cell,particle,RBE_alpha
0.11,0.06,6.5,8,172.698,0.5,0.127549,0.0588984,0,0,U87,H,1.15953636363636
0.11,0.06,6.5,8,143.534,0.567824,0.138268,0.0582273,0,0,U87,H,1.25698181818182
0.11,0.06,6.5,8,119.965,0.644847,0.149487,0.0575248,0,0,U87,H,1.35897272727273
0.11,0.06,6.5,8,100.952,0.732319,0.161175,0.0567928,0,0,U87,H,1.46522727272727
0.11,0.06,6.5,8,85.4798,0.831656,0.173273,0.0560348,0,0,U87,H,1.57520909090909
0.11,0.06,6.5,8,72.4215,0.944468,0.18615,0.0552277,0,0,U87,H,1.69227272727273
0.11,0.06,6.5,8,61.3953,1.07258,0.19987,0.0543674,0,0,U87,H,1.817
0.11,0.06,6.5,8,52.3329,1.21808,0.21415,0.0534717,0,0,U87,H,1.94681818181818
0.11,0.06,6.5,8,44.5844,1.3833,0.229405,0.0525143,0,0,U87,H,2.0855
0.11,0.06,6.5,8,38.033,1.57095,0.245631,0.0514955,0,0,U87,H,2.23300909090909
0.11,0.06,6.5,8,32.4783,1.78404,0.262885,0.0504115,0,0,U87,H,2.38986363636364
0.11,0.06,6.5,8,27.7871,2.02604,0.281233,0.049258,0,0,U87,H,2.55666363636364
0.11,0.06,6.5,8,23.8148,2.30087,0.300765,0.0480292,0,0,U87,H,2.73422727272727
0.11,0.06,6.5,8,20.3604,2.61297,0.321958,0.0466949,0,0,U87,H,2.92689090909091
0.11,0.06,6.5,8,17.41,2.96741,0.344778,0.0452571,0,0,U87,H,3.13434545454545
0.11,0.06,6.5,8,14.8921,3.36994,0.368447,0.0437641,0,0,U87,H,3.34951818181818
0.11,0.06,6.5,8,12.7468,3.82706,0.39066,0.0423601,0,0,U87,H,3.55145454545455
0.11,0.06,6.5,8,10.8957,4.34619,0.414916,0.0408255,0,0,U87,H,3.77196363636364
0.11,0.06,6.5,8,9.32672,4.93574,0.441256,0.039157,0,0,U87,H,4.01141818181818
0.11,0.06,6.5,8,7.95205,5.60526,0.47064,0.037294,0,0,U87,H,4.27854545454545
0.11,0.06,6.5,8,6.79001,6.36559,0.502712,0.035258,0,0,U87,H,4.57010909090909
0.11,0.06,6.5,8,5.79218,7.22907,0.53825,0.0329995,0,0,U87,H,4.89318181818182
0.11,0.06,6.5,8,4.93205,8.20967,0.578305,0.0304516,0,0,U87,H,5.25731818181818

‘‘‘

‘‘‘

******* Parameters of the class LET *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : ColumnNotPresent
issued by : RBE::LoadLEMTable
Column alpha_x not present in the LEM table file.
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***
zsh: abort ./radiobiology macro/defaultMacro.mac
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology %

‘‘‘

Could you help me, please?

It’s very unlikely to be macOS-related. This usually happens because the first header field contains a hidden character (most commonly a UTF-8 BOM at the start of the file, or Windows-style line endings), so it looks like “alpha_x” to you but it isn’t an exact match for the parser.

Quick solution: open the file in a plain-text editor and re-save it as UTF-8 (no BOM) with Unix (LF) line endings, making sure the delimiter is exactly the same as the original lem1.csv. Then retry.

Hey Sarah,

You removed the first “empty” column that exists in the original lem1.csv

It was:
"",alpha_x,beta_x,r_nucleus,D_t,...
and you have:
alpha_x,beta_x,r_nucleus,D_t,...

Sorry :slight_smile: It was not very clever suggestion…

Hi Sarah, could you please make your file accessible from somewhere? For example, https://file.io/

Thanks for your reply. I did but not solve the problem.

Yes, I do.

Again I do a new file with these steps in a plain text file. Then, do cmake for the source folder of radiobiology, then modify the macro file of build folder for the new file.

‘‘‘

sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % ls
CMakeCache.txt cmake_install.cmake radiobiology
CMakeFiles data
Makefile macro
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % cmake -DCMAKE_PREFIX_PATH=/opt/geant4/11.3.2 ..
– Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
– Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
– Configuring done (2.5s)
– Generating done (0.5s)
– Build files have been written to: /Users/sarahabdelaziz/geant4/radiobiology/build-radiobiology
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % make
[100%] Built target radiobiology
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % ls
CMakeCache.txt cmake_install.cmake radiobiology
CMakeFiles data
Makefile macro
sarahabdelaziz@Sarahs-MacBook-Pro build-radiobiology % ./radiobiology macro/defaultMacro.mac

‘‘‘

‘‘‘

******* Parameters of the class LET *******


** Verbose level = 1 **********************
** Initialized = true *********************
** Saved = false **************************
** Calculation enabled = true *************


-------- EEEE ------- G4Exception-START -------- EEEE -------
*** G4Exception : WrongTable
issued by : RBE::LoadData
Cannot open LEM table input file: data/rbe/lem1U87again
*** Fatal Exception *** core dump ***
**** Track information is not available at this moment
**** Step information is not available at this moment

-------- EEEE -------- G4Exception-END --------- EEEE -------

*** G4Exception: Aborting execution ***
zsh: abort ./radiobiology macro/defaultMacro.mac

‘‘‘

‘‘‘

alpha_x,beta_x,r_nucleus,D_t,specific_energy,let,alpha,beta,alpha_sigma,beta_sigma,cell,particle,RBE_alpha
0.11,0.06,6.5,8,172.698,0.5,0.127549,0.0588984,0,0,U87,H,1.15953636363636
0.11,0.06,6.5,8,143.534,0.567824,0.138268,0.0582273,0,0,U87,H,1.25698181818182
0.11,0.06,6.5,8,119.965,0.644847,0.149487,0.0575248,0,0,U87,H,1.35897272727273
0.11,0.06,6.5,8,100.952,0.732319,0.161175,0.0567928,0,0,U87,H,1.46522727272727
0.11,0.06,6.5,8,85.4798,0.831656,0.173273,0.0560348,0,0,U87,H,1.57520909090909
0.11,0.06,6.5,8,72.4215,0.944468,0.18615,0.0552277,0,0,U87,H,1.69227272727273
0.11,0.06,6.5,8,61.3953,1.07258,0.19987,0.0543674,0,0,U87,H,1.817
0.11,0.06,6.5,8,52.3329,1.21808,0.21415,0.0534717,0,0,U87,H,1.94681818181818
0.11,0.06,6.5,8,44.5844,1.3833,0.229405,0.0525143,0,0,U87,H,2.0855
0.11,0.06,6.5,8,38.033,1.57095,0.245631,0.0514955,0,0,U87,H,2.23300909090909

‘‘‘

what should I do? In the rbe.cc, there are only 8 columns but in the original lem1.csv which I take only data from it to U87, there are 12 columns?

‘‘‘ // Find the order of columns
std::vector columns = {“alpha_x”, “beta_x”, “D_t”, “specific_energy”,
“alpha”, “beta”, “cell”, “particle”};
std::map<G4String, int> columnIndices;
for (auto columnName : columns) {
auto pos = find(header.begin(), header.end(), columnName);
if (pos == header.end()) {
std::stringstream ss;
ss << “Column " << columnName << " not present in the LEM table file.”;
G4Exception(“RBE::LoadLEMTable”, “ColumnNotPresent”, FatalException, ss.str().c_str());
}
'‘‘

from RBE.cc ( examples/extended/medical/radiobiology/src/RBE.cc · master · geant4 / geant4 · GitLab )

@dkonst

Hello!

i uploaded to the link. Could you see it?

Thank you.

Hi Sarah, thanks, I do not see any download link in your message. Could you please share the file again? You can use any service like dropbox, google drive… Just send the link here so we can download it.