News:

alphaMELTS 1.9 is available at the download and information site.
alphaMELTS 2 standalone & for MATLAB/Python are available on request
(see the Version 2 tab on the download site for more details).
For news of all MELTS software see the MELTS Facebook page.

Main Menu

[EX] Rhyolite-MELTS (GUI) version of tutorial: 'Quick start using MELTS'

Started by Paula, June 20, 2012, 05:13:47 PM

Previous topic - Next topic

Paula

This topic will show you how to work through one page of the (old) MELTS tutorial, using the current downloadable rhyolite-MELTS software:

Testing MELTS installation using the sample input file - Try this first

The page is part of the 'Getting Started: Testing and Examples' section of the MELTS manual, written by Mark Ghiorso for the original graphical-user-interface (GUI) version. The idea of this topic is to show how the GUI has evolved since its original release and as a comparison with the alphaMELTS and other versions of the same tutorial. This post is for rhyolite-MELTS 1.0.2, 1.1.0, 1.2.0 / pMELTS version 5.6.1 (updated from rhyolite-MELTS version 1.0.1 / pMELTS version 5.0.0).

The software can be downloaded from the MELTS website. This links page summarizes the download options and installation procedures for various flavors of Mac and Linux, and for MELTS versus rhyolite-MELTS. The screen output in this particular example is from a rhyolite-MELTS run on the Windows Subsystem for Linux but almost all the information applies to Mac and Linux users too.

This example uses an input file that has been modified from the Morb.melts file used in the original tutorial. The modifications simply bring it up to date with the latest GUI versions of MELTS and do not affect software results. Early versions of the MELTS software used a 'Mode: Fractionation' line in the input file to to select fractional crystallization, whereas in later versions this is replaced by 'Mode: Fractionate Solids'. Also some phases were suppressed in the original tutorial because the solid solution models were still being developed / tested. None of the phases are stable for the run conditions of the tutorial example, so suppressing these phases has no effect. However, the 'Suppress:  ' lines can cause read errors as the names of some phases have changed slightly since (see here).

If you have downloaded and installed alphaMELTS then the modified Morb.melts file will be in the installation folder and you can copy it from there. Otherwise, copy the contents of the file from the reply below and save it as 'Morb.melts'. Note that the version of Morb.melts available on the MAGMA Source server is the same except that it has Windows line endings but the morb.melts version linked on the Mac OS X download site differs slightly in Cr2O3 content and in the P-T conditions.

When the original tutorial was written there was only one liquid calibration (i.e. MELTS) and so the software could be started by double-clicking it. Now it must be opened in a Terminal program and a choice between rhyolite-MELTS, with or without the mixed H2O-CO2 fluid, and pMELTS made before the user interface is initialized. In MacOS the Terminal program may be used and is found using Finder in Applications/Utilities. Depending on the exact flavor of Linux being run, a Terminal program may be located in a submenu of the Applications menu, or accessible via a Desktop launcher or context menu (mouse right click). In VM alphaMELTS the LXTerminal icon is located next to the start menu. On Windows 10 with the Windows Subsystem for Linux (WSL), open the ubuntu command line app and start the X11 server (Xming or X410).

Navigate to the folder where you want the output files to be written. If this is the same folder where the rhyolite-MELTS executable is located then type './Melts-rhyolite-public'. If the rhyolite-MELTS executable is located elsewhere you may need to type the path, either absolute or relative. Alternatively, if the rhyolite-MELTS executable is located in a folder that appears in your PATH variable (try typing 'echo $PATH' at the terminal command line) then you can just type 'Melts-rhyolite', or similar, without the './' beforehand (replace 'Melts-rhyolite' with whatever the executable, or link to it, is actually called). You will be presented a choice that looks something like this:

Quote

<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
rhyolite-MELTS (1.0.2, 1.1.0, 1.2.0) pMELTS (5.6.1) - (Aug 16 2018 - 13:50:34)
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
---> Reading environment variables...
<><> There are three releases of rhyolite-MELTS and a version of pMELTS included in this package:
     (*) rhyolite-MELTS v. 1.0.2 (original version, with corrections) - old H2O model, no mixed fluids.
     (*) rhyolite-MELTS v, 1.1.0 (mixed fluid version that perserves the ternary minimum) - old H2O model.
     (*) rhyolite-MELTS v. 1.2.0 (mixed fluid version optimal for mafic and alkalic melts) - new H2O model.
     (*) pMELTS v. 5.6.1 (original version, with corrections) - - old H2O model, no mixed fluids.
