[Gate-users] How to Run Simulation in VGate

Jonathan Madsen jonathanrmadsen at gmail.com
Tue Jun 4 17:44:41 CEST 2013


I can't tell which one of the following two issues you are having with what you have written so I'll address them both. 

The first is from your phrasing which sounds like you are trying to run the command from the Linux kernel (I.e. in terminal not inside the Gate application):

The Gate command /gate/geometry/setMaterialDatabase GateMaterials.db can't be run from terminal. The folder path /gate/geometry only exists within Gate which utilizes Geant4's tcsh-style shell interface by default on Linux -- the / at the beginning is the root directory. To see what I am talking about, from terminal, type "ls /" and you will see there is no "gate" folder. Compare that with entering "gate" in terminal (which without any arguments enters you into interactive mode instead of batch mode. Batch mode is entered into if you were to enter "gate mymacro.mac" where mymacro.mac is the 1st argument to the command gate -- interactive mode stays in the Gate application until you enter "exit" whereas batch mode would exit the gate application after executing mymacro.mac within Gate). Once in interactive mode with Gate then enter "ls /" and you will see an entirely different folder structure that comprises Gate emulating a Linux shell. 

The second one is I noticed you typed:

> /gate/geometry/setMaterialDatabase/GateMaterials.db

Which would be incorrect because "setMaterialDatabase" is a command, not a folder, and you are passing it the argument "GateMaterials.db". The setMaterialDatabase is similar to you typing "ls" in Terminal, because "ls" is really "/bin/ls" but there is an environment variable in your shell (bash, tcsh, etc.) named "PATH" (type export in bash or setenv in tcsh to view all the environment variables) that tells the Terminal where is should look for commands. In other words, if the /bin/ folder is in your PATH the shell looks for the "ls" command in the PATH folders and finds it in the /bin/ folder and executes "ls" as if you actually input "/bin/ls ." The period at the end if the default argument of "ls" and it means the current directory. 

Jonathan


Sent from my iPhone

On Jun 4, 2013, at 8:49 AM, Amy Meldrum <ameldru at g.clemson.edu> wrote:

> Thank you for the quick response, Nicola. 
> 
> I am still unsure about the materials directory. I tried typing in the commands into the terminal for an example much like that presented in the Gate User's Manual (starting on page 3 of the 'Getting Started' section). Everything seemed to be okay up until the command for /gate/geometry/setMaterialDatabase/GateMaterials.db .  Is this just because a path needs to be specified between /setMaterialDatabase and /GateMaterials.db?  I'm sorry, I am just very new with this, and am trying to learn as I go. 
> 
> Thank you again,
> 
> -Amy
> 
> 
> On Tue, Jun 4, 2013 at 9:38 AM, Nicola Poles <nicola.poles at gmail.com> wrote:
>> Hi Amy,
>> 
>> VGate runs just the same as Gate. You can run your macro file from anywhere as long as you provide accurate paths for other macros you might call inside the "main" macro and for GateMaterials.db. Examples below:
>> 
>> /control/execute                    Verbose.mac
>> 
>> In this case you are executing a macro which is in the directory from which you have launched Gate.
>> 
>> /gate/geometry/setMaterialDatabase    ../GateMaterials.db
>> 
>> Here you are telling Gate that the GateMaterials.db is in the parent directory.
>> 
>> I hope this clears it up for you.
>> 
>> Nicola Poles
>> nicola.poles at gmail.com
>> 
>> 
>> 
>> On Jun 4, 2013, at 3:12 PM, Amy Meldrum <ameldru at g.clemson.edu> wrote:
>> 
>> > Hello all,
>> >
>> > I am new to VGate, as it seemed like an easier way to use Geant4 for simulations. However, I am confused about a few things. If I were to create my own macro file for a simulation, and bring it into VGate, how would I go about running it? Do I need to create my own folder or directory in VGate? And do I need to copy the GateMaterials.db file into it? I understand the commands to run a macro, I am just not sure if I need to be in a specific directory, and what files need to be in the directory so that the simulation will work.
>> >
>> > Thank you for any help. I hope to be able to start creating simulations shortly.
>> >
>> > -Amy
>> > _______________________________________________
>> > Gate-users mailing list
>> > Gate-users at lists.opengatecollaboration.org
>> > http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
> 
> _______________________________________________
> Gate-users mailing list
> Gate-users at lists.opengatecollaboration.org
> http://lists.opengatecollaboration.org/mailman/listinfo/gate-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opengatecollaboration.org/mailman/private/gate-users/attachments/20130604/a0f0676f/attachment-0001.html>


More information about the Gate-users mailing list