News:

alphaMELTS 2.3 standalone & for MATLAB/Python is now open source and available on GitHub (https://github.com/magmasource/alphaMELTS).
alphaMELTS 1.9 is available at the legacy download and information site.
For news of all MELTS software see the MELTS Facebook page.

Main Menu

enabling trace elements with alphamelts?

Started by elipes, January 06, 2026, 01:20:45 PM

Previous topic - Next topic

elipes

Hi Paula,

I'm struggling with what may be a fairly basic problem with alphaMELTS in getting the program to read trace elements in my input .txt file. The alphaMELTS manual states I need to set ALPHAMELTS_DO_TRACE to true before reading in the file but I currently don't see any option to do that in a command window.

I call the entire directory containing AlphaMELTS:

elizabeth.p@Elizabeths-MacBook-Pro-3 AlphaMELTS % alphamelts_macos
ALPHAMELTS_CALC_MODE not set!

---> Default calculation mode is rhyolite-MELTS (v. 1.0.2).  Change this? (y or n): y
     Set calculation mode to rhyolite-MELTS (public release v 1.1.0)? (y or n): n
     Set calculation mode to rhyolite-MELTS (public release v 1.2.0)? (y or n): n
     Set calculation mode to pMELTS (public release v 5.6.1)? (y or n): y
---> Calculation mode is pMELTS (public release v 5.6.1).

From here I can read in my input file, as follows:

Here's my input file:
Title: Sample average
Initial Composition: SiO2 46.8
Initial Composition: TiO2 0.18
Initial Composition: Al2O3 3.87
Initial Composition: Cr2O3 0.44
Initial Composition: FeO 9.24
Initial Composition: Fe2O3 0.01
Initial Composition: MgO 36
Initial Composition: CaO 3.06
Initial Composition: Na2O 0.051
Initial Trace: Zr 10.5
Initial Trace: Hf 0.283
Initial Trace: Y 4.3
Initial Trace: Sc 16.2
Initial Temperature: 1200.00
Final Temperature: 1200
Initial Pressure: 1
Final Pressure: 1
Increment Pressure: -100
Log fO2 Path: None
Log fO2 Delta: None
mode: fractionate liquid
output: both

It reads the file fine until it gets to Zirconium and says: Error during input file read, offending record: initial trace: zr 10.5.

How can I get around this? Thank you in advance for any insight into solving this!!

Best wishes, Elizabeth P (Univ. of Florida)

Paula

Hi Elizabeth,

The "Initial Trace:" line and the environment variables like ALPHAMELTS_DO_TRACE are from alphaMELTS 1.9. So for now, delete those lines and see if the calculation runs.

Note that in alphaMELTS 2+ the "Log fO2 Delta:" line is now "Log fO2 Offset:" for consistency with other MELTS software.

Trace elements are coming to the newer alphaMELTS software soon, though they will be implemented for the Python version and PetThermoTools first.

There is a new, easier installation procedure for alphaMELTS 2.3.2. It's currently in beta and not documented on the Github site yet, but if you email me (click the envelope under my avatar) then I'll send you an invitation to the alphaMELTS Discord server and I can walk you through installation there.

Cheers,
Paula