CN109920486B - Method for improving molecular dynamics batch modeling efficiency based on Shell language - Google Patents
Method for improving molecular dynamics batch modeling efficiency based on Shell language Download PDFInfo
- Publication number
- CN109920486B CN109920486B CN201910021513.3A CN201910021513A CN109920486B CN 109920486 B CN109920486 B CN 109920486B CN 201910021513 A CN201910021513 A CN 201910021513A CN 109920486 B CN109920486 B CN 109920486B
- Authority
- CN
- China
- Prior art keywords
- model
- undetermined
- parameters
- target
- shell language
- 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
Links
Images
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to an improvement of a modeling method, in particular to a method for improving molecular dynamics batch modeling efficiency based on Shell language, which comprises the following steps: step one, establishing a basic model for molecular dynamics calculation; modifying main parameters in the basic model into undetermined parameters, and modifying the basic model into an undetermined model; copying and renaming the undetermined model through the Shell language to obtain a target model containing undetermined parameters; setting undetermined parameters as target parameters through Shell language to obtain a target model; and step five, the target models are generated in batches under the control of Shell language circulation, so that the batch modeling efficiency is greatly improved, the working intensity of scientific research personnel is reduced, and the possibility of manual operation errors is avoided.
Description
Technical Field
The invention relates to improvement of a modeling method, in particular to a method for improving molecular dynamics batch modeling efficiency based on Shell language.
Background
The molecular dynamics method is a computer simulation experiment method and is an important tool for researching the science of the nano materials. The technology can obtain the motion trail of atoms, can observe various microscopic details in the deformation process of the material, and is a powerful supplement to theoretical analysis and experimental tests. The wide application of the molecular dynamics simulation method has important significance for promoting the development of the nanometer material science.
After the material enters the nanometer scale, the material shows different physical and chemical characteristics from the material in the macroscopic scale, wherein one effect is a size effect, which means that the property of the nanometer material is related to the size of the nanometer material. Therefore, regardless of micro-nano scale experiments or molecular dynamics simulation, the size of the nano material is considered, and a series of nano materials with the sizes can be tested.
For example, the tensile properties of nanowires are studied by molecular dynamics simulation, and a series of nanowire models with different three-dimensional sizes need to be established, wherein the number of nanowire models is dozens, and the number of nanowire models is hundreds. The establishment of a geometric model of a cuboid nanowire requires three geometric dimensions of length, width and height, if each geometric model is manually operated, the basic model needs to be continuously copied, the model is opened, and the three-dimensional dimensions in the model need to be modified, so that the workload is huge, the time and the labor are consumed, and errors are easy to occur.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides the method for improving the molecular dynamics batch modeling efficiency based on the Shell language, which not only greatly improves the batch modeling efficiency and lightens the working intensity of scientific research personnel, but also avoids the possibility of manual operation errors.
In order to achieve the technical purpose, the technical scheme of the invention is that the method for improving the molecular dynamics batch modeling efficiency based on the Shell language comprises the following steps:
step one, establishing a basic model for molecular dynamics calculation;
modifying main parameters in the basic model into undetermined parameters, and modifying the basic model into an undetermined model;
copying and renaming the undetermined model through the Shell language to obtain a target model containing undetermined parameters;
setting undetermined parameters as target parameters through Shell language to obtain a target model;
and fifthly, generating the target models in batch through Shell language circulation control.
Preferably, in the second step, the main parameters in the basic model are modified into undetermined parameters, and the basic model is modified into an undetermined model, namely, the geometric dimension parameters in the basic model setting file are modified into the undetermined parameters, and the basic model is modified into the undetermined model with the geometric dimension being undetermined.
Preferably, in the third step, the objective model containing the undetermined parameters is obtained by copying and renaming the undetermined model through the Shell language, which means that the undetermined model with undetermined geometric dimension is copied through a cp command of the Shell language, and is renamed by taking the objective parameters as characteristics to obtain the objective model containing the undetermined parameters.
Preferably, in the fourth step, the undetermined parameter is set by the Shell language as the target parameter to obtain the target model, which means that the undetermined parameter in the target model setting file is set as the target parameter by the sed command of the Shell language to obtain the required target model.
Preferably, the step five of generating the target models in batch through the Shell language loop control means that the target models are generated in batch by repeating the step three and the step four through the Shell language loop control.
As can be seen from the above description, the present invention has the following advantages: the method for improving the molecular dynamics batch modeling efficiency based on the Shell language not only greatly improves the batch modeling efficiency, lightens the working intensity of scientific research personnel, but also avoids the possibility of manual operation errors.
Drawings
FIG. 1 is a method for improving the molecular dynamics batch modeling efficiency based on Shell language.
Detailed Description
The invention is further illustrated in the following description with reference to the given figures and specific examples, which are to be understood as merely illustrative of the invention and not as limiting its scope, based on which all other embodiments can be obtained by the person skilled in the art without inventive step. All fall within the scope of the invention.
In specific implementation, with reference to fig. 1, a basic model of molecular dynamics calculation is established in step one:
the basic geometric model established was a cuboid nanowire with three dimensions of 10a 2a 3a, where a is the lattice constant of the material, described in the LAMMPS programming language as
region nanowire block 0 10 0 2 0 3
The geometric model is stored in a setting file in. All the setting files are placed in a folder nanowire, which is a basic model and can be run by using molecular dynamics software LAMMPS to obtain reasonable results.
Step two, modifying the main parameters in the basic model into undetermined parameters, and modifying the basic model into an undetermined model:
modifying the main geometric parameters in the basic model setting file established in the step one, namely the three-dimensional size of the cuboid into undetermined parameters, such as TBDX, TBDY and TBDZ, which are described as undetermined parameters by using LAMMPS program language
region nanowire block 0TBDX 0TBDY 0TBDZ
And meanwhile, the positioned folder nanowire is modified into TBD _ nanowire, namely the undetermined model with undetermined geometric dimension.
Thirdly, copying the undetermined model through the Shell language and renaming to obtain a target model containing undetermined parameters:
copying and renaming the pending model TBD _ nanowire through a cp command of the Shell language, wherein the name of the pending model TBD _ nanowire comprises target three-dimensional size parameters of $ X, $ Y, $ Z and is described as the model in the Shell language
cp-r TBD_nanowire $X_$Y_$Z_nanowire
Step four, setting undetermined parameters as target parameters through Shell language to obtain a target model:
setting undetermined parameters TBDX, TBDY and TBDZ in the target model as target three-dimensional size parameters through sed commands of Shell language, and describing the parameters as target three-dimensional size parameters by the Shell language
sed-i“s/TBDX/$X/g”in.nanowire
sed-i“s/TBDY/$Y/g”in.nanowire
sed-i“s/TBDZ/$Z/g”in.nanowire
Step five, generating target models in batches through Shell language circulation control:
and repeating the third step and the fourth step through the loop control of the Shell language, and generating the target model in batches, wherein for example, the length X is selected to be three sizes of 10a, 20a and 30a, the width Y is selected to be four sizes of 2a, 3a, 4a and 5a, the height Z is selected to be two sizes of 3a and 6a, and the target model is described as being in the Shell language
for X in 'seq 101030' # (cycle one, X is 10a, 20a, 30a in sequence)
do
for Y in 'seq 215' # (cycle two, Y is 2a, 3a, 4a, 5a in sequence)
do
for Z in 'seq 336' # (cycle three, Z is 3a, 6a in sequence)
do
cp-r TBD _ nanowire $ X _ $ Y _ $ Z _ nanowire # (step three)
cd $ X _ $ Y _ $ Z _ nanowire # (entering the pending model whose geometry is pending)
sed-i "s/TBDX/$ X/g" in. nanowire # (step four)
sed-i“s/TBDY/$Y/g”in.nanowire
sed-i“s/TBDZ/$Z/g”in.nanowire
cd.. # (exit target model)
done
done
done
This embodiment can quickly generate 24 target models with lengths X of 10a, 20a, and 30a, widths Y of 2a, 3a, 4a, and 5a, and heights Z of 3a and 6a, respectively, for a total of 3 × 4 × 2.
The present invention and its embodiments have been described above, and the description is not intended to be limiting, and the drawings are only one embodiment of the present invention, and the actual configuration is not limited thereto. In summary, those skilled in the art should appreciate that they can readily use the disclosed conception and specific embodiments as a basis for designing or modifying other structures for carrying out the same purposes of the present invention without departing from the spirit and scope of the invention as defined by the appended claims.
Claims (1)
1. A method for improving molecular dynamics batch modeling efficiency based on Shell language is characterized in that: the method comprises the following steps:
step one, establishing a basic model for molecular dynamics calculation;
modifying main parameters in the basic model into undetermined parameters, and modifying the basic model into an undetermined model;
copying and renaming the undetermined model through the Shell language to obtain a target model containing undetermined parameters;
setting undetermined parameters as target parameters through Shell language to obtain a target model;
step five, generating target models in batches through Shell language circulation control;
modifying the main parameters in the basic model into undetermined parameters, modifying the basic model into an undetermined model, namely modifying the geometric dimension parameters in the basic model setting file into undetermined parameters, and modifying the basic model into the undetermined model with the geometric dimension to be determined;
in the third step, the undetermined model is copied and renamed through the Shell language to obtain a target model containing undetermined parameters, namely, the undetermined model with undetermined geometric dimension is copied through a cp command of the Shell language and renamed by taking the target parameters as characteristics to obtain the target model containing undetermined parameters;
setting the undetermined parameters as target parameters through the Shell language to obtain a target model, namely setting the undetermined parameters in a target model setting file as the target parameters through a sed command of the Shell language to obtain a required target model;
and in the fifth step, the target models are generated in batch through the Shell language circulation control, namely, the target models are generated in batch through the Shell language circulation control by repeating the third step and the fourth step.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910021513.3A CN109920486B (en) | 2019-01-10 | 2019-01-10 | Method for improving molecular dynamics batch modeling efficiency based on Shell language |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910021513.3A CN109920486B (en) | 2019-01-10 | 2019-01-10 | Method for improving molecular dynamics batch modeling efficiency based on Shell language |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109920486A CN109920486A (en) | 2019-06-21 |
CN109920486B true CN109920486B (en) | 2021-03-16 |
Family
ID=66960197
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910021513.3A Active CN109920486B (en) | 2019-01-10 | 2019-01-10 | Method for improving molecular dynamics batch modeling efficiency based on Shell language |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109920486B (en) |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
GB201510861D0 (en) * | 2015-06-19 | 2015-08-05 | Penso Holdings Ltd | Method for use in the analysis of a composite component and a design tool |
CN106600700B (en) * | 2015-10-20 | 2020-01-17 | 星际空间(天津)科技发展有限公司 | Three-dimensional model data processing system |
CN105930666B (en) * | 2016-04-27 | 2019-01-22 | 厦门大学 | A kind of online soft sensor method of entrained flow gasifying furnace bore temperature |
CN106354898B (en) * | 2016-06-28 | 2019-05-03 | 湖南工业大学 | A kind of weld fatigue Life Calculating Methods based on total strain energy metric density |
CN107423823B (en) * | 2017-08-11 | 2020-11-10 | 成都优易数据有限公司 | R language-based machine learning modeling platform architecture design method |
CN107729254A (en) * | 2017-11-10 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of implementation method for safeguarding Batch orders technique automatically by shell scripts |
CN108829919B (en) * | 2018-05-02 | 2022-03-25 | 嘉兴南湖学院 | Method for multi-scale simulation of multiphase electrohydrodynamic of core-shell structure |
CN108897918A (en) * | 2018-06-01 | 2018-11-27 | 燕山大学 | A method of based on molecular dynamics measurement free volume distribution |
-
2019
- 2019-01-10 CN CN201910021513.3A patent/CN109920486B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN109920486A (en) | 2019-06-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
McMillan et al. | Programmatic lattice generation for additive manufacture | |
Vantyghem et al. | VoxelPrint: A Grasshopper plug-in for voxel-based numerical simulation of concrete printing | |
CN109063275B (en) | Method for constructing three-dimensional polycrystalline microstructure material model based on FEAP | |
Sandfeld et al. | Continuum modeling of dislocation plasticity: Theory, numerical implementation, and validation by discrete dislocation simulations | |
Smith et al. | Application of layout optimization to the design of additively manufactured metallic components | |
CN108875138A (en) | Consider the structure optimization of the increasing material manufacturing part of manufacture initiation state | |
CN109920486B (en) | Method for improving molecular dynamics batch modeling efficiency based on Shell language | |
McMillan et al. | Programmatic generation of computationally efficient lattice structures for additive manufacture | |
Fadeel et al. | ABAQUS plug-in finite element tool for designing and analyzing lattice cell structures | |
Hatledal et al. | JIOP: A Java Intelligent Optimisation And Machine Learning Framework. | |
US20230311309A1 (en) | Method and system for determining optimized program parameters for a robot program | |
Smith et al. | Automated synthesis of bending pneumatic soft actuators | |
CN109388905B (en) | Porous structure modeling method based on Grasshopper and UG secondary development | |
Lugo et al. | A typical workflow to simulate cytoskeletal systems with Cytosim | |
CN109785913A (en) | The method that high throughput calculates research and development novel high polymer resin matrix | |
Tenorio-Suárez et al. | MaSMaker: An open-source, portable software to create and integrate maze-like surfaces into arbitrary geometries | |
Jatnika et al. | Implementation of the Rational Unified Process (Rup) Method in Designing a Web-Based Certification Scheduling Application (Citation) on Itcc Itpln | |
Kurmoiartseva et al. | Modeling of Polycrystalline Materials Deformation with Dislocation Structure Evolution and Transition to Fracture | |
Zepeda-Ruiz et al. | Metal hardening in atomistic detail | |
Balasubramaniam et al. | Dominion: An architecture-driven approach to generating efficient constraint solvers | |
Benaouali et al. | Parametric design of aircraft wing with curved leading edge | |
Chen et al. | A mesh feature paradigm for rapid generation of CAE-based design of experiments data | |
Infuso et al. | Flaw-tolerance of nonlocal discrete systems and interpretation according to network theory | |
Ingram | A Molecular Dynamics Study on Properties of Poly Dimethyl Siloxane with Silica Nanoparticles for Polymer Nanocomposites: Part I, Modeling and Preliminary Simulations | |
Iakovliev et al. | Stability of mitotic spindle using computational mechanics |
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 |