<><> Visit the website melts.ofm-research.org for information on which version to use for your application.
---> Default calculation mode is rhyolite-MELTS (v. 1.0.2).  Change this? (y or n):

There is more explanation of the various MELTS versions in the MELTS decision tree. However, rhyolite-MELTS 1.0.2 should give identical results to the original MELTS model for the bulk composition used here. So, choose 'n' and press enter, which should start up a graphical user interface that looks something like the screenshot below. If the graphical user interface does not open, then check the alphaMELTS links page and operating system-specific boards here for troubleshooting hints.


The first thing you will notice is that the great big AFM plot shown in the original screentshot is missing. Don't get your hopes up with the 'Graphics Display Window' button either - depending which MELTS executable you have, you may find that the Melts Graphics Output Window is inactive or you may be able to open the window, and the 'Graphics Options Dialog', but when you go to plot something you will get a message like 'Selected option has not yet been implemented'. In fact, the graphics are disabled in all current GUI versions of MELTS and rhyolite-MELTS (including CORBA MELTS). Many more plotting tools are widely available now, than when MELTS was first released, so that it is not a worthwhile use of time to keep the MELTS plotting routines up to date as the underlying graphics software (Grace) changes. The other Icons don't do much either, unfortunately, but you can find links to the Supplemental Calculator (a.k.a the Phase Properties calculator) here and tools for processing the output files here.

O.K. that's all the bad news over, it should be plain sailing from now on!

Follow the instructions in the original tutorial to open the Morb.melts file. The only minor difference will be that the 'Execution Mode' option will be disabled (it's supposed to be grayed out like that; that it wasn't at first was a bug).


