Commit 4a0be83f authored by eric pellegrini's avatar eric pellegrini
Browse files
parents 09b8b685 74c42755
......@@ -37,69 +37,87 @@ Laue-Langevin [cite ill article using nmoldyn]. This gave us the unique opportun
better their needs in term of features and ergonomy. This has motivated the developement of MDANSE application.
3] DESCRIPTION
Aujourd'hui de plus en plus de scientifiques ont recours a la simulation par dynamique moleculaire comme outil de validation et d'interpretation
de leur donnes experiementales. Ceci engendre un large spectre d'utlisateur au profil divers (physicien, biologiste ...) dont l'experience en informatique
va du simple utilisteur de programme a l'expert en programmation. Dans le cas plus specifique de la communaute de la neutronique, la comparaison
entre l'experience et la dynamique moleculaire est fondamentale dans la mesure ou le systemes explores et les temps de simulation sont compatibles.
. Ceci entraine la necessite de mettre en place des outils adaptes a ce public et qui soit
suffisamment ergonomique avec notamment une interface graphique permettant d'acceder aux fonctionnalite du software mais aussi suffisamment modulaire et extensible pour
ceux
# Why MDANSE ? Targeted features ? manque dans la communautee de neutronique d'environnement faisant le lien entre l'experience et la simulation.
# breve description nmoldyn, explication de pourquoi un fork
# avec les annee le publique qui accede a la MD, necessitee d'un programme reponsdance a un grande varieter de profils dans le public scientifique.
# mise en lumiere des limitations d'nmoldyn
This article describes the fourth version of nMoldyn. This version benefits from the experience gained through the development of previous versions of nMoldyn and the feedback of nMoldyn user community. This feedback mainly targeted (1) the lack for an interactive graphical environment and (2) the difficulty to extend nMoldyn to new analysis and (3) the possibility for the original neutron scattering community to use the scattering functions obtained from their MD analysis to setup virtual models of neutron spectrometers.
Each of these points motivated the design of nMoldyn 4.
A strong emphasis has been put on a complete redesign of the GUI, which includes now a 3D viewer for the MD trajectory and a sophisticated plotter for multi-dimensional data. The 3D molecular viewer allows parts of the molecular system to be selected interactively prior to an analysis and in that context, nMoldyn GUI can now be considered as an interactive graphical environment. The kernel of nMoldyn was also deeply modified to make easier the development and the integration of of the components necessary for implementing new analysis. Finally, a binding of nMoldyn to neutron ray-tracing McStas software17 has been introduced. This allows including scattering functions computed with nMoldyn as models of ideal sample of neutron virtual spectrometers. This in turn allows instrument-dependent artifacts in scattering data, like multiple scattering, absorption and cross-talk between the sample and its environment to be investigated. Trajectories of neutrons in the sample and instrument can be visualized with the 3D viewer.
An Interactive Graphical Environment
One of the main features that nMoldyn4 offer is the possibility to visualize and interact with 3D graphics. Thanks to developments based on wx Python18 and the visualization toolkit libraries,19 it is now possible to display a molecular trajectory, pick a set of atoms, visualize the trace of neutrons in an instrument simulation, or interpret simply 2D or 3D resulting data as 3D density plot, elevated surface, scalar field... The nMoldyn graphical environment allow to navigate interactively from the input of data, going through the parameterization of analyses to the visualization of results in an user friendly and integrated way. However, being a python package, nMoldyn can still be accessed through the command line interface.
Working Environment
The nMoldyn main window is divided in four panels (numbered from 1 to 4 on figure 1). The first panel is the nMoldyn workspace where all the actions will take place via a drag and drop mechanism of data and their related actions (e.g. viewing a molecule, trajectory animation, launching a job …). The second panel is the data panel that will display all the data that have been loaded in the current nMoldyn session. Dragging a data from this panel and dropping it on the workspace will create a tab that will serve as a container for all subsequent actions related to this data. Dropping an action on this tab will automatically pop up its related GUI (widget, dialog, viewer …). The third panel is the plugins panel that will contains all the actions related to the widget currently on focus into the workspace. This panel is dynamically updated each time the user selects a widget on the workspace. For example, a typical workflow for nMoldyn4 would be the following. 1) The user loads a trajectory. It is displayed in the data panel. 2) Data is dragged and dropped into the workspace. That creates a tab in the workspace waiting for further actions which are displayed in the plugins panel. 3) The user drags and drops the molecular viewer plugin into the previously created tab. The molecular viewer widget pops up in the tab showing the molecular contents of the trajectory. 4) The user animates the trajectory by dragging and dropping the animation panel into the previously created molecular viewer. And so on. Finally, the fourth panel contains various widgets related to the current nMoldyn session. It contains 1) a logger of the application. 2) a python console, allowing to handle the nMoldyn frameworks interactively. 3) a job manager, showing the states of the running jobs.
2D/3D Plotter
In the workflow of nMoldyn4, once an analyses has finished, a NetCDF file containing the results is written. To interpret properly this content, we have provided an integrated tool adapted to all the dimensions of the output data. Based respectively on matplotlib and VTK for 2D and 3D rendering, the nMoldyn4 plotter produces publication quality figures for the classic rendering types. The 1D and 2D data can be plotted as lines and images in single or multiple windows. To enhance the possibility cross comparison, the units conversions are handle automatically, and slices coming from different images can be merged into the same plot easily. For data with higher dimensionality several plotting modes can be used (1) the image elevation mode (see figure 2) displays 2D data as 3D colored landscape, (2) the scalar-field mode displays 3D densities as a field of combined gradient of color and transparency, (3) the iso-surface mode is another way to plot 3D densities represented in that case as a transparent surface going through all the values with the same intensity (see figure 3).
Figure 1. Snapshot of nMoldyn 4 main window with the different panels of the working environment numbered from 1 to 4.
This plotter includes also the possibility of slicing the density using a cut plan interpolating the data.
Properties Editor
Most of the quantities proposed by nMoldyn can be weighted by using a given property. In previous versions of nMoldyn the list of the properties that could be used was not extensible. It consisted basically in weighting by atomic masses and numbers, coherent and incoherent scattering lengths.
Opening nMoldyn to new experimental techniques (e.g. X-ray scattering, infrared and RMN spectroscopy) made necessary to make extensible the list of atomic properties that can be used in the weighting scheme. This has been done in nMoldyn4 and exposed to the GUI via an atomic properties editor (see figure 4).
Figure 4. The nMoldyn 4 properties editor which gives access to the nMoldyn 4 elements database.
This properties editor displays the nMoldyn elements database. It is editable which allows the management of the atomic properties of all defined atoms. Additionally, new atom types can be added, in order to fit some special molecular dynamics simulations. For instance, when computing analyses related to neutron spectrometry, some hydrogen atoms should be turned to deuterium to match the experience. In such case, the use of properties editor will allow to add the deuterium as a new entry and to further transmute some of the hydrogen atoms into deuterium.
Figure 2. An elevation plot produced by nMoldyn 4 plotting tool.
Figure 3. An elevation plot produced by nMoldyn 4 plotting tool.
An Extendable Framework
Compared to previous versions, nMoldyn4 has been structured in such a way that user can extend easily most of the principal software components. Indeed, the nMoldyn framework is based on a set of interfaces for which each base class is metaclassed in order to provide the (automatic) self-registration into a tree like structure called Registry at import time. Each branch of this tree will store the classes that compose each of these interfaces (e.g. Jobs, Configurators, Plugins …) and will be built up only when it will be required in the course of the execution flow.
This object-oriented design provides some flexibility for any user that would like to extend any of these interfaces. Indeed, he /she will just have to subclass any of their base class and nMoldyn will take in charge their automatic registration at runtime. This also allows, thanks to the introspection mechanism to transparently integrate in nMoldyn the user made component derived from the base classes identically as if they were built-in components. The figure 5 shows all the programming interfaces that are handled by the registry.
Figure 5. The nMoldyn 4 extendable components handled by the class registry.
3] DESCRIPTION
This article describes MDANCE and annonce its first public realease. This software benefits from the experience gained through
the development of nMoldyn and from the feedback of the neutron user community.
The design of MDANCE have been motivated on this feedback which mainly targeted on the : (1) the lack for an interactive graphical environment
(2) the possibility to extend available analysis and to create new ones easily for specific purposes.
A strong emphasis has been put on the design of the GUI, which includes now a 3D viewer for the MD trajectory and a sophisticated plotter for
multi-dimensional data. The 3D molecular viewer allows parts of the molecular system to be selected interactively prior to an analysis and in that
context, MDANCE GUI can now be considered as an interactive graphical environment. The kernel of MDANCE has been builded to make easier the
development and the integration of of the components necessary for implementing new analysis.
3.1] An Interactive Graphical Environment
One of the main features that MDANCE offer is the possibility to visualize and interact with 3D graphics.
Thanks to developments based on wxPython[ref] and the visualization toolkit libraries[ref], it is possible to display a molecular trajectory,
pick a set of atoms, or interpret simply 2D or 3D resulting data as 3D density plot, elevated surface, scalar field...
The MDANCE graphical environment allow to navigate interactively from the input of data, going through the parameterization of analyses
to the visualization of results in an user friendly and integrated way. However, being a python package, MDANCE can also be accessed
through the command line interface.
3.2]Working Environment
The main window is divided in four panels (numbered from 1 to 4 on figure 1). The first panel is the MDANCE workspace where all the actions will
take place via a drag and drop mechanism of data and their related actions (e.g. viewing a molecule, trajectory animation, launching a job …).
The second panel is the data panel that will display all the data that have been loaded in the current MDANCE session. Dragging a data from this panel
and dropping it on the workspace will create a tab that will serve as a container for all subsequent actions related to this data.
Dropping an action on this tab will automatically pop up its related GUI (widget, dialog, viewer …). The third panel is the plugins panel that will
contains all the actions related to the widget currently on focus into the workspace. This panel is dynamically updated each time the user selects
a widget on the workspace. For example, a typical workflow for MDANCE would be the following. 1) The user loads a trajectory.
It is displayed in the data panel. 2) Data is dragged and dropped into the workspace. That creates a tab in the workspace waiting for further actions
which are displayed in the plugins panel. 3) The user drags and drops the molecular viewer plugin into the previously created tab.
The molecular viewer widget pops up in the tab showing the molecular contents of the trajectory. 4) The user animates the trajectory by
dragging and dropping the animation panel into the previously created molecular viewer. And so on. Finally, the fourth panel contains
various widgets related to the current MDANCE session. It contains 1) a logger of the application. 2) a python console, allowing to handle the
MDANCE frameworks interactively. 3) a job manager, showing the states of the running jobs.
3.3] 2D/3D Plotter
In the workflow of MDANCE, once an analyses has finished, a NetCDF file containing the results is written.
To interpret properly this content, we have provided an integrated tool adapted to all the dimensions of the output data.
Based respectively on matplotlib and VTK for 2D and 3D rendering, the MDANCE plotter produces publication quality figures for the
classic rendering types. The 1D and 2D data can be plotted as lines and images in single or multiple windows. To enhance the possibility
cross comparison, the units conversions are handle automatically, and slices coming from different images can be merged into the same plot easily.
For data with higher dimensionality several plotting modes can be used (1) the image elevation mode (see figure 2) displays 2D data as
3D colored landscape, (2) the scalar-field mode displays 3D densities as a field of combined gradient of color and transparency, (3) the iso-surface
mode is another way to plot 3D densities represented in that case as a transparent surface going through all the values with
the same intensity (see figure 3). This plotter includes also the possibility of slicing the density using a cut plan interpolating the data.
Figure 1.]
Snapshot of MDANCE main window with the different panels of the working environment numbered from 1 to 4.
3.4] Properties Editor
Most of the quantities proposed by MDANCE can be weighted by using specific properties (atomic masses and numbers, coherent and
incoherent scattering lengths, etc.). in MDANCE the list of those properties is easily extensible, which open the use of MDANCE to new
experimental techniques (e.g. X-ray scattering, infrared and RMN spectroscopy). Thereby, in MDANCE the properties editor expose the
modification of the elements data base which allow the users to tune freely the weighting scheme (see figure 4).
This properties editor displays the MDANCE elements database. It is editable which allows the management of the atomic properties
of all defined atoms. Additionally, new atom types can be added, in order to fit some special molecular dynamics simulations.
For instance, when computing analyses related to neutron spectrometry, some hydrogen atoms should be turned to deuterium to match the
experience. In such case, the use of properties editor will allow to add the deuterium as a new entry and to further transmute some of
the hydrogen atoms into deuterium.
Figure 4.]
The MDANCE properties editor which gives access to the MDANCE elements database.
Figure 2.]
An elevation plot produced by MDANCE plotting tool.
Figure 3.]
An elevation plot produced by MDANCE plotting tool.
3.5] An Extendable Framework
MDANCE has been structured in such a way that user can extend easily most of the principal software components. Indeed, the MDANCE framework
is based on a set of interfaces for which each base class is metaclassed in order to provide the (automatic) self-registration into a tree like
structure called Registry at import time. Each branch of this tree will store the classes that compose each of these interfaces (e.g. Jobs,
Configurators, Plugins …) and will be built up only when it will be required in the course of the execution flow.
This object-oriented design provides some flexibility for any user that would like to extend any of these interfaces.
Indeed, he /she will just have to subclass any of their base class and MDANCE will take in charge their automatic registration at runtime.
This also allows, thanks to the introspection mechanism to transparently integrate in MDANCE the user made component derived from the base
classes identically as if they were built-in components. The figure 5 shows all the programming interfaces that are handled by the registry.
Figure 5.]
The MDANCE extendable components handled by the class registry.
4] EXAMPLE
4.1] Argon/Water (M.G.)
......@@ -108,7 +126,4 @@ Figure 5. The nMoldyn 4 extendable components handled by the class registry.
5] CONCLUSION
6] Acknowledgments
MDANSE development was supported by the Agence Nationale de la Recherche under contract N° ANR-2010-COSI-001-01
MDANSE development was supported by the Agence Nationale de la Recherche under contract N° ANR-2010-COSI-001-01
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment