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

How to suppress clinopyroxene2 in alphamelts for MATLAB

Started by Zhenjiangwang_cug, March 10, 2026, 05:35:25 AM

Previous topic - Next topic

Zhenjiangwang_cug

Hi Paula,
I am simulating the reaction process between basalt and cumulate rocks (opx+cpx+pl). Based on petrological analysis, Opx should participate in the reaction, but my simulation results show that only cpx and pl are involved in the reaction. Additionally, an unexpected observation is that two clinopyroxene phases (clinopyroxene1 and clinopyroxene2) appear in the mineral phase results instead of the expected single cpx phase and participating opx.
My key question is: how can I modify the code in the alphaMELTS for MATLAB version to suppress the formation of the clinopyroxene2 phase? I suspect that resolving this issue may also help clarify why opx is not participating in the reaction as expected.
I would be extremely grateful if you could provide any insights, suggestions, or guidance on modifying the relevant code sections to achieve this. Please let me know if you need any additional details about my simulation setup, input parameters, or current code implementation to assist with this inquiry.

Paula

The way settings are applied in the MATLAB version deliberately overlaps with how you set things in a .melts file in the standalone alphaMELTS, easyMelts etc. If the .melts line would start with "Initial..." or "Final..." or is a "Mode:" constraint that describes the PT path (e.g. "Mode: isenthalpic") then you are going to do things the MATLAB way. But for open versus closed behavior and other settings you use string arrays that mimic the .melts file lines, one setting per row. Two formats are currently accepted - separated into keys and values or delimited by a colon like in the .melts file e.g:

settings = ["Log fO2 Path" "FMQ";...
      "Log fO2 Offset" "-1";...
    "Mode" "Fractionate Solids"];
settings = ["Log fO2 Path: -1FMQ";...
    "Mode: Fractionate Solids"];
disp(settings)
 
ptpath.engine.setSystemProperties(settings);

Case doesn't matter but numerical values like -1 should be passed as strings. A third option is coming soon to both MATLAB and Python versions to have a dictionary of keys and values. Also note that you don't have to pass all the settings in one call - past settings will continue to be stored in MELTS for subsequent calculations unless you change them or make a new MELTSdynamic instance.

In alphaMELTS 1.9 there was a .melts file line "Limit coexisting:". In alphaMELTS 2+ and the MATLAB/Python versions it is "Limit number:". So you could try setting "Limit number: clinopyroxene 1" to see if that suppresses the pigeonite and stabilises orthopyroxene instead.

You can also use "Limit number:" to turn on phases after previously suppressing them. For example, "Suppress: clinopyroxene" is synonymous with "Limit number: clinopyroxene 0". "Limit number: clinopyroxene 1" or "Limit number: clinopyroxene 2" would each have the effect of undoing a "Suppress: clinopyroxene" line.

Best wishes,
Paula

Zhenjiangwang_cug

Thank you for your prompt and detailed reply. Your guidance has been a great help to me, and I will try to make corrections accordingly based on your suggestions.
I appreciate your time and support.