pyMELTScalc
Project description
ReadTheDocs
https://pymeltscalc.readthedocs.io/en/latest/
pyMELTScalc
Petrological calculations using the MELTS or thermodynamic databases. Through integration with the pyMAGEMINcalc repository, calculations can also be performed using the thermodynamic database of Holland et al. (2018).
Using MELTS
As a default, this package uses the MELTS algorithms and the alphaMELTS for Python package, developed by Dr Paula Antoshechkina, to perform the thermodynamic calculations. Therefore, it is neccessary for any user to first download the alphaMELTS for Python package. Luckily, version 1.2.0beta of MELTS for Python is included in this repository and we have extensively checked that this version of MELTS for Python works with out code. Future versions of MELTS for Python might be available via: https://magmasource.caltech.edu/gitlist/MELTS_Matlab.git/ although we caution that newer versions of MELTS for Python may not be compatible with pyMELTScalc.
Prior to any calculations, the user must add the location of the meltsdynamic.py file to the path using import sys; sys.path.append(dir).
Using MAGEMin
This package also provides the user to perform calculations using the thermodynamic database of Holland et al. (2018). This is made possible through the recent development and release of MAGEMin (https://github.com/ComputationalThermodynamics; https://doi.org/10.1029/2022GC010427), with Julia functions called from Python used to run the calculations.
Before this package can be used, the Julia code used to compile and run the MAGEMin calculations, which is hosted in a separate repository, must be imported and added to Julia. First, you will need to open Python and install the PyJulia packages by running the following lines: import julia julia.install()
Then, the MAGEMinCalc functions can be installed via:
-
Install Julia (https://julialang.org/downloads/).
-
Open Python and install Julia via: a."pip install Julia" b. import julia c. julia.install()
-
Run Julia and add the MAGEMinCalc package via the following commands: a. import Pkg b. using Pkg c. Pkg.add(url = "https://github.com/gleesonm1/MAGEMinCalc")
Finally, the pyMAGEMINcalc package can be installed in a Jupyter terminal via: !pip install "https://github.com/gleesonm1/pyMAGEMINcalc/archive/refs/tags/v0.0.1.zip"
Current calculations
At the moment, only a small selection of calculations are possible in pyMELTScalc, but this is expected to expand rapidly in the future.
Currently, users can:
- Search for melt liquidus temperatures.
- Run isobaric, polybaric, and isochoric crystallisation models.
- Perform barometry (and hygrometry) calculations by searching for the P, H2O and fO2 values required for multi-phase saturation to occur.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyMELTScalc-0.1.23-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a3cea13bde4adadab94b051ac67236a42476f072d6a5a47e7ddad9a69ef055b |
|
MD5 | 85f807901ca46dd4da20aa523963b502 |
|
BLAKE2b-256 | db8d7ce8d3011d070b8a6f95f9053f4c3b36f5f50d873dc43b18b963a98e1704 |