dataesr/scientific-paragraphs-categorization huggingface dataset:
Acknowledgements Analyses in Brno were supported by  Ministry of Health of the Czech Republic , grant no. 16-34272A. Computational resources by the  CESNET LM2015042  and the  CERIT Scientific Cloud LM2015085 , under the programme " Projects of Large Research, Development, and Innovations Infrastructures". Analyses in the Monza (Centro Ricerca Tettamanti, SS, AG, GF and GC) laboratory  were supported by the  Italian Association for Cancer Research (AIRC)  and  Comitato Maria Letizia Verga. Analyses in the Paris (Necker, AP-HP) laboratory  were supported by the  Ile de France CancéroPôle. Analyses in Prague were supported by AZV  16-32568A , and  PRIMUS/17/MED/11. Design of IGK assays and analyses in Nijmegen and Rotterdam laboratories were supported by an  Innovation  project granted by the  Zorgverzekeraars Nederland  (number  2017-3442 ).
The numerical simulation of the diffusion MRI signal arising from complex tissue micro-structures is helpful for understanding and interpreting imaging data as well as for designing and optimizing MRI sequences. The discretization of the Bloch-Torrey equation by finite elements is a more recently developed approach for this purpose, in contrast to random walk simulations, which has a longer history. While finite elements discretization is more difficult to implement than random walk simulations, the approach benefits from a long history of theoretical and numerical developments by the mathematical and engineering communities. In particular, software packages for the automated solutions of partial differential equations using finite elements discretization, such as FEniCS, are undergoing active support and development.
However, because diffusion MRI simulation is a relatively new application area, there is still a gap between the simulation needs of the MRI community and the available tools provided by finite elements software packages. In this paper, we address two potential difficulties in using FEniCS for diffusion MRI simulation. First, we simplified software installation by the use of FEniCS containers that are completely portable across multiple platforms. Second, we provide a portable simulation framework based on Python and whose code is open source. This simulation framework can be seamlessly integrated with cloud computing resources such as Google Colaboratory notebooks working on a web browser or with Google Cloud Platform with MPI parallelization. We show examples illustrating the accuracy, the computational times, and parallel computing capabilities.
Introduction The numerical simulation of the diffusion MRI signal arising from complex tissue micro-structures is helpful for understanding and interpreting imaging data as well as for designing and optimizing MRI sequences. It can be classified into two main groups. The first group is referred to as Monte-Carlo simulations in the literature and previous works include  [1, 2, 3, 4, 5]. Software packages include the UCL Camino Diffusion MRI Toolkit  [6] , which has been widely used in the field. The second group of simulations relies on solving the Bloch-Torrey PDE in a geometrical domain, either using finite difference methods (FDM)  [7, 8, 9, 10] , typically on a Cartesian grid, or finite element methods (FEM), typically on a tetrahedral grid. Previous works on FEM include  [11]  for the short gradient pulse limit of some simple geometries,  [12]  for the multi-compartment Bloch-Torrey equation with general gradient pulses, and  [13]  with the flow and relaxation terms added.
The discretization of the Bloch-Torrey equation by finite elements is a more recently developed approach for the purpose of dMRI simulations, in contrast to random walk simulations, which have a longer history. While finite element discretization is more difficult to implement than random walk simulations, the approach benefits from from long-established theoretical and numerical developments by the mathematical and engineering communities. In particular, software packages for the automated solutions of partial differential equations using finite element discretization, such as FEniCS  [19, 20] , are subject to active support and development. However, because diffusion MRI simulation is a relatively new application area, there is still a gap between the simulation needs of the MRI community and the available tools built on top of these finite elements software packages.
The deployment of FEniCS containers  [21]  opens a new direction to improve productivity and sharing in the scientific computing community. In particular, it can dramatically improve the accessibility and usability of high-performance computing (HPC) systems. In this paper, we address two potential difficulties in using FEniCS for diffusion MRI simulation. First, we simplified software installation by the use of FEniCS containers that are completely portable across multiple platforms. Second, we provide a simulation framework written in Python and whose code is open source. This simulation framework can be seamlessly integrated with cloud computing resources such as Google Colaboratory notebooks (working on a web browser) or with Google Cloud Platform with MPI parallelization. One of the advantages of the simulation framework we propose here over the Matlab-based SpinDoctor  [18]  is that the Python code is free, whereas Spin-Doctor requires the purchase of the software Matlab.
Many researchers are now adopting Python since it is a free, cross-platform, general-purpose and high-level programming language. Plenty of Python scientific packages are available with extensive documentation such as SciPy for fundamentals of scientific computing, NumPy for large and multi-dimensional arrays and matrices, SymPy for symbolic computation, IPython for the enhanced interactive console, Pandas for data structures & analysis, Matplotlib for comprehensive 2D plotting. In addition, parallel computing for finite elements is relatively easy to implement within FEniCS, thus, this framework has advantages over SpinDoctor for very large scale problems. The disadvantage of this simulation framework compared to SpinDoctor is the current lack of high-order adaptive time-stepping methods in Python tailored to the kind of ODEs systems coming from finite elements discretization, whereas such time-stepping methods are available in Matlab.
Method For software portability, we consider two container technologies which are Docker  [32]  and Singularity  [33]. They allow for bundling the whole collection of software packages that a user needs in a single file, that can be shared and used by collaborators. This would make a huge impact in scientific applications, where reproducibility is a core concern  [34]. In particular, this enables us to develop software that other users can easily test. A software update reduces to a matter of downloading the newest version of a single file and different versions can coexist next to each other for easy consistency checks. We choose Docker for the IPython notebooks and Singularity for the deployment on HPC infrastructure. They follow the same workflow as the following Setting the working environment Pre-processing the meshes and other input parameters Solving the Bloch-Torrey equation Post-processing.
Diffusion MRI simulation library The solution of the Bloch-Torrey equation and other functionalities related to diffusion MRI simulations have been packaged into Python library DmriFemLib, saved in GitHub. Due to considerations related to the way FEniCS envisions the PDE solution workflow, and the fact that the PDE from the diffusion MRI simulation problem has some important differences from the typical PDEs for which FEniCS was designed, we made the following choices regarding the implementation of the numerical method that are different than the choices made in the Matlab-based toolbox SpinDoctor. These choices are: 1. the permeable interface conditions are imposed by the use of the partition of unity finite element method (PUFEM)  [35, 16] ; 2. the pseudo-periodic BCs coming from the periodic extension of the computational box are imposed on either side of the box face by a PDE transformation; 3.
Mesh generation Dealing with meshes is one of the most challenging problems in FEM and we inherit what has been done in Python and FEniCS regarding this issue. For simple geometries, one can internally use some built-in meshes. Meshing a box Ω = [0, 10] 3 with given resolutions nx, ny, nz is simply done by the following commands nx, ny, nz = 10 mesh = BoxMesh(Point(0. 0, 0. 0, 0. 0), Point(10. 0, 10. 0, 10. 0), nx, ny, nz) For more complicated geometries, it is recommended to use mshr  [36] , the mesh generation component of FEniCS, to generate simplicial DOLFIN meshes in 2D and 3D from geometries described by Constructive Solid Geometry or from surface files, utilizing CGAL and Tetgen as mesh generation backends. The commands below are used to generate a two-layered disk: from mshr import * R1, R2 = 5, 10; origin = Point(0.
,0. ); circle = Circle(origin, R1, segments=32) domain = Circle(origin, R2, segments=32) domain. set_subdomain(1, circle) mesh = generate_mesh(domain, 15) # 15 is the resolution More generally, our framework accepts meshes in the DOLFIN XML format  [37]. In this paper, the meshes were generated with GMSH  [38] , Salomé  [39] , and ANSA  [40]. The GMSH script (. geo) and Salomé script (. py) are available at https://github. com/van-dang/DMRI-FEM-Cloud/tree/mesh and they are distributed through examples discussed later in the paper. GMSH can be embedded in our framework import os # define mesh_name. os. system('gmsh -3 '+mesh_name+'. geo -o '+mesh_name+'. msh') All the formats need to be converted to DOLFIN XML format by the use of either dolfin-convert available with FEniCS or MESHIO  [41].
Python notebooks Google Colaboratory  [42]  is a free Jupyter notebook environment that requires no setup and runs entirely in the cloud. It can connect to either a hosted runtime provided by Google Cloud or a local runtime. The hosted runtime allows us to access free resources for up to 12 hours at a time and the current one, used to obtain the results presented in this paper, has the following configuration: • Operating system: Ubuntu 18. 04. 2 LTS • Processors: 2 x Intel(R) Xeon(R) CPU @ 2. 30GHz • RAM: 13 GB In order to check the configuration you can run the following commands. !cat /proc/meminfo #check RAM memory !lscpu #check processor !cat /etc/lsb-release #check distribution Fig. 3  shows a typical structure of our Google Colaboratory notebooks where the simulations can run directly since the setup of the FEniCS environment is done within the notebook.
The installation of FEniCS is quite straightforward in the hosted runtime. The command lines are just the same as the installation on Ubuntu. !apt-get install software-properties-common !add-apt-repository ppa:fenics-packages/fenics !sudo apt-get update !apt-get install --no-install-recommends fenics from dolfin import *; from mshr import * For longer executions, it is more convenient to connect to the local runtime. To this end, one can execute the following command lines to create a local runtime to which the notebook can connect. This command creates a Docker container from the latest stable FEniCS version at the time of writing, given with the fenics_tag variable. Inside this container, we install a Jupyter extension developed by Google Colaboratory's developers and then run a Jupyter notebook from within the container on port 8888.
Script-based interface For the script-based interface with parallel executions, the workspace is available at https: //github. com/van-dang/DMRI-FEM-Cloud/blob/master/GCloudDmriSolver. py Users can pre-process the inputs for one-and multi-compartment domain by respectively using the functions implemented at This workspace can work with Docker image by launching the following command from a Mac or Linux terminal docker run -ti -p 127. 0. 0. 1:8000:8000 -v $(pwd):/home/fenics/shared -w → /home/fenics/shared quay. io/fenicsproject/stable:current However, in the HPC context, Singularity is preferable to Docker due to the security, the accessibility, the portability, and the scheduling issues  [33]. Fortunately, it is straightforward to build a Singularity image from a Docker image and for our framework, the command lines are as follows • MRI_domain manages the finite element meshes, function spaces, domain sizes, diffusion tensors, permeability, and boundary markers.
General diffusion-encoding sequence The framework allows for arbitrary temporal profiles f (t). During the simulation, we need to compute its integral F(t) = t 0 f (s) ds and convert between b-value and the gradient strength g-value following Eq. (  6 ). In the Python version, SymPy is used to compute the symbolic integration. So, users only need to provide the expression of f (s) to the function member fs_sym of the class MRI_parameters(). F(t) and the conversion between b-value, g-value are automatically done. For example, a cos-OGSE sequence → tau ), ( 0. , True ) ). mp. Apply() # F(t) and the conversion between b and q are done here f (s) =        cos(ω s), if s ≤ δ -cos ω(s -τ ) , if τ < s ≤ δ + τ 0, otherwise (7).
Numerical validation and comparison Unless stated otherwise, the simulations were performed for a PGSE with ∆ = 43100µs, δ = 10600µs, b-values between 0 and 10000s/mm 2 , and the diffusion coefficient of D = 3 × 10 -3 mm 2 /s. The membrane between the compartments, if any, is permeable with the permeability of κ = 10 -5 m/s. The simulated signals are compared to the reference ones computed by the matrix formalism (MF) method  [45]. We provide a complete simulation method of diffusion inside the multilayered structures such as concentric disks, cylinders, spheres, and torus with the mesh generation software GMSH  [38]. First, we study diffusion inside a three-layered disk of [5, 7. 5, 10]µm with different settings of the initial conditions. Fig. 4a  shows the setting IC_array=[0, → 1, 0] as discussed in Section 3.
Realistic neurons We consider a population of 36 pyramidal and 29 spindle neurons. They are distributed in the anterior frontal insula (aFI) and the anterior cingulate cortex (ACC) of the neocortex of the human brain. They share some morphological similarities such as having a single soma and dendrites branching on opposite sides. This population consists of 20 neurons for each type in aFI, and 9 spindles, 16 pyramidals in ACC. We have published these volume meshes at https://github. com/van-dang/RealNeuronMeshes The solver is available at https://colab. research. google. com/github/van-dang/DMRI-FEM-Cloud/blob/ master/RealNeurons. ipynb Table  1  shows the computational time in minutes of neuron simulations on Google Colaboratory for a PGSE sequence with ∆ = 43100µs, δ = 10600µs, b = 4000 s/mm 2 and two different time step sizes ∆t = 50, 100µs.
Parallelization Now we verify the simulation performance with the Singularity image on a 12-month free trial of Google Cloud Platform (https://cloud. google. com) and Tegner (PDC -KTH). The script-based interface is used. It shares the core functionalities with the Python Notebook interface and supports all the functionalities discussed in the paper except the artificial permeability implementation which is still in development. So, the mesh needs to be periodic to have the pseudo-periodic BCs in the parallel execution. First, we show the simulation performance on one computational node on the neuron 04b_pyramidal7aACC (Fig. 11a ) with the mesh size of about 0. 6M vertices (2. 5M tetrahedrons) and the time discretization of ∆t = 200µs. A PGSE with ∆ = 43100µs, δ = 10600µs is used. The commands to execute the simulation with the FEniCS image are follows On Tegner with 20 processors, it costs about 7 minutes per one b-value whereas on Google Cloud with 8 processors, it costs about 30 minutes.
Discussion The proposed framework can be viewed as the Python version of the Matlabbased SpinDoctor. In this paper, we focused on advanced software features such as portability and parallelization. This framework inherits all of the PDE solution functionalities of FEniCS, thus, extensions and generalizations of the present dMRI simulation problem, including the coupling with flow, the simulation on deforming domains like the heart, or the coupling of simulations in manifolds with simulations in 3D domains, are rather straightforward. Similar to SpinDoctor, the present framework is supposed to be faster and more accurate than Monte-Carlo simulation packages such as Camino. More importantly, our approach benefits from a long history of theoretical and numerical developments by the mathematical and engineering communities.
It enhances software reliability which is one of the core concerns in medical applications. As other cloud-based software developments, this framework brings reproducible science and open-source software to computational diffusion MRI. It speeds up the method development process since the results are easy to confirm and new methods can be easily developed on top of the existing methods. New algorithms written as Google Colaboratory notebooks can quickly circulate in the MRI community and this allows for active collaboration between research groups. Since SpinDoctor couples the finite elements discretization with optimized adaptive ODE solvers, it is more efficient than our framework in terms of time discretization. The analogous ODE solvers written in Python can be found in the SciPy Library  [48]  but they are not ready to use within our framework: they do not yet efficiently support the mass matrix and the sparse Jacobian matrix.
Conclusions We proposed a portable simulation framework for computational diffusion MRI that works efficiently with cloud technology. The framework can be seamlessly integrated with cloud computing resources such as Google Colaboratory notebooks working on a web browser or with Google Cloud Platform with MPI parallelization. Many simulation needs of the field were addressed by the use of advanced finite element methods for both single-and muti-compartment diffusion domains, with or without permeable membrane and periodic boundaries. We showed the accuracy, the computational times, and parallel computing capabilities through a set of examples, while mentioning straightforward future extensions. The framework contributes to reproducible science and open-source software in computational diffusion MRI.
with 462,420 vertices and 926,058 tetrahedrons The processed meshes are available in the following link https://github. com/van-dang/DMRI-FEM-Cloud/raw/mesh/2E_ExtraCellular_ group_10um_vol. xml. zip The Google Colab-based solver is available in the following link https://colab. research. google. com/github/van-dang/DMRI-FEM-Cloud/blob/ master/ExtracellularSpace. ipynb The timing per b-value is about 30 minutes on Google Colaboratory for the time discretization ∆t = 1 ms. With half of this time-step size, i. e. , ∆t = 500 µs, it takes about an hour for b = 10000s/mm 2 on Google Colaboratory and the difference in the signals compared to ∆t = 1000 µs is only 1%. The signals for three principle gradient directions are shown in Fig. 10b. Two directions in the xz-plane give quite similar signals showing that the domain is quite isotropic in these directions and they both are distinguishable from the signals in the y-direction.
https://github. com/van-dang/DMRI-FEM-Cloud/raw/mesh/volume_box_N_18_7_3_5L_fine. xml. zip https://github. com/van-dang/DMRI-FEM-Cloud/raw/mesh/volume_N_18_7_3_5L_fine. xml. zip Below are the commands to execute the simulation with the FEniCS image singularity exec -B $PWD writable_fenics_dmri. simg python3 → PreprocessingMultiCompt. py -o multcompt_files. h5 ListNumProcs="100 210 300 500" # 25 nodes in Tegner for p in ${ListNumProcs} do mpirun -n $p singularity exec -B $PWD writable_fenics_dmri. simg → python3 GCloudDmriSolver. py -f multcompt_files. h5 -M 1 -b → 1000 -p 1e-5 -d 10600 -D 43100 -k 200 -gdir 0The simulation with 500 processors costs about 20 minutes per b-value with ∆t = 200µs. The strong parallel scaling is shown in Fig. 11c. Here T p indicates the timing for p processors, p 0 = 5 for the first case and p 0 = 100 for the latter.
Acknowledgement This research has been supported by the  Swedish Energy Agency, Sweden  with the project  ID P40435-1 ;  MSO4SC  with the Grant No. 731063 ; the  Basque Excellence Research Center  ( BERC 20142017 ) program by the  Basque Government ; the  Spanish Ministry of Economy and Competitiveness MINECO: BCAM Severo Ochoa accreditation   SEV-2013-0323 ; the  ICERMAR ELKA-RTEK  project of the  Basque Government ; the projects of the  Spanish Ministry of Economy and Competitiveness  with reference MTM2013-40824-P and  MTM2016-76016-R. The research was conducted on resources provided by the  Swedish National Infrastructure for Computing (SNIC)  at the  Center of High-Performance Computing (PDC). We also would like to thank  ANSA  from  Beta-CAE Systems S. A. , who generously provided an academic license.
1 0 1 https://github. com/van-dang/DMRI-FEM-Cloud/raw/mesh/volume_box_N_18_7_3_5L_fine. xml. zip https://github. com/van-dang/DMRI-FEM-Cloud/raw/mesh/volume_N_18_7_3_5L_fine. xml. zip Below are the commands to execute the simulation with the FEniCS image singularity exec -B $PWD writable_fenics_dmri. simg python3 → PreprocessingMultiCompt. py -o multcompt_files. h5 ListNumProcs="100 210 300 500" # 25 nodes in Tegner for p in ${ListNumProcs} do mpirun -n $p singularity exec -B $PWD writable_fenics_dmri. simg → python3 GCloudDmriSolver. py -f multcompt_files. h5 -M 1 -b → 1000 -p 1e-5 -d 10600 -D 43100 -k 200 -gdir 0The simulation with 500 processors costs about 20 minutes per b-value with ∆t = 200µs. The strong parallel scaling is shown in Fig. 11c. Here T p indicates the timing for p processors, p 0 = 5 for the first case and p 0 = 100 for the latter.
While SRIM remains intensively used in the ion irradiation community, it faces a few severe weaknesses. First the actual code is unknown. The only thing one can get from the website is a windows executable and a manual. Back in the 1980s, a listing appeared in a book  [3]. This listing does not include all the options that exist in the present SRIM, e. g. it contains only the QC and not the FC mode. A book with additional details appeared in the 1990s  [3]  (the present manual is a recopy of this book). However, the code listing is not given in this book and some things remain undetailed (see below). The ignorance of what is actually in the code is in unfavourable contrast with present day standard of open source programming. As we shall show below, the inability to look into the details of the code makes it very difficult to reproduce SRIM results.
Indeed BCA codes, beyond their apparently simple formalism, rely on some assumptions which, in the case of SRIM are not always documented. Moreover, SRIM code gets more and more difficult to install on computers as years pass by. It seems that the development and updating of this code has been frozen for many years. As will be exemplified below, some interesting recent numerical developments in ion-ion interactions have not been included in the code. For all these reasons, we believe that the ion irradiation community should not rely so much on this ageing and problematic code. Alternatives should be built. In this context, the requirements a satisfactory alternative must fulfil are three-fold. First, unlike SRIM, the code must be open-source. Second, like SRIM, it must be easy to use for people non-specialized in numerical simulations.