Git Product home page Git Product logo

mecha's Introduction

V 2.1 DOI

V 2.0

V 1.0

MECHA

Description

MECHA is an explicit cross-section model of the root hydraulic anatomy which connects hydraulic concepts across scales.

The model computes horizontal water flow at the level of individual cells, quantifies the contribution of water composite pathways, and predicts root radial permeability (kr), using detailed anatomical descriptions and experimental data on the permeability of cell walls (kw), membranes (Lp) and the conductance of individual plasmodesmata (KPD).

Installation

Conda/Mamba

conda env create -f environment.yml

conda activate mecha_env

Use

MECHA uses four parameters files as input, stored in the /in folder in the Projects MECHA directory:

Projects/<name_of_the_project>/in/

General.xml : General simulation parameters BC.xml : Boundary conditions for the simulation. This is where you choose wether the soil is dry, wet, or only partially touch the root. Geometry.xml : Parameters for the root section geometry. This is where you define which root section to use in the simulation. Hydraulics.xml : Hydraulic parameters of the different variables in the simulation

Run MECHA

python MECHA.py

OUPUT FILES MECHA output files in a folder defined in the General.xml input file, under the Output tag. Different type of files are generated:

*.PVTK files : These are geometry files that can be open in Paraview Macro_prop_i.txt files : Theses files contain synthetic informations about the simulation results. They contain the radial data.

Cite

Valentin Couvreur, Marc Faget, Guillaume Lobet, Mathieu Javaux, François Chaumont, Xavier Draye, Going with the Flow: Multiscale Insights into the Composite Nature of Water Transport in Roots, Plant Physiology, Volume 178, Issue 4, December 2018, Pages 1689–1703, https://doi.org/10.1104/pp.18.01006

Licence

MECHA is released under a GPL-3 licence, which means that redistribution and use in source and binary forms, with or without modification, are permitted under the GNU General Public License v3 and provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

mecha's People

Contributors

heymansadrien avatar guillaumelobet avatar valentincouvreur avatar mphiel avatar

Stargazers

Marco D'Agostino avatar Koji Noshita avatar Etienne Richan avatar

Watchers

James Cloos avatar  avatar

mecha's Issues

MECHA code version 1.0

Detailed descriptions of the model, outputs and maize root cross-section can be found here:
http://biorxiv.org/content/early/2017/06/07/147314

More details on the attached pearl millet root cross-section can be found here:
Passot S, Gnacko F, Moukouanga D, Lucas M, Guyomarc’h S, Moreno Ortega B, Atkinson JA, Belko MN, Bennett MJ, Gantet P, Wells DM, Guédon Y, Vigouroux Y, Verdeil J-L, Muller B and Laplaze L. (2016) Characterization of pearl millet root architecture and anatomy reveals three types of lateral roots. Frontiers in Plant Science. 7:829.

MECHA code version 2.0

  1. System requirements
    The current version of MECHA works in the Anaconda environment and was developed on Windows 10 with the IDE Spyder 3.3.6.
    A Matlab license is required to run the inverse modelling program. Versions dating back to MatlabR2010a have been successfully tested.
    The code currently uses the search algorithm fmincon or other algorithms from the Global Optimization toolbox of Matlab.

  2. Installation guide
    To install Anaconda (free), you can follow this guide: https://docs.anaconda.com/anaconda/install/index.html
    Running the latest version of MECHA (MECHA_4Dsolute.py) requires Python 3.7 and the installation of the following libraries:
    numpy
    scipy
    networkx 1.9.1
    lxml
    When first opening "MECHA_4Dsolute.py" (e.g. in the Spyder IDE), one needs to update the directory referred to at line 5 of the code from "dir='C:/Users/couvreurv/Desktop/MECHA_4Dsolute/'" to the actual directory where the code is located.
    When first opening "MECHA4D_trace_optim.m" in Matlab, one needs to update the directory referred to at line 15 of the Matlab script from "data.python_exe_dir='C:\Users\couvreurv\AppData\Local\Continuum\anaconda3\python.exe'" to the actual location of the python.exe file on your computer.
    Depending on whether the user has Anaconda and Spyder installed already, installation can take from a few minutes to less than 30 minutes.

  3. Demo
    To run the demo, simply run "MECHA4D_trace_optim.m" in Matlab.
    This demo optimizes the values of xylem water flow rate and diffusion coefficients in cell walls, plasmodesmata and xylem vessels, in order to fit xylem D2O wash-out traces.
    The expected output values for parameters should be similar but not equal to the ones reported in the manuscript Supplementary Table 2 because of the random component in the search algorithm.
    Running the code typically takes a day or two depending on the specifications of the laptop.

  4. Instructions for use
    Go to /Projects/Flavius/MECHA4D_trace_optim.m and run this inverse modelling program in Matlab.
    Specifically:

  • MECHA4D_trace_optim.m runs the optimization;
  • run_MECHA_Diff.m runs MECHA_4Dsolute with updated input parameter values;
  • Hydr_xml.m writes the input file for hydraulic parameters (in_traces/Hydraulics_optim.xml);
  • Geom_xml.m writes the input file for geometrical parameters (in_traces/Geometry_optim.xml);
  • BC_xml.m writes the input file for boundary conditions including xylem water flow rate (in_traces/BC_optim.xml);
  • Horm_in_xml.m writes the input file for solute transport parameters (in_traces/Hormones_optim.xml) for the D2O wash-in phase;
  • Horm_out_xml.m writes the input file for solute transport parameters (in_traces/Hormones_optim.xml) for the D2O wash-out phase;
    The .pvtk outputs located in MECHA_4Dsolute\Projects\Flavius\out\M1v4\Arabido\Washin_washout\Optim_traces* can be viewed using the software Paraview.
    Output parameter values can be found in the variables explorer and are automatically saved in a .mat file.
    Other pieces of information such as root Lpr (called kr in outputs) can be found in the output file "MECHA_4Dsolute\Projects\Flavius\out\M1v4\Arabido\Washin_washout\Optim_traces1\Macro_prop_
    .txt".

For more information, feel free to contact [email protected]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.