============================================================ README – REFLEX (MATLAB Compiled Application for Linux) ============================================================ REFLEX is a MATLAB-compiled application. MATLAB is NOT required to run this program. The only requirement is MATLAB Runtime: MCR_R2017a_glnxa64_installer.zip ------------------------------------------------------------ 1. Installation of REFLEX ------------------------------------------------------------ 1. Download the REFLEX archive (for Linux). 2. Extract the archive into a directory named for example: reflex54 3. Place the directory anywhere you want (e.g. in your home directory). ------------------------------------------------------------ 2. Folder Contents ------------------------------------------------------------ The reflex54 directory contains: - reflex54 : Main executable - run_reflex54.sh : Launch script (recommended) - data/ : Directory where reflectivity measurements must be placed - database/ : Physical database REQUIRED for computing optical constants (qc, delta, beta) of compounds - databaseN/ : Additional REQUIRED database used for material properties and optical calculations - splash.png : Splash screen image - readme.txt : This documentation file IMPORTANT: The directories database/ and databaseN/ are NOT optional. They are essential for the calculation of qc, delta and optical properties of different compounds. ------------------------------------------------------------ 3. What is MATLAB Runtime? ------------------------------------------------------------ REFLEX was compiled using MATLAB Compiler. Compiled MATLAB applications require MATLAB Runtime (MCR), a free set of shared libraries provided by MathWorks. No MATLAB license is required. IMPORTANT: The MATLAB Runtime version MUST match the MATLAB version used for compilation (R2017a). ------------------------------------------------------------ 4. Install MATLAB Runtime (Linux) ------------------------------------------------------------ 1. Unzip the installer: unzip MCR_R2017a_glnxa64_installer.zip cd MCR_R2017a_glnxa64_installer 2. Run the installer: sudo ./install 3. Follow the installation instructions. NOTE: The MATLAB Runtime installation may take several minutes. This is normal. Please be patient and let the installation complete. By default, MATLAB Runtime is installed in: /usr/local/MATLAB/MATLAB_Runtime/v92 ------------------------------------------------------------ 5. Prepare the Application (IMPORTANT) ------------------------------------------------------------ Before running REFLEX for the first time, Linux must be allowed to execute the program files. This is a ONE-TIME operation. Open a terminal and navigate to the reflex54 directory: cd /path/to/reflex54 Authorize execution of the program and launch script: chmod +x reflex54 chmod +x run_reflex54.sh (This simply allows Linux to run the files. It does not install anything or modify the system.) ------------------------------------------------------------ 6. Run REFLEX ------------------------------------------------------------ Recommended method (using the provided script): ./run_reflex54.sh /usr/local/MATLAB/MATLAB_Runtime/v92 This script automatically sets all required environment variables. NOTE: The FIRST TIME REFLEX is launched, startup may take significantly longer. This is normal and only happens once. Subsequent launches will start much faster. ------------------------------------------------------------ 7. Running Without the Script (Advanced) ------------------------------------------------------------ For advanced users only, environment variables can be set manually: export LD_LIBRARY_PATH=/usr/local/MATLAB/MATLAB_Runtime/v92/runtime/glnxa64:\ /usr/local/MATLAB/MATLAB_Runtime/v92/bin/glnxa64:\ /usr/local/MATLAB/MATLAB_Runtime/v92/sys/os/glnxa64 ./reflex54 ------------------------------------------------------------ 8. Common Issues ------------------------------------------------------------ • Error: "libmwmclmcrrt.so not found" → MATLAB Runtime not installed or wrong version used. • Permission denied → Execution rights not set (see section 5). • Application appears frozen at first launch → This is normal. Please wait. • Application does not start → Verify the runtime path passed to run_reflex54.sh. ------------------------------------------------------------ 9. Summary ------------------------------------------------------------ 1. Extract the REFLEX archive into reflex54 2. Install MATLAB Runtime R2017a (Linux 64-bit) (installation may take time) 3. Runtime location: /usr/local/MATLAB/MATLAB_Runtime/v92 4. Authorize execution of the program (one-time step) 5. First launch may be slow, subsequent launches are fast 6. Launch REFLEX using run_reflex54.sh ------------------------------------------------------------ For questions or support, please contact the REFLEX developer. ------------------------------------------------------------