Skip to content

Python script for generating coherent C15 phases in a BCC crystal with LAMMPS

License

Notifications You must be signed in to change notification settings

mb4512/C15builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C15builder

Python script for generating coherent C15 phases of arbitrary size in a base-centered cubic crystal with LAMMPS

The construction roughly follows the prescription outlined in M.-C. Marinica, F. Willaime, and J.-P. Crocombette, Phys. Rev. Lett. 108, 025501.

Getting started

git clone https://github.com/mb4512/C15builder.git

The script requires LAMMPS to be built with the MANYBODY package to enable support for embedded atom model (EAM) potentials. LAMMPS must be compiled as a shared library linked to Python 3+ with the numpy, scipy, and mpi4py packages. See the LAMMPS documentation for more information on how to set this up.

The json/*.json files contains simulation settings such as box dimensions in x,y, and z, and paths to important files and directories, such as the EAM potential file and the data directory. Update the paths as appropriate for your system. The json file acts as the input file for the simulation, enabling the running of multiple similar simulations without having to manually edit the Python script.

Running the code

To build an example C15 cluster containing 10 interstitials in iron from the terminal, first ensure that an iron EAM potential is available, for example M07_eam.fs by Malerba et al. (2010) available at the NIST Interatomic Potentials repository. To run the relaxation in parallel using 8 cores, run the script as follows:

mpirun -n 8 python3 icosa.py json/test.json 10

As the simulation runs, the structure is initialised and relaxed. The following output files are written:

  • data/test.ico.10.xyz: xyz file of interstitial and vacancy coordinates required to create the C15 phase inside the BCC crystal
  • data/test.unrelaxed.10.data: LAMMPS data file of the C15 phase before structural relaxation
  • data/test.relaxed.10.data: LAMMPS data file of the C15 phase after structural relaxation

In practice, the unrelaxed structure test.unrelaxed.10.data is constructed by inserting into and deleting atoms from the pristine BCC crystal following the prescription of test.ico.10.xyz. This repository already comes with the test.ico.*.xyz output files for sizes in the range between 2 and 100 interstitials. Note that these structures do not represent the global energy minimum of a C15 phase in BCC, as we do not optimise for the precise shape; for this purpose, some heuristic global minimisation scheme must be used, for example as outlined by Alexander et al. (2016). In principle, this script could be modified for this purpose.

About

Python script for generating coherent C15 phases in a BCC crystal with LAMMPS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages