Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống
1
/ 19 trang
THÔNG TIN TÀI LIỆU
Thông tin cơ bản
Định dạng
Số trang
19
Dung lượng
8,32 MB
Nội dung
August 2019 LAMMPS Workshop and Symposium Hands-on training: OVITO - Open Visualization Tool The following exercises have been developed by the OVITO team at Darmstadt University of Technology, Germany to make you familiar with the main data analysis and visualization functions of the software The tutorials are based on five different MD simulation datasets, which which have been generated with LAMMPS Please download the provided data files to the computer where you are going to perform the steps of this hand-on tutorial You can work on the five exercises in any order Start with what you find most interesting Note that these step-by-step instructions refer to the current development version of OVITO 3.0.0-dev, which can be downloaded from www.ovito.org If this is the first time you use OVITO, you might need additional help You can get it from various sources: The user manual that comes with OVITO (see Help menu), the instructor, or other people in the room Make use of all three options! We recommend saving your work as ovito state files during and after each exercise In case you need to take a break, this lets you continue with the session at a later time without having to start all over Dataset 1: Crystal under shear deformation This demo simulation has been adapted from the simple “shear” example script that comes with the LAMMPS code It simulates an FCC nickel crystal containing a small void in its center Periodic boundary conditions have been applied in the x (horizontal) and z (out-of-plane) directions The two open surfaces are being rigidly moved relative to each other to deform the solid (elastically at first, then plastically) Plastic crystal deformation is carried by dislocation defects, which are emitted from the hole in the center of the crystal www.ovito.org August 2019 LAMMPS Workshop and Symposium Task A: Load the provided simulation output file “shear.void_b.dump” OVITO automatically detects that this file contains a series of snapshots of the MD simulation (a trajectory) Use the time slider and the animation controls at the bottom of the main window to watch the time evolution of the deformed crystal Task B: Insert the Common Neighbor Analysis modifier into the data pipeline to classify the local neighborhood of each atom and identify crystalline arrangements This makes defects in the otherwise perfect crystal lattice visible (e.g stacking faults and dislocations) If you click on the Particles tab located between the viewports and the viewport toolbar, you can open the Data Inspector that shows you which properties are currently associated with the particles You can see that a new property „Structure Type“ has been created as a result of performing the structure identification with the Common Neighbor Analysis modifier Now use the Replicate modifier to duplicate all atoms and repeat the simulation cell three times along the periodic direction as shown in the picture below This will make it easier for you to follow crystal defects as they move through the deforming crystal and across periodic cell boundaries Also use the Wrap at periodic boundaries modifier to map atoms that left the simulation box back into the box Task C: Apply the Centrosymmetry parameter modifier to calculate the centrosymmetry parameter (CSP) value for each atom The CSP is a local order parameter measuring the deviation from perfect lattice symmetry Note that our model represents a Ni crystal with FCC crystal structure, which means we must take into account 12 nearest neighbors during CSP calculation) After the Centrosymmetry parameter modifier has computed and stored each atom’s CSP value, it’s now time to apply another modifier to visualize these values www.ovito.org August 2019 LAMMPS Workshop and Symposium You can use the Color coding modifier for that Observe how the CSP values change as you play the animation Finally, use the Scatter plot modifier to study possible correlations between the CSP values of atoms and their potential energy (in eV), as shown in the screenshot below Note that the atomic potential energy has previously been computed and stored in the dump file by LAMMPS and is loaded by OVITO as an additional particle property named “c_poteng” Plot of atomic energy vs centrosymmetry parameter for each atom in the crystal In general, any deviation from perfect centrosymmetry leads to a higher atomic energy But also uniform elastic strain, which doesn’t affect the centrosymmetry, raises the energy Furthermore, two groups of atoms can be identified in the scatter plot, corresponding to perfect crystal and to stacking fault atoms Task D: First, go back to the original data visualization by removing any existing modifiers from the pipeline We’ll now compute and visualize the atomic displacement vectors as shown in the left picture below This is accomplished using the Displacement vectors modifier It computes the displacements with respect to the initial frame of the animation and stores them as a new vector particle property named “Displacement” Activate the Displacements visual element in the pipeline editor to show the data as little arrows Then turn off the display of displacement vectors again and visualize the atomic trajectory lines as depicted in the right picture below This is done using the Generate particle trajectories modifier See the corresponding doc page of the user manual for further instructions www.ovito.org August 2019 LAMMPS Workshop and Symposium Dataset 2: CuZr metallic glass This dataset is the output from an MD simulation of a Cu64Zr36 metallic glass, which is being quenched from the melt by rapidly lowering the temperature of the system In other words, what you see is the transition from the liquid state to a metastable glassy state with frozen kinetics Load the trajectory file “Cu64Zr36.dump” LAMMPS dump files not carry any information on the two atom types that were used in the MD simulation and we need to provide this information to OVITO ourselves Under Data source / Particle types, change the names from Type to Cu and Type to Zr Also adjust the atomic radii (use 1.35 Å for Cu and 1.55 Å for Zr) Task A: Examine how the radial distribution function (RDF) changes with simulation time (i.e decreasing temperature) Use the Coordination analysis modifier, which computes the pair distribution function, and play around with the cutoff radius and number of histogram bins settings Can you explain why the radial distribution function changes as the liquid turns into the glassy state? www.ovito.org August 2019 LAMMPS Workshop and Symposium Task B: Voronoi analysis The atomic-level structure of metallic glasses and liquids is often studied in terms of characteristic atomic motifs One way of describing the local coordination structure around each atom is to use the mathematical Voronoi tessellation, which divides space into convex polyhedra, one for each atom The arrangement of neighbors around an atom determines the topology of the resulting Voronoi polyhedron Thus, the topology of an atom’s Voronoi cell can be used as a descriptor of the local structure In the CuZr glass, the Cu-centered ⟨0,0,12,0⟩ Voronoi polyhedra are the signature motifs of interest In this type of notation, the vector indices specify the number of 3-, 4-, 5-, and 6-edged facets in the coordination polyhedron Thus, we are looking specifically for Voronoi cells with 12 facets with edges and no other faces Let’s examine the glass with respect to these motifs Step B1: Insert the Voronoi analysis modifier into the pipeline and activate the Compute Voronoi Indices and the Use particle radii options You will get the following warning message: “The Voronoi tessellation contains faces with up to 12 edges […] You should consider increasing the maximum edge count parameter to 12 edges to not truncate the Voronoi index vectors and avoid this message.” This is because the maximum edge count parameter is originally set to 6, but the computed Voronoi tessellation turns out to contain higher order faces, requiring longer index vectors If you truncate the vectors after the 6th entry, different Voronoi polyhedra falsely might appear to be of the same type As suggested by OVITO, increase the edge count parameter value to 12 The error message should disappear now Step B2: Identify all Cu atoms that are centers of a ⟨0,0,12,0⟩ Voronoi polyhedron using the Expression selection modifier: The modifier reports the number of atoms matching the selection criteria Observe how the fraction is increasing as the glass is quenched from the melt Step B3: Let’s now highlight the selected atoms with a special color This can be accomplished with the Assign color modifier Here assigning a green color: www.ovito.org August 2019 LAMMPS Workshop and Symposium Task C: Visualizing the MD forces acting on the particles Disable the Particles and enable the Forces visual element and examine how the net forces acting on the atoms change during quenching (the atomic force vectors were read from the dump file) It might be helpful to apply the Slice modifier to restrict the visualization to a thin slab of atoms Set the slab width to Å, for example Task D: Visualize force magnitudes using colors Step D1: From the three components of the atomic force vectors we let OVITO compute their lengths using the Compute property modifier Let’s name the output property “Force Magnitude” and enter the Pythagorean formula for calculating the vector lengths: Step D2: Add the Color Coding modifier, which uses the stored information in the “Force Magnitude” property to assign colors to the particles Try different Color gradients If you rather prefer your own favorite color scheme, you can even load a template image with your custom color map www.ovito.org August 2019 LAMMPS Workshop and Symposium Task E: Analyze the distribution of particle property values Step E1: The Voronoi analysis modifier we’ve used above also calculates the volume of each Voronoi cell and stores it in a new particle property called “Atomic Volume” We can study the distribution of these values in the glass using the Histogram modifier: www.ovito.org August 2019 LAMMPS Workshop and Symposium Dataset 3: Lithium diffusion This dataset is from an MD simulation of Li4PS4I, which is a novel crystalline lithium ion conductor, see e.g Ref Here, an annealing simulation at T=600K was performed during roughly 10 ps and a snapshot was dumped every 20 fs One of our aims will be to calculate the mean squared displacements (MSD) of the diffusing Li atoms using OVITO Task A: But let’s first get familiar with the structure of the ion conductor crystal Load the simulation file “LiPSI.xyz" and use the Orbit camera viewport mode and a Slice modifier to look at and into the structure You will see that there are layers of PS4 tetrahedra that are separated by I ions Click on Play Animation to loop through the frames You can already see that in the host matrix, formed by the I- ions and PS43- tetrahedra, three-dimensional channels are present along which Li+ ions diffuse We will visualize this phenomenon in the next step Task B: Reproduce the picture from the right, showing a coordination polyhedra representation of the PS4 units and the trajectory lines of the Li ions Step B1: Use the Generate Particle Trajectories modifier to generate and display the trajectories of atoms Your machine might not be able to handle the resulting data size well In this case, increase the Every Nth frame setting to coarsen the trajectory lines Also disable the Particles visual element, so atoms not block your view on the trajectory lines First, generate the trajectories for all particles and pay attention to the effect of periodic boundary conditions Repeat the analysis with and without the Unwrap trajectories option You will see www.ovito.org August 2019 LAMMPS Workshop and Symposium which one makes sense here In the Trajectory display panel you can choose to partially visualize the particle trajectories up to the current time only Activate this option and press Play animation Step B2: The representation is still quite busy, so let’s reduce it a little by only showing trajectories of Li ions Do so by adding the Select type modifier into the pipeline, before (that means under!) the Generate Particle Trajectories modifier Selected particles will appear in bright red Then, in Generate Particle Trajectories, activate the option only for selected particles Now that’s better! Change the line color of the trajectories to match the violet color of the Li ions Note that the Select Color dialog has a Pick screen color function, letting you grab the color of the Li ions Step B3: Let’s now add the visualization of the PS4 tetrahedra For that we are going to need a set of bonds (spanning the tetrahedra) and a selected subset of particles (defining the centers of the coordination polyhedra) Reactivate the Particles display under Visual elements for now, so you can see what you are doing Use the Create Bonds modifier to generate bonds between P and S atoms only Play around with the pair-wise cutoff radius for S and P, enter different values in the table until you see four bonds being created for each P atom Now select the phosphor and sulphur atoms via Select type and add the Coordination polyhedra modifier Let’s make the tetrahedra match the color of the phosphor atoms, so again, change their color by using Pick screen color and clicking on a phosphor atom In a final step, disable the Particles and Bonds visual elements Good job! The visualization in the viewports should now look similar to the third panel in the figure above Task C: We are now going to calculate the mean squared displacement (MSD) of the Li atoms with the help of some Python code For that, you can first remove all modifiers you inserted for Tasks A and B from the pipeline, or temporarily disable them by unchecking the boxes next to them Also, activate the display of Particles again Step C1: Apply the Displacement vectors modifier to calculate the displacement of each atom with respect to the reference configuration (we use frame for that) The modifier outputs the displacement vectors and their magnitudes as two separate particle properties www.ovito.org August 2019 LAMMPS Workshop and Symposium Step C2: Now, we would like to calculate the mean squared displacement value for the subset of diffusing Li ions, making use of the atomic displacement magnitudes previously calculated by the Displacement vectors modifier Use the Select Type modifier to select the Li atoms (effectively setting their ‘Selection’ particle property to 1) Next, we will need a Python script modifier to insert a userdefined calculation function into the pipeline Click Edit Script and insert the following code into the editor window (replacing the existing code): import numpy as np def modify(frame, data): displacement_magnitudes = input.particles['Displacement Magnitude'] selection = input.particles['Selection'] sum = 0.0 for sel,d in zip(selection, displacement_magnitudes): if sel == 1: sum += d**2 msd = sum / np.count_nonzero(selection) print('MSD(Li) =', msd, '[Å^2] at frame', frame) data.attributes['MSD'] = msd This Python function accumulates the values of the ‘Displacement Magnitude’ property of selected particles, divides the result by the particle count and outputs the MSD value as a new global attribute to the pipeline Step C3: Export the computed MSD value as a function of time to a text file named “msd.txt” using Export File Select the output format Table of Values You can plot your analysis results with an external program of your choice, e.g gnuplot or Excel Task D: Render a video of the structure including the changing MSD value Step D1: First, make sure that the viewport (e.g “Perspective”) for which you are going to create a video is currently active (as indicated by a yellow border) Go to the Overlays tab of the command panel Use Add overlay to insert a Text label Enter „Frame [SourceFrame]“ into the text field and see what happens when you move the time slider to a different animation frame: OVITO replaces the placeholder with the current frame number Play around with the text color, size and position of the label Now add a second text label to the overlays list to display the computed mean squared displacement value of the Li atoms Under Variables you’ll find a list of all dynamic attributes that can be referenced in the label text “[MSD]” refers to the attribute that is calculated by our Python function from above Step D2: Now go to the Render tab: www.ovito.org 10 August 2019 LAMMPS Workshop and Symposium Select Complete animation, set the output file path for the rendered animation (select MPEG-4 (*.mp4) as output format) If you like, increase the output image size to a create a video with a higher resolution Finally, click Render Active Viewport to start the rendering process You should also try out the different rendering engines of OVITO The Switch renderer dialog let’s you choose between four different rendering engines (three on Windows platform) At least check out the Tachyon engine, which provides better visual quality than the default OpenGL renderer www.ovito.org 11 August 2019 LAMMPS Workshop and Symposium Dataset 4: Nanoporous particle Load the simulation file “30nm.data” It contains a static model of a nanoporous metallic particle with FCC crystal structure and a spherical shape Structures like this one can be obtained by simulating the spinodal decomposition process of a binary alloy For more details, please see Ref The demixing of the two atomic species (1 and 2) leads to a random bicontinuous structure of ligaments, which is depicted in the figures above Task A: Revealing the nanoporous network Step A1: There are two atom types in this simulation Add the Select Type modifier to the data pipeline to select particles of Type Next, delete this subset of particles using the Delete Selected modifier This removal of one species happens in experiments too: The less noble element in the alloy can be etched away, resulting in a nanoporous structure (a metallic foam) Step A2: Apply the Ambient Occlusion modifier to get a better perception of the three-dimensional shape of the structure This modifier modulates the brightness of particles according to a fast shading algorithm Note that the ordering of the modifiers in the pipeline is important Can you explain what the difference between the two pipelines below is? Step A3: You may have noticed that there are some free-floating atoms and atomic clusters that are no longer connected to the main continuous network after we did delete the second atomic species (see left figure below) We would like to get rid of these now and produce a single continuous ligament structure For this, make use of the Cluster Analysis modifier with an appropriate cutoff radius and don’t forget to activate its Sort clusters by size option The modifier groups atoms into connected clusters Do you understand what happens when the cutoff parameter is set too large or too small? www.ovito.org 12 August 2019 LAMMPS Workshop and Symposium Step 4: We now want to remove all atoms which are not part of the largest connected cluster Use the Expression Selection modifier (expression: “Cluster != 1“) in conjunction with Delete Selected modifier to remove all free-floating atoms that are not connected to the porous network (i.e particle cluster with ID — the largest one) Task B: Calculating the fraction of surface atoms Step B1: To obtain an estimate of the surface area of the porous structure, we will count the surface atoms now We identify surface atoms as those atoms which are under-coordinated, i.e., which have fewer neighbors than usual In the FCC crystal structure, bulk atoms typically have 12 nearest neighbors Use the Coordination Analysis modifier (with a cutoff radius of 3.2 Angstroms) to calculate the coordination number of each atom Apply the Color Coding modifier to visualize the coordination numbers Then use the Slice modifier to cut the structure open Now you can see the difference in coordination numbers between atoms on the surface and in the interior of the ligaments If you like, add a Color legend overlay to the viewport as shown in thee screenshot (optional) Step B2: Use the Expression Selection modifier to select those atoms which are under-coordinated (expression “Coordination < 12”) The status message of the modifier tells us that almost half of the atoms in this structure are surface atoms www.ovito.org 13 August 2019 LAMMPS Workshop and Symposium Task C: Construct a surface representation of the structure and measure its area Step C1: Add the Construct surface mesh modifier to the top of your pipeline Play around with the probe sphere radius and the smoothing level parameters The modifier reports the total area of the surface it has constructed in Å2 (in general: simulation units of length squared) Step C2: Next, we would like to produce a split visualization of the structure as shown in the figure above, where one part of the atomistic input structure is represented by a surface mesh To this end, place a Slice modifier before the Construct surface mesh modifier in the pipeline and activate its Create selection (do not delete) option as shown in the following screenshot This tells the modifier to select all particles on one side of the plane without deleting them Now we can tell the Construct surface modifier to operate only on the selected particles by setting the corresponding option Finally, after the surface has been constructed around the selected particles, you can hide them by appending a Delete selected modifier to the modification pipeline www.ovito.org 14 August 2019 LAMMPS Workshop and Symposium Step C3 (optional): If you like, you can give the remaining atoms a transparency effect We that using the Compute Property modifier Choose Transparency as output property and enter a value between 0.0 and 1.0 into the expression field Task D: Animate a parameter In addition to visualization and analysis functions, OVITO also provides powerful animation capabilities letting you produce attractive simulation movies For a detailed description have a look at the section Animation system of the user manual The following instructions will guide you through the steps which are necessary to animate the position of the slice plane from the previous task, which defines the border between the atomistic region and the surface mesh Step D1: Since we’ve loaded only one static simulation frame into OVITO, we need to manually define an animation range first Open the Animation settings dialog and enter the values shown below This tells OVITO to create an animation interval with 101 frames, all showing the one static simulation dataset OVITO supports a key-frame based animation system, which lets you specify the values of animatable parameters on different animation frames, for example on the first and the last animation frame The software will then automatically interpolate between these key values Since we want the slice plane to continuously move through the entire simulation box along the xdirection, we need to insert two animation keys: one at frame with a distance value of 200.0 and a second one at frame 100 with a distance value of 0.0 You can create these animation keys either (1) numerically by using the animation key dialog or (2) interactively using the auto-key mode Both methods are described next (1) Animation key dialog All animatable parameters in OVITO have small ‘A' buttons next to the corresponding input fields: www.ovito.org 15 August 2019 LAMMPS Workshop and Symposium Click on the ‘A’ button next the Distance input field of the Slice modifier to open the animation key dialog for this parameter and create a new animation key, i.e a time/value pair, in the table as depicted in the screenshot above The timeline should now show two animation keys, one on the first and one on the last frame of the animation, as shown in the screenshot: (2) Auto-key mode Animation keys can also be created using the auto-key mode, which is activated by the button in the animation toolbar While this mode is active (indicated by the red timeline), any change made to an animatable parameter in the program will automatically create a new animation key at the current animation time Thus, you can simply go to frames and 100 of the animation and interactively adjust the Distance parameter of the Slice modifier to the desired values to make the plane move from one end of the simulation box to the other Once you are done defining animation key values, don’t forget to deactivate the auto-key mode again. www.ovito.org 16 August 2019 LAMMPS Workshop and Symposium Dataset 5: Solid-liquid phase transition simulation Load the dump file “Cu.dump” This dataset is from an MD simulation of a two-phase (solid and liquid) copper system performed at constant volume and constant temperature T=1100 K, which is slightly below the melting point In fact, a series of these two-phase simulation at different temperatures is typically used to precisely determine the solid-liquid phase transition temperature predicted by an interatomic potential Task A: Identify all crystalline atoms using the Polyhedral template matching modifier (RMSD cutoff 0.15) and observe how the structure changes with time You can see that initially there is a thin crystalline slab surrounded by a melt What happens as the system is kept at 1100 K? Task B: Visually track the position of the two interfaces between the crystalline and the liquid phase Apply the Spatial binning modifier to compute the mean potential energy per atom (which was automatically imported from the input dump file as a particle property named “c_allpe”) within small slabs evenly distributed along the y-axis of the simulation box www.ovito.org 17 August 2019 LAMMPS Workshop and Symposium Start with a number of spatial bins of 20 Also, fix the plotting range of the y-axis: Now play the animation and observe how the potential energy profile changes with time Can you see how the low-energy solid region grows? www.ovito.org 18 August 2019 LAMMPS Workshop and Symposium [1] S Sicolo et al., Diffusion Mechanism in the Superionic Conductor Li4PS4I by First-Principles Calculations, Solid State Ionics 319, 83-91 (2018) https://doi.org/10.1016/j.ssi.2018.01.046 [2] B.-N Ngô et al., Anomalous compliance and early yielding of nanoporous gold, Acta Materialia 93, 144-155 (2015) https://doi.org/10.1016/j.actamat.2015.04.021 [3] Tobias Brink, Heterogeneities in Metallic Glasses: Atomistic Computer Simulations on the Structure and Mechanical Properties of Copper–Zirconium Alloys and Composites, PhD-Thesis, Technische Universität Darmstadt (2017) http://tuprints.ulb.tu-darmstadt.de/id/eprint/5858 www.ovito.org 19 ... static simulation frame into OVITO, we need to manually define an animation range first Open the Animation settings dialog and enter the values shown below This tells OVITO to create an animation... next (1) Animation key dialog All animatable parameters in OVITO have small ‘A'' buttons next to the corresponding input fields: www .ovito. org 15 August 2019 LAMMPS Workshop and Symposium Click... potential energy has previously been computed and stored in the dump file by LAMMPS and is loaded by OVITO as an additional particle property named “c_poteng” Plot of atomic energy vs centrosymmetry