Designing a New Algorithm for Crystal Structure Prediction in Magnetic Materials
Total Page:16
File Type:pdf, Size:1020Kb
KTH - Royal Institute of Technology Master of Science Thesis Designing a new algorithm for crystal structure prediction in magnetic materials Supervisors: Candidate: prof. Artem Oganov, Skoltech Michele Galasso prof. Anatoly Belonoshko, KTH June 2017 ii Abstract The USPEX code is a powerful and reliable methodology for crystal structure prediction in solid materials. It consists of an evolutionary algorithm which starts from a population of symmetrically generated structures and improves it at each step by making use of the best individuals. Two different methods are used in order to generate the first population: Topological Random and Symmetric Random. This thesis extends both of the above methods by implementing genera- tion of magnetic structures in USPEX. For Topological Random, magnetic structures are generated by placing different spin states in different Wyckoff positions of the unit cell, chosen with the right multiplicity. For Symmetric Random, instead, symmetry group decomposition is used in order to split magnetic atoms into two groups to which different spin states are assigned. For a better fulfillment of this task, also a new algorithm for magnetic struc- ture recognition has been introduced in USPEX. Finally, a computational test has been performed in order to test the new developed method. By confronting statistics on 1000 newly generated structures, the test shows that the implemented initialization improves the quality and the variety of structures if compared to random initialization. iii iv Acknowledgements First and foremost, I would like to thank my supervisor Prof. Artem Oganov for bringing me into his group with such open arms and for giving me con- stant support throughout the whole project. During these few months have been working in a wonderful environment, I met extraordinary people and I understood what it does really mean to work with science. I am deeply thankful to the whole USPEX team and in particular to Pavel Bushlanov, for giving me immediate and precious help all the countless times when I was stuck with some problem and for helping me a lot to improve my MATLAB and Python skills. I also would like to thank Prof. Anatoly Belonoshko for opening to me this thesis opportunity abroad and for giving me important help and feedback during the project. Thanks to him I have been not only working for five months with top level scientists, but I have also experienced the contact with a new and extremely interesting culture and I have become fluent in my fourth language. Last but not least, I would like to thank my family for making me who I am and for giving me constant support throughout all of the important choices I had to make in my life. v vi Contents 1 Introduction 1 2 The USPEX code 3 3 Structure generating tools 7 3.1 Topological Random . 7 3.2 Symmetric Random . 9 4 Generation of magnetic structures 11 4.1 Spin states . 11 4.2 Initialization . 14 4.2.1 Topological Random . 14 4.2.2 Symmetric Random . 16 5 Identification of magnetic types 25 5.1 Neighbour determination . 27 6 Test of the new algorithm 29 6.1 Energy statistics . 29 6.2 Spin statistics . 30 7 Conclusions 33 Bibliography 35 A MATLAB and Python functions 37 A.1 magnetize_numIons.m ...................... 37 A.2 initialize_magMom.m ...................... 44 A.3 getSpinGuide.m ......................... 46 A.3.1 applySymmetry.m ..................... 49 vii viii Contents A.4 magTypeIdentify.m ....................... 50 A.5 determineNeighbors.m ..................... 52 A.5.1 coordination_numbers.py ............... 54 A.5.2 dists.py ......................... 55 Contents ix Chapter 1 Introduction This project consists in designing and implementing a series of new func- tions for the USPEX code, a powerful evolutionary algorithm for crystal structure prediction in solid materials. In particular, we aim to improve ini- tialization of magnetic structures in order to make searches for new magnetic materials more efficient and robust. Chapter 2 gives a general presentation of the USPEX code and of its working principles. It also contains a num- ber of references to scientific publications in which the various algorithms implemented in USPEX are explained in more detail. Chapter 3, instead, focuses on the available tools for structure generation, Topological Random and Symmetric Random, and explains their working principles. After this preliminary treatment, chapter 4 tackles the problem of magnetic structure generation. It starts with an introduction to the different possible spin states of magnetic atoms and then it explains how we implemented initialization of magnetic structures, first in Topological Random and then in Symmetric Random. In order to check if the symmetrically generated structures are of the desired magnetic type, we have also implemented in USPEX a new algo- rithm capable of determining the magnetic type of a general structure. This algorithm is introduced and described in chapter 5. Finally, we measured the performance of the newly implemented generation of magnetic structures by means of a computational test. This test, together with its detailed results, is described in chapter 6. It shows that the newly implemented algorithm improves the quality and the variety of magnetic structures if compared to random spin initialization. In appendix A we report the source code of all the new functions that have been introduced in USPEX with this project. The explanation of the code and references to the different subsections of appendix A are provided 1 2 Chapter 1. Introduction throughout the whole text of the thesis. Chapter 2 The USPEX code The USPEX code [1] is an efficient and reliable methodology for crystal structure prediction originally conceived by Artem R. Oganov and Colin W. Glass at the ETH Zurich in 2004. Its main purpose is the prediction of the stable crystal structure for a given chemical compound at any pressure and temperature condition, without requiring any experimental input. In addition, USPEX predicts for the given compound also a number of low- energy metastable structures and it calculates several other material prop- erties. USPEX is mostly written as a set of MATLAB functions, to which some Python scripts are mixed. This combination of programming languages exists because, at the time of this project, the USPEX developing team was working on the new version 10.1 which will be released completely rewritten in Python code. The knowledge of the crystal structure is the most important piece of information about crystalline solids, since many physical properties can be calculated from it. However, the problem of crystal structure prediction on fully theoretical basis is an old riddle of science and despite many different approaches have been proposed [2–4], their success rates and their limits of applicability have always revealed very harsh if compared to USPEX [5]. The purpose of any algorithm that attempts to predict the crystal structure of some material is to find the arrangement of atoms in the unit cell which corresponds to a minimum of the Gibbs free energy. The mathematical function that links all possible structures of a particular compound with their Gibbs free energy is called free energy landscape of the material. It is immediately evident that this energy surface is extremely complex and multidimensional and a point by point exploration of the whole landscape is 3 4 Chapter 2. The USPEX code not viable with the computing power available today 1. Unlike its predecessors, which focused mainly on exploring one or a few good regions of the free energy landscape, USPEX tries to scan it as whole looking for the most promising regions and it does it by merging ab initio total energy calculations with a specifically devised evolutionary algorithm. The term ab initio in physics is used to denote a type of calculation made from well established physical laws, which does not use any empirical as- sumption. An evolutionary algorithm, instead, is an algorithm which selects the best solutions for a given problem by starting from an initial population of possible solutions and by improving this population at each step, simu- lating the natural process of Darwinian evolution. Evolutionary algorithms are very general and they can be applied to a big class of scientific problems. In particular, through the USPEX code, they have revealed to be successful also in the field of crystal structure prediction. The success of the evolutionary approach for chemical systems can be explained in terms of the properties of their free energy landscape. As al- ready mentioned the whole exploration of this surface is not viable due to its enormous size, but luckily only a tiny fraction of it corresponds to reason- able physical structures. In addition, due to crystal symmetry, to one good structure in general correspond many equivalent minima of the free energy surface and due to the similarity of good structures most or all of the low energy minima are located in the same region of the landscape. Therefore, the aim of USPEX is to locate these small and promising regions and to con- centrate there the search for the stable crystal structure. Its evolutionary algorithm consists of the following steps: 1. Initialization: the first generation is produced randomly. 2. The structures are relaxed to the nearest local minimum by means of ab initio energy calculations. For this step USPEX can use several first-principles simulation packages, and in this project we have used VASP [6]. 3. Among the locally optimized structures, a certain number of the worst ones are rejected and the remaining structures participate in creat- ing the next generation through the action of variation operators. A specified number of the best structures (usually, one) in the current generation survive and compete in the next generation. 1The dimensionality of the free energy surface is 3N + 3, where N is the number of atoms in the unit cell.