CN109920493B - Neutron scattering data analysis system based on empirical potential refinement algorithm - Google Patents

Neutron scattering data analysis system based on empirical potential refinement algorithm Download PDF

Info

Publication number
CN109920493B
CN109920493B CN201910207474.6A CN201910207474A CN109920493B CN 109920493 B CN109920493 B CN 109920493B CN 201910207474 A CN201910207474 A CN 201910207474A CN 109920493 B CN109920493 B CN 109920493B
Authority
CN
China
Prior art keywords
simulation
module
user
molecule
molecules
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910207474.6A
Other languages
Chinese (zh)
Other versions
CN109920493A (en
Inventor
马长利
程贺
左太森
焦贵省
韩泽华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Institute of High Energy Physics of CAS
Dongguan Neutron Science Center
Original Assignee
Institute of High Energy Physics of CAS
Dongguan Neutron Science Center
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Institute of High Energy Physics of CAS, Dongguan Neutron Science Center filed Critical Institute of High Energy Physics of CAS
Priority to CN201910207474.6A priority Critical patent/CN109920493B/en
Publication of CN109920493A publication Critical patent/CN109920493A/en
Application granted granted Critical
Publication of CN109920493B publication Critical patent/CN109920493B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention relates to the technical field of neutron scattering data analysis, in particular to a neutron scattering data analysis system and method based on an empirical potential refinement algorithm, which utilizes C + + class inheritance, MPI distributed memory framework parallelization and GPU acceleration; the system comprises a user-defined atom or molecule recompilation program module, a simulation system initialization module, a parallel mode selection module, a reference potential Monte Carlo simulation module, an empirical potential Monte Carlo simulation module and a simulation data accumulation module; the invention is used for research work of neutron scattering data analysis, a class inheritance mechanism of C + + language is adopted to facilitate a user to define a molecular type and a motion mode of an analysis system by self, MPI cross-node parallel and GPU hardware acceleration are adopted to improve the running speed of software, the system can be installed on a personal computer, a computer server and a computer cluster which run on a Linux operating system, the applicability is strong, and the software system has the capability of analyzing a scale which exceeds ten million atom simulation systems.

Description

Neutron scattering data analysis system based on empirical potential refinement algorithm
Technical Field
The invention relates to the technical field of neutron scattering data analysis, in particular to a neutron scattering data analysis system and method based on an empirical potential refinement algorithm by utilizing C + + class inheritance, MPI distributed memory framework parallelization and GPU acceleration.
Background
Neutron scattering experiments can detect microstructures on the atomic scale of the experimental sample. The empirical potential refinement algorithm can obtain a method of inverse Monte Carlo simulation, and the atomic structure of the experimental sample is reconstructed by using the neutron scattering spectrum. Therefore, the algorithm is widely applied to data analysis of neutron scattering experiments of small molecule solution systems and glassy substances, and a large number of very credible results are obtained.
With the wide use of object-oriented computer languages in the scientific research field and the massive construction of multi-node super computer clusters and the common use of GPU operation display card servers, the invention realizes the self-definition of experimental sample molecules and molecular motion modes by users through class inheritance of C + + language, realizes the cross-node parallelism of computer clusters of programs through a distributed memory management API (application program interface) MPICH2I, and realizes the acceleration function of GPU hardware through CUDA programming.
Disclosure of Invention
The invention aims to develop a system for analyzing neutron scattering data, in particular to a neutron scattering data analysis system based on an empirical potential refinement algorithm, which reconstructs a three-dimensional atomic structure of an experimental sample according to neutron scattering experimental data, adopts C + + language, provides a user-defined atom, molecule and molecule movement mode, and supports computer cluster cross-node parallel and GPU computing graphics card acceleration.
The technical scheme adopted by the invention is as follows: a neutron scattering data analysis system based on an empirical potential refinement algorithm is characterized in that a C + + inheritance mechanism is adopted, a user can conveniently define atom, molecule, simulation system and molecular motion modes, cross-node parallelism of computer clusters is achieved through a distributed memory management program interface mpich2, and GPU computing graphics card hardware acceleration is achieved through a CUDA.
The system comprises a user-defined atom or molecule recompilation program module, a simulation system initialization module, a parallel mode selection module, a reference potential Monte Carlo simulation module, an empirical potential Monte Carlo simulation module and a simulation data accumulation module.
The user-defined atom or molecule recompilation program module adopts a C + + class inheritance mechanism to define the movement modes of atoms, molecules, a simulation system and molecules.
The user-defined atom or molecule recompilation program module defines base classes of atoms, molecules and a simulation system by adopting a C + + class inheritance mechanism, and particularly realizes the definition of new atoms and molecules and the definition of a molecule movement mode in a C + + multi-inheritance mode.
The system realizes cross-node parallel accelerated calculation of a radial distribution function g (r) and a simulated neutron scattering spectrum S (Q) of a computer cluster through an API (application program interface) of mpich 2.
The system calls GPU hardware to accelerate the calculation of the radial distribution function g (r) through CUDA programming.
When the neutron scattering data analysis system based on the empirical potential refinement algorithm is used for analysis and calculation, the using method comprises the following steps:
(1) a user defines needed atoms, molecules and a simulation system according to the components of an experimental sample and Atom, molecular and SimBox base classes of C + + inheritance mechanism inheritance software, defines the motion mode and intra-molecular reference potential of molecules according to the needs of the user in the molecular class, and defines potential energy parameters and functions between atoms among molecules through a C + + header file.
(2) And modifying the Makefile, selecting a parallel acceleration mode, and generating an executable file NeutrondDataAnalysis by using make compiling.
(3) Txt, wherein information such as an input data file, the density of a simulation system, the number of molecules of the simulation system and the like is set, and program operation parameters such as result prefixes and paths are output.
(4) And operating the program.
The invention achieves the following beneficial effects: the invention is used for research work of neutron scattering data analysis, a class inheritance mechanism of C + + language is adopted to facilitate a user to define a molecular type and a motion mode of an analysis system by self, MPI cross-node parallel and GPU hardware acceleration are adopted to improve the running speed of software, the system can be installed on a personal computer, a computer server and a computer cluster which run on a Linux operating system, the applicability is strong, and the software system has the capability of analyzing a simulation system with the scale exceeding 1 million atoms.
Drawings
Fig. 1 is a schematic diagram of the operation principle of the program in the present invention.
Detailed Description
The following detailed description of the embodiments of the invention is provided in conjunction with the drawings of the specification:
the invention discloses a neutron scattering data analysis system based on an empirical potential refinement algorithm, which comprises a user-defined atom or molecule recompilation program module, a simulation system initialization module, a parallel mode selection module, a reference potential Monte Carlo simulation module, an empirical potential Monte Carlo simulation module and a simulation data accumulation module, wherein a personal computer, a computer server and a computer cluster which run in a Linux operating system can be installed and used for analyzing neutron scattering data to obtain the atomic structure and the physicochemical characteristics related to the structure of an experimental sample.
A neutron scattering data analysis system based on an empirical potential refinement algorithm is characterized in that atoms or molecules are defined by a C + + class inheritance mechanism, a user can conveniently define Atom (Atom), Molecule (Molecule), simulation system (SimBox) and molecular motion modes, more specifically, C + + language writing is adopted, and the user can conveniently define Atom, Molecule and molecular random motion modes and increase the attributes of Atom and Molecule by the C + + multi-inheritance mechanism through defining base classes of Atom (Atom), Molecule (Molecule) and simulation box (SimBox).
The neutron scattering data analysis system based on the empirical potential refinement algorithm realizes cross-node parallel of computer clusters through a distributed memory management program interface mpich2, and particularly adopts the technical means that data communication among the computer cluster nodes is realized by calling an mpich2 application program interface so as to realize cross-node parallel acceleration of software.
The neutron scattering data analysis system based on the empirical potential refinement algorithm uses the CUDA to realize hardware acceleration of the GPU computing display card, and more specifically, in the embodiment, the CUDA programming is used to call the GPU computing card to realize hardware acceleration.
When the neutron scattering data analysis system based on the empirical potential refinement algorithm is used for analysis and calculation, the using method comprises the following steps:
(1) a user inherits Atom and Molecule required by Atom and Molecule definition of Atom and Molecule of the software according to the components of the experimental sample and the C + + inheritance mechanism, defines the motion mode and intra-Molecule reference potential of the Molecule according to the requirement of the user in the Molecule, and defines potential energy parameters between the atoms among the molecules through the C + + header file.
(2) Modifying the Makefile, selecting a parallel acceleration mode which can be MPI, GPU, OpenMP or the combination of the MPI, the GPU and the OpenMP, and generating an executable file NeutronDataAnalysis through make compiling.
(3) Txt, wherein information such as an input data file, the density of a simulation system, the number of molecules of the simulation system and the like is set, and program operation parameters such as result prefixes and paths are output.
(4) And operating the program. (./neutron data analysis input. txt)
The implementation process of the present invention is described in detail by the program operation flow with reference to the attached drawing 1:
(1) user-defined atoms, molecules, recompilation programs
The user defines an atom or molecule recompilation program module, base classes of atoms, molecules and simulation boxes are defined through C + + classes, and the user realizes the definition of new atoms, new molecules and new molecular motion forms through an inheritance method on the basis of the base classes; basic motions such as Atom translation, Molecule rotation and the like are defined in the base class, and the names of the base class are respectively defined as Atom, menu and SimBox.
Modifying and adding interatomic potential energy parameters in a parameter C + + header file parameter _ pot.h, and adding and defining functions of potential energy equations between atoms in func _ pot.h and func _ pot.cxx; the executable file NeutronDataAnalysis is generated using the make command compiler of the GNU. And the user selects a parallel acceleration mode of the program according to whether the user defines the USE _ OMP, the USE _ MPI and the USE _ GPU in the compiling options in the Makefile according to the hardware and the requirements of the server. If the USE _ OMP is defined, the program can compile an OpenMP shared memory parallel acceleration part, and the program can be in multi-thread parallel in a server node; if the USE _ MPI is defined, the program can compile a parallel part of the distributed memory, and the program can be parallel between different nodes of the server; if the USE _ GPU is defined, the program compiles the CUDA part, and the program can call the GPU computing display card of the server to perform acceleration operation.
(2) Running program
After a user defines atoms and molecules and recompiles the program, the system starts to call an operating program, and the neutron scattering data analysis system based on the empirical potential refinement algorithm operates the neutron scattering data analysis input. Txt is a text file that sets input parameters. Including the sample density (g/cm)3) The number of the operation parameters, such as the number of molecules, the path and the name of the experimental data file, the path of the output result, the maximum step length of Monte Carlo motion, the number of parallel nodes, the number of CPU threads started by each node, the number of the called GPU display cards, whether the intermediate simulation result is output or not and the like.
(3) Initializing simulation system, referring to potential energy and defining variables
The simulation system initialization module automatically and randomly generates an initial conformation of a simulation system according to input parameters of a user, calculates reference potential energy between system atoms, and dynamically defines variables according to calculation requirements to open up an internal memory.
(4) Whether to cross-node parallelism
In the operation process, the system can determine whether cross-node parallel exists according to the compiling options of the user, and determine the number of cross-node parallel nodes according to the input file parameters of the user. If cross-node parallelism is selected and the number of nodes participating in parallelism is greater than 1, the program automatically broadcasts the simulation architecture, operating parameters, etc. to the nodes participating in parallelism using the data transfer function of mpich 2.
(5) Parallel method selection
The parallel mode selection module in the invention selects and calls parallel functions according to the running parameters provided by the user. If MPI parallelism is selected, calling functions of mpich2 by a program to realize cross-node parallelism; if OpenMP is selected to be used, the program calls the function of the OpenMP to realize the parallelism in the nodes; and if the GPU parallelism is selected to be used, calling a CUDA function by the program for parallelism. The parallel approach applies to the following (6) "Monte Carlo simulations" to (10) "accumulations of g (r) and S (Q)"
And (4) each operation link.
(6) Monte Carlo simulation
The reference potential Monte Carlo simulation module carries out Monte Carlo simulation according to the reference potential until the simulation reaches balance.
(7) Calculating g (r), S (Q), empirical potential
After the Monte Carlo simulation reaches balance, the program calculates the radial distribution function distribution g (r) of the simulation system, and calculates the simulated neutron scattering spectrum and empirical potential.
(8) Whether the empirical potential is about 0
The empirical potential Monte Carlo simulation module in the invention determines the process according to the empirical potential amplitude, and if the empirical potential amplitude is close to 0, the program enters the link of accumulating data. If the empirical potential magnitude is greater than the user-set magnitude, the program enters Monte Carlo simulation using the empirical potential.
(9) Empirical monte carlo simulation
The invention relates to a program of an empirical potential Monte Carlo simulation module, which carries out Monte Carlo simulation by using the total potential energy of reference potential and empirical potential until equilibrium is reached. And (7) returning to the step (7) of calculating g (r), S (Q) and experience potential after the balance is achieved.
(10) Cumulating g (r) and S (Q)
After the magnitude of the empirical potential reaches the user-defined termination condition, the program of the simulation data accumulation module continues with the empirical potential monte carlo simulation, accumulating g (r) and s (q) until a smooth spectral shape curve is obtained.
(11) The routine is ended.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the technical scope of the present invention, and those skilled in the art may make modifications and variations within the spirit of the present invention, and all modifications, equivalents and modifications of the above embodiments according to the technical spirit of the present invention are within the scope of the present invention.

Claims (4)

1. A neutron scattering data analysis system based on an empirical potential refinement algorithm is characterized in that: the system comprises a user-defined atom or molecule recompilation program module, a simulation system initialization module, anThe device comprises a row mode selection module, a reference potential Monte Carlo simulation module, an empirical potential Monte Carlo simulation module and a simulation data accumulation module; the system adopts a C + + class inheritance mechanism to facilitate user-defined atom, molecule, simulation system and molecule movement modes, realizes cross-node parallel of computer clusters through a distributed memory management program interface mpich2, and realizes GPU hardware acceleration of a computing display card by using a CUDA; the system calls GPU hardware to accelerate the calculation of the radial distribution function through CUDA programmingg(r) (ii) a When the system is adopted for analysis and calculation, the using method comprises the following steps:
(1) defining needed atoms, molecules and a simulation system by a user according to the components of an experimental sample and Atom, molecular and SimBox base classes of C + + inheritance mechanism inheritance software, defining the motion mode and intra-molecular reference potential of molecules in the molecular class according to the needs of the user, and defining potential energy parameters between atoms among molecules through a C + + header file;
(2) modifying the Makefile, selecting a parallel acceleration mode, and generating an executable file NeutrondDataAnalysis through make compiling;
(3) txt, wherein information such as an input data file, the density of a simulation system, the molecular number of the simulation system and the like is set, and program operation parameters such as result prefixes, paths and the like are output;
(4) and operating the program.
2. The system of claim 1, wherein the system further comprises: the user-defined atom or molecule recompilation program module adopts a C + + class inheritance mechanism to define the movement modes of atoms, molecules, a simulation system and molecules.
3. The system for analyzing neutron scattering data based on empirical potential refinement algorithm according to claim 1 or 2, wherein: the user-defined atom or molecule recompilation program module defines base classes of atoms, molecules and a simulation system by adopting a C + + class inheritance mechanism, and particularly realizes the definition of new atoms and molecules and the redefinition of a molecule movement mode in a C + + multi-inheritance mode.
4. The system of claim 1, wherein the system further comprises: the system realizes cross-node parallel accelerated computation of a radial distribution function of a computer cluster through an API (application program interface) of mpich2g(r) And simulated neutron scattering spectroscopyS(Q)。
CN201910207474.6A 2019-03-18 2019-03-18 Neutron scattering data analysis system based on empirical potential refinement algorithm Active CN109920493B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910207474.6A CN109920493B (en) 2019-03-18 2019-03-18 Neutron scattering data analysis system based on empirical potential refinement algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910207474.6A CN109920493B (en) 2019-03-18 2019-03-18 Neutron scattering data analysis system based on empirical potential refinement algorithm

Publications (2)

Publication Number Publication Date
CN109920493A CN109920493A (en) 2019-06-21
CN109920493B true CN109920493B (en) 2020-12-18

Family

ID=66965626

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910207474.6A Active CN109920493B (en) 2019-03-18 2019-03-18 Neutron scattering data analysis system based on empirical potential refinement algorithm

Country Status (1)

Country Link
CN (1) CN109920493B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005091178A3 (en) * 2004-03-15 2006-04-20 Avant Garde Materials Simulati Method for energy ranking of molecular crystals using dft calculations and empirical van der waals potentials
CN107092732A (en) * 2017-04-05 2017-08-25 西安交通大学 A kind of weighting Monte Carlo calculations method of neutron dynamics
CN108680943A (en) * 2018-05-11 2018-10-19 南京航空航天大学 A kind of neutron spectrum measurement device and method based on prompt gamma ray neutron activation analysis technique

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005091178A3 (en) * 2004-03-15 2006-04-20 Avant Garde Materials Simulati Method for energy ranking of molecular crystals using dft calculations and empirical van der waals potentials
CN107092732A (en) * 2017-04-05 2017-08-25 西安交通大学 A kind of weighting Monte Carlo calculations method of neutron dynamics
CN108680943A (en) * 2018-05-11 2018-10-19 南京航空航天大学 A kind of neutron spectrum measurement device and method based on prompt gamma ray neutron activation analysis technique

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
A Java-based science portal for neutron scattering experiments;Sudharshan S. Vazhkudai等;《Proceedings of the 5th international symposium on Principles and practice of programming in Java》;20070930;第21-30页 *

Also Published As

Publication number Publication date
CN109920493A (en) 2019-06-21

Similar Documents

Publication Publication Date Title
Jones et al. QuEST and high performance simulation of quantum computers
Montella et al. On the virtualization of CUDA based GPU remoting on ARM and X86 machines in the GVirtuS framework
Delaney et al. Polymer field-theory simulations on graphics processing units
Maleki et al. Understanding the impact of object oriented programming and design patterns on energy efficiency
Aldinucci et al. Parallel stochastic systems biology in the cloud
Alam et al. Parallel algorithms for generating random networks with given degree sequences
Takeuchi et al. Compiling x10 to java
Kang et al. A taste of scientific computing on the gpu-accelerated edge device
Reguly et al. Under the hood of sycl–an initial performance analysis with an unstructured-mesh cfd application
Balasubramaniam et al. Towards the scalability of dynamic loop scheduling techniques via discrete event simulation
CN109920493B (en) Neutron scattering data analysis system based on empirical potential refinement algorithm
Dokulil et al. HyPHI-task based hybrid execution C++ library for the Intel Xeon Phi coprocessor
Mallón et al. NPB-MPJ: NAS parallel benchmarks implementation for message-passing in Java
Peña et al. A data-oriented profiler to assist in data partitioning and distribution for heterogeneous memory in HPC
Alt et al. Adapting Java RMI for grid computing
Alkan et al. Enabling Fortran standard parallelism in GAMESS for accelerated quantum chemistry calculations
Church et al. Iaas clouds vs. clusters for hpc: A performance study
Simão et al. GC-Wise: A Self-adaptive approach for memory-performance efficiency in Java VMs
Kindratenko et al. High-performance computing with accelerators
Cantonnet et al. Performance Monitoring and Evaluation of a UPC Implementation on a NUMA Architecture
Milthorpe et al. PGAS‐FMM: Implementing a distributed fast multipole method using the X10 programming language
Danelutto et al. Pal: exploiting java annotations for parallelism
de Carvalho Junior et al. Performance evaluation of virtual execution environments for intensive computing on usual representations of multidimensional arrays
Legault Prototype Eclipse OMR port performance evaluation on AArch64
Aldegheri et al. Rapid prototyping of embedded vision systems: Embedding computer vision applications into low-power heterogeneous architectures

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant