Using MATXCOM

Once you have completed the installation, you can use the program in following ways:

  1. Interact by directly aswering on-screen prompts through a command line interface.

  2. Prepare an input file beforehand and run the program againt hte insput file through a command line interface.

  3. Use a wrapper function to run the program inside MATLAB or Python environment.

Answering Prompts

MATXCOM is a command-line program and does not a graphical user interface (GUI). User interaction is made with prompts through a command line interface.

Steps to run MATXCOM:

  1. Open a Command Prompt or Windows PowerShell window.

  2. Navigate to the directory where you extracted the contents of the .zip file.

  3. Run the program by typing:

.\matxcom
  1. Press Enter.

  2. When you run MATXCOM, it will prompt you for various inputs to characterize the substance and specify calculation options.

Below is a description of the prompts for MATXCOM:

No.

Prompt

Description

1

Enter name of substance

Enter a name or label for the material you are analyzing.

2

Enter density of substance

Provide the physical density of the material in g/cm3.

3

Options for characterization of substance

Currently, the only option available is to define the substance as a mixture of elements and/or compounds.

4

How many components in mixture?

Specify the number of components (elements or compounds) that make up the mixture.

5

Choose fraction by weight or mol

Indicate whether the composition will be provided in terms of weight fractions or mole fractions.

6

Enter chemical symbol or formula for component <n>

For each component, enter its chemical symbol (e.g., Pb) or formula (e.g., H2O, Fe2O3). Repeat for all components in the mixture.

7

Enter fraction by weight/mol for component <n>

Provide the weight or mole fraction of each component. Ensure the total adds up to 1.0. If not, the program will internally normalize the values.

8

Options for accepting or rejecting composition data

Choose whether to accept or refect the composition data.

9

Options for energy list for output data

Select a predefined energy grid. Options include standard, extended, and grids based on characteristic X-rays and photon emissions from various radioactive isotopes.

10

Options for cross-section library selection

Select which photon data library to use for calculations.

11

Specify file on which output is to be stored

Provide a name for the output file (e.g., output). The file will be saved in .xlsx format. You may also specify a full path to save it in a different location.

Using an Input File

Alternatively, you can prepare an input file with all the required inputs and run MATXCOM using this file. The input file contains the data that you’d give to the program if you were answering the prompts. This is particularly useful for repeated calculations or automating the process.

Creating an Input File

  1. Open a text editor (e.g., Notepad).

  2. Enter the required inputs, each on a new line, as shown in the example below.

  3. Save the file (e.g., input.txt) on the same directory as the program.

Note

  • The lines correspond to the prompts in the order MATXCOM expects them.

  • Ensure that there are no extra blank lines or missing inputs in your file.

  • The program will read inputs line by line, so the order and completeness of the inputs are crucial.

Here is an example input file for MATXCOM using the composition of Boron Frits-baryte Concrete:

Input File

Running MATXCOM with the Input File

  • Using Windows PowerShell

    1. Open Windows PowerShell.

    2. Navigate to the directory containing matxcom.exe and your input file input.txt.

    3. Run the following command:

    Get-Content input.txt | .\matxcom
    
  • Using Command Prompt

    1. Open Command Prompt.

    2. Navigate to the directory containing matxcom.exe and your input file input.txt.

    3. Run the following command:

    .\matxcom < input.txt
    

An output file will be created contining the calculated data. The name and location of the output file will as designated in the input of the program. The output data is comma seperated and it makes sense to save it with an extension .csv. This file can be opened in Excel or MATLAB for post-processing.

Using a Wrapper

The third option to use MATXCOM is using a wrapper function. By calling this wrapper function, MATXCOM can be run inside a programming environment like MATLAB or Python. Please check the repository for available wrapper functions.