KAHIBARO
Discord Login Register

8.6. Creating Custom Materials

Composition

In GATE, every material is built from basic elements. For custom materials you explicitly specify which elements are present and in what proportions. This is essential when you need a tissue substitute, a specific phantom material, or a detector or shielding material that is not in the standard Geant4 database.

You typically define a material by listing its constituent elements along with either their mass fractions or their number of atoms. For most medical physics applications, mass fractions are used because they are easier to obtain from published data and material specifications.

In OpenGATE, you provide this information in Python when you configure your simulation. Conceptually, the steps are:

  1. Choose a unique material name.
  2. List all elements contained in the material, for example H, C, N, O, Ca.
  3. Provide the composition for each element.
    With mass fractions, each element gets a value between 0 and 1, and the fractions must sum to 1.
  4. Provide the material density, which is handled separately from the composition.

An example idea for a custom soft tissue material would be to define an element list with approximate mass fractions from the literature. You do not need the exact code here, but logically you would tell GATE something like: this material is 10 percent hydrogen, 11 percent carbon, 2.6 percent nitrogen, and 76.4 percent oxygen by mass. GATE converts this information into a Geant4 material internally.

GATE can also define mixtures from other existing materials. In that case, you treat each component material as if it were an element. You then give mass fractions for each component. This is useful for composite materials such as bone plus contrast agent, or plastic plus a filler.

Make sure that you are consistent about how you specify composition. Do not mix mass fractions with atomic fractions in the same material definition and do not reuse the same material name with different compositions.

For a valid custom material:

  • Use either mass fractions or atomic fractions for all components.
  • Ensure that all fractions sum to exactly 1 (within small numerical tolerance).
  • Use a unique and descriptive material name.

If the composition is wrong, all interaction probabilities, attenuation coefficients, and dose calculations will be physically incorrect, even if your geometry and sources are perfect.

Density

Density connects the composition to the physical amount of material present in space. For a given composition, the density determines how many atoms per volume GATE will simulate. This has a direct effect on attenuation, scattering, and dose.

You specify density in units compatible with GATE units, commonly $\text{g}/\text{cm}^3$. In OpenGATE Python scripts you multiply the numeric value by the appropriate unit constant. For example, liquid water has a density of about $1.0 \,\text{g}/\text{cm}^3$, cortical bone about $1.85 \,\text{g}/\text{cm}^3$, and lung tissue somewhat lower because of embedded air.

In medical simulations, density can be as important as the elemental composition. Two materials with the same composition but different densities will produce different interaction probabilities and dose distributions. This is especially evident in CT based simulations, where the same nominal tissue can appear at different densities due to pathology or imaging conditions.

For phantoms and detector components, you typically take density from manufacturer data sheets or standard reference tables. For patient or voxelized geometries, density can be derived from CT numbers, but the detailed procedure for CT to density conversion is handled in dedicated chapters on voxelized geometry and CT to material conversion.

Be careful when you define densities that depend on environmental conditions such as temperature or pressure. For example, air at standard temperature and pressure has a specific density that changes with altitude or compression. If you are modeling a realistic environment, confirm that your density choice matches the conditions you want to simulate.

When defining custom materials:

  • Always provide a realistic density in $\text{g}/\text{cm}^3$ (or equivalent GATE units).
  • Do not copy densities blindly; verify them against reliable references.
  • Remember that density directly affects attenuation, range, and dose.

If you forget to set the density, or use a wrong value by orders of magnitude, your simulation results will be unusable even if the rest of your configuration is correct.

Material databases

Defining every material from scratch is time consuming and error prone, so you should only create a fully custom material when it is not available in existing databases or when you need a modified composition.

Geant4 already provides a large set of predefined materials, especially through its NIST material database. GATE builds on this and can use those standard materials without any extra work from you. You simply refer to them by their known names in your geometry. For many simulations, especially those involving air, water, common plastics, and some metals, these built in materials are sufficient.

For more specialized or application specific materials, you will often rely on external compilations. In medical physics, examples include reference data for tissue compositions and densities, or tables for bone, lung, and soft tissue subtypes. These sources give you the elemental composition and density you need to enter into GATE. While this course does not prescribe a specific data source, the workflow is always the same: extract composition and density from the external reference, then translate them into a custom material definition in your simulation script.

You may also build your own local database of materials in Python. For example, you can create a separate Python module that contains functions or dictionaries for all custom materials you frequently use, such as particular detector crystals, plastics, or tissue surrogates. Then, in each simulation, you simply import this module and call a function to register the material. This keeps your main simulation scripts shorter and reduces the chance of typos or inconsistent definitions.

Good practice for custom materials:

  • Prefer standard Geant4 / NIST materials when they meet your needs.
  • When you must define a new material, base it on trusted published data.
  • Centralize your custom material definitions in a shared Python module to ensure consistency across simulations.

By combining standard databases with a small, well maintained collection of custom materials, you can cover most GATE applications while keeping your simulations consistent, traceable, and easier to validate.

Views: 8

Comments

Please login to add a comment.

Don't have an account? Register now!