latgen : a lattice generation code # Author: Ling-Ti Kong, konglt_AT_sjtu.edu.cn #------------------------------------------------------------------------------- This code helps to prepare the atomic position file needed by MD codes, as well as the map file needed by fix-phonon. Several typical lattices with different orientations have been coded, yet the user can provide their unit cell info and uses this code to generate the atomic position file for their system of interest as well. In general, the "orientation" means the crystalgraphic direction that will be aligned to the z axis of the cartesian coordinate system. When one wants to create the atomic position based on their own lattice (option 7 in the main menu), one can choose to input the unit cell related info step by step or by providing an input file. In the latter case, the format of the input file is the same as the POSCAR of VASP 5. Here is an example of FCC Cu, with the conventional orientation: #------------------------------------------------------------------------------- Comment 3.615 1 0 0 0 1 0 0 0 1 Cu 4 Direct 0. 0. 0. 0.5 0.5 0. 0.5 0. 0.5 0. 0.5 0.5 #------------------------------------------------------------------------------- The 1st line is a comment, the 2nd line is the lattice constant or scaling factor of the lattice, the 3rd-5th lines are the basis vectors that define the unit cell. The 6th line lists the element names, and the 7th line lists the number of atoms for each kind of element; here we just have one kind of element, and 4 atoms in a convention cell of FCC Cu. From the 9th line, the coordinates are listed. The coordinates are fractional, i.e., in unit of alat * A1, alat * A2, alat * A3. Please note that this code is written for personal use only, no support or warranty will be provided. But if any bug found, feel free to drop a line to konglt@sjtu.edu.cn. For updates, please check: https://github.com/lingtikong/latgen.git #------------------------------------------------------------------------------- INSTALL: It should be very easy to compile this code: 1) Modify the Makefile, set the correct path info for your compiler; The as-provided Makefile should work under most Linux systems. 2) make 3) cp latgen ~/bin #------------------------------------------------------------------------------- Author: Lingti Kong, konglt(at)sjtu.edu.cn May 2020