Software/TOPAS: Difference between revisions

From PBTWiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 6: Line 6:
** [https://opentopas.readthedocs.io/en/latest/getting-started/install.html OpenTOPAS Installation Guide]
** [https://opentopas.readthedocs.io/en/latest/getting-started/install.html OpenTOPAS Installation Guide]


This is a tutorial about installing and using TOPAS. TOPAS is installed on the HEP Linux cluster at UCL. You will need an account on that cluster to be able to use this software, run example tutorials and create your own simulations.  
This is a tutorial about installing and using TOPAS. TOPAS is installed on the HEP Linux cluster at UCL. You will need an account on that cluster to be able to use this software, run example tutorials and create your own simulations.


== Running TOPAS Simulations ==
== Running TOPAS Simulations ==
Line 19: Line 19:


<pre>
<pre>
$ source /unix/pbt/software/scripts/bdsim.sh  
$ source /unix/pbt/software/TOPAS/topas.sh
</pre>
</pre>


This sets up all the required EasyBuild modules and environment variables. The version of BDSIM that is used within this script is not the latest build (v1.1.0 instead of v1.2.+) but should be stable. If a newer version is required then contact James Chappell and he will compile a newer version for you to use.
This sets up all the required Geant4 modules over CVMFS and environment variables. This sets up the most recent version of OpenTOPAS (OpenTOPAS v4.0.0), however the script can be run using different flags in order to run oder versions if necessary.  
Now your system is ready to use <code>TOPAS</code>.  


Now your system is ready to use <code>BDSIM</code>. To check that it is working correctly, test the built-in help function:  
=== Running a simple OpenTOPAS Simulation on the UCL HEP Linux Cluster (via CVMFS) ===
 
To run the simple OpenTOPAS example of dose being scored inside a water phantom:


<pre>
<pre>
$ bdsim --help
$ cd /unix/pbt/software/TOPAS/OpenTOPAS-install/examples/Scoring
$  ../../bin/topas Dose.txt
</pre>
</pre>
This should produce an output explaining all the possible options that can be used within <code>BDSIM</code>.
== Required Software ==
BDSIM requires the following software to be installed:
* Recent compiler with full C++11 support - proven compiler versions are GCC v4.9 or higher, or Clang 6 or higher.
* CMake v2.8.12 or higher
* CLHEP v2.1.3.1 or higher
* ROOT v6.x or higher
* Geant4 v4.10 or higher
* Flex v2.5.37 or higher
* Bison v2.3 or higher
These are all installed on the UCL HEP cluster.
== Details ==
; Website: https://twiki.ph.rhul.ac.uk/twiki/bin/view/PP/JAI/BdSim
; Latest Version: 0.9.9.2 (19th October 2017)
== Installation Instructions ==
The installation process follows the general process described on the [[Software/Geant4/UCL HEP Cluster|UCL HEP Linux Cluster]] page. 
The basic method used is as follows:
# Check that all the prerequisites for building <code>BDSIM</code> are installed (see above);
# Download the latest version of the source code;
# Create a build folder;
# Configure, build and install <code>BDSIM</code> from within the build folder.
=== Download BDSIM from its central repository ===
The BDSIM source code can be downloaded from its git repository using:
<pre> $ git clone --recursive <nowiki>https://bitbucket.org/jairhul/bdsim</nowiki> </pre>
This creates a <code>/bdsim</code> folder within your current folder. This folder contains all the code, examples, documentation and associated Python packages.
=== Configure, build and install <code>BDSIM</code> ===

Latest revision as of 14:21, 20 June 2025

TOPAS

TOPAS (Tool for Particle Simulation) is a program that uses the Geant4 Monte Carlo toolkit to build 3D models of medical physics systems and simulate particle transport through treatment heads, patients, and detectors

This is a tutorial about installing and using TOPAS. TOPAS is installed on the HEP Linux cluster at UCL. You will need an account on that cluster to be able to use this software, run example tutorials and create your own simulations.

Running TOPAS Simulations

In order to run TOPAS simulations, you will either need to download and install the software yourself or make use of the existing installation on the UCL HEP Linux cluster.

In order to use the UCL HEP Linux cluster, you will need a HEP account: please contact Prof. Simon Jolly for more details.

Running on the UCL HEP Linux Cluster (via CVMFS)

In order to run TOPAS simulations on the UCL HEP Cluster, you must source the TOPAS PBT environment from a system within the cluster. This can be done using the following command:

$ source /unix/pbt/software/TOPAS/topas.sh

This sets up all the required Geant4 modules over CVMFS and environment variables. This sets up the most recent version of OpenTOPAS (OpenTOPAS v4.0.0), however the script can be run using different flags in order to run oder versions if necessary. Now your system is ready to use TOPAS.

Running a simple OpenTOPAS Simulation on the UCL HEP Linux Cluster (via CVMFS)

To run the simple OpenTOPAS example of dose being scored inside a water phantom:

$ cd /unix/pbt/software/TOPAS/OpenTOPAS-install/examples/Scoring
$   ../../bin/topas Dose.txt