By default the program looks for .melts files, so if your input file is called, say, 'Morb.txt' then change '*.melts' to '*.txt' in the Filter box and then press the Filter button. You can also change the folder name in the Filter box and / or navigate around folders by double-clicking them under 'Directories', where '.' is the current folder and '..' is one level up in the folder hierarchy. If you get an error message during the file read then you probably have an incompatible Morb.melts file (e.g. it has Windows line endings and / or an outdated 'Mode: Fractionation' line); in many cases, the bulk composition will still be read in correctly but you will need to switch fractional crystallization on manually by selecting 'Fractionate Solids' under the 'Options' menu. If you see no changes to the Bulk System panel then make sure to select the Morb.melts / Morb.txt file (even if it's the only one in the folder) before clicking the 'OK' button in the 'Open...' pop-up dialogue.

Although the front-end program looks a little different to the one in the original tutorial, the settings for the underlying MELTS algorithm should now the same as described in the 'Four things have been accomplished:' list there.  You can verify that the P-T conditions are set correctly by selecting 'Intensive Variables', then 'T, P ...'.

The remaining steps in the tutorial can be followed as is. If you get a message like 'Error in SILMIN file output procedure. Cannot open file: ' then either some other program is accessing the file or, more likely, you started the MELTS executable in a folder that you do not have write access to (e.g. /Applications when running as a non-Administrator on Mac). When it is finished the program window will look like this:


As with the alphaMELTS run there will be slight discrepancies between the newly generated melts.out file and the original output file. The most striking differences are the addition of Mn, Co and Ni to the olivine solid solution model, though none of these components are in the Morb.melts bulk composition, and splitting of the pyroxene phase into separate clinopyroxene and orthopyroxene phases (see here). The phase compositions are essentially the same though and differences in the phase masses are a few hundredths of a gram, at most.

If there are any problems or feedback about this post then please let me know.

Cheers!
Paula

Paula

Copy and paste this into an editor that will use the correct line-endings. For example, on most systems you can type 'nano Morb.melts' in the Terminal program, and paste by right-clicking the mouse.

Title: Allan et al. 1989 (see Ghiorso 1997)
Initial Composition: SiO2 48.68
Initial Composition: TiO2 1.01
Initial Composition: Al2O3 17.64
Initial Composition: Fe2O3 0.89
Initial Composition: Cr2O3 0.03
Initial Composition: FeO 7.59
Initial Composition: MgO 9.10
Initial Composition: CaO 12.45
Initial Composition: Na2O 2.65
Initial Composition: K2O 0.03
Initial Composition: P2O5 0.08
Initial Composition: H2O 0.20
Initial Temperature: 1200.00
Final Temperature: 1000.00
Increment Temperature: 3.00
Initial Pressure: 500.00
Final Pressure: 500.00
Increment Pressure: 0.00
dp/dt: 0.00
log fo2 Path: None
Mode: Fractionate Solids

Make sure there are no blank lines before you save.

magmaSteve96

How does one plot that data? I've put it into Matlab but I have no idea how to plot it. Granted, I'm not the best at using matlab either.

Thank you.

Paula

I recommend you try MELTS for Excel's Combine tbl tool.

For MATLAB, you want to use the Import Data tool to open the output files, as that will set up variables that you can plot with - don't double click the .tbl files. Depending on the version of MacOS or MATLAB that you have, you may need to rename the .tbl files to a recognized ending like .txt or .csv.

Paula

magmaSteve96

Hello, how does one find the melts.out (on a mac) file after running melts?

Paula

Don't double-click the rhyolite-MELTS executable (as I already on the fb thread) ;)

https://magmasource.caltech.edu/forum/index.php/topic,823.0.html

The melts.out file will be generated automatically, but is more for browsing than plotting. The .tbl files, which are good for plotting, will be in the same place...

Paula

magmaSteve96

Hello Professor Paula,

I tried what you suggested, I opened terminal and did what you said, but I got error messages on my mac.

I'm sorry to burden you, but is there a way you or someone else could do a very short video on this? It doesn't have to be super detailed if you don't want it to. But a step-by-step video on how to do what you've suggested could be helpful. Cause I'm stuck. The professor of my class doesn't know how to help as well. We're all stuck at home because of the corona virus so I can't meet him to work it through either.

Paula

No. How can anyone do a very short video on "this" when you don't say what "this" is? If you say which of the suggestions you have tried (including those from the fb thread), and what the error messages you got were, then I can probably tell you how to fix the problem. But I can't help when your query is so vague.

We are all stuck at home and, not that it's really anyone's business, that means I have a lot of extra responsibilities right now. Please be patient.

Paula

(not a professor)

magmaSteve96

No worries. I've found a solution. Thank you, someone in my department has been able to help.

Paula

Great, I'm glad you were able to sort it out. Good luck with your class.

Best,
Paula

chengkaide

Hello everyoneï¼Å'when I finish this processï¼Å'I don not know how to find the outputfile in linux.
If someone know use which software to plot the data, please answer me or contact me.
thank you very much.

Paula

Hi,

Where the output files are will depend a bit on how you started rhyolite-MELTS, but generally they will be in the folder where the rhyolite-MELTS executable is running. If you double-clicked Melts-rhyolite-public executable, or opened it in terminal with './Melts-rhyolite-public' then they will be in the same folder as that. If you are using the VM alphaMELTS and double-clicked the desktop rhyolite-MELTS icon then the output will be in the 'melts' user home space. There are more details here:

https://magmasource.caltech.edu/forum/index.php/topic,824.0.html

Similarly for output, it depends a bit what you have available. If you have access to Windows Excel then "Combine tbl" is really useful:

https://magmasource.caltech.edu/forum/index.php/topic,828.0.html

Otherwise, the .tbl files can be imported into LibreOffice, Python, MATLAB on Linux. I like gnumeric for quick opening a .tbl file for viewing because you don't have to go through any dialogue boxes. E.g. from the terminal command line:
Quote
gnumeric clinopyroxene.tbl &
I don't know what the plotting capabilities of gnumeric are like, but you can export to .xlsx or .ods (the LibreOffice equivalent). If importing into LibreOffice directly, make sure to create a new spreadsheet first, else it will open the .tbl file in the Word-like program instead of the Excel-like one.

Best,
Paula

chengkaide

Thank you very much.
I try the MELTS FOR Excel.
It is good ;).

Paula