Strained lattice vectors generator for SIESTA - Uniaxial strain in 2D materials - Set Up and Post-Processing
Description
This dataset contains a Python script (Strained_Vec_Generator_uniax.py) and an example demonstrating its use for applying uniaxial strain in both the x and y directions to a graphene structure (a 2D material in the xy-plane). Use the siesta.STRUCT_OUT file to see how the script works. It also includes a Python script for post-processing the data generated by this procedure (you will need to run the 0% strain case beforehand to obtain the .STRUCT_OUT file from SIESTA, which is provided here as an example). You can use the post-processing script with the X and Y folders provided in the Post-processing.zip file as an example, used for a BCN material. To quickly see how the Python script works, place siesta.STRUCT_OUT and Strained_Vec_Generator_uniax.py in the same folder and run the following command in the linux terminal (for Python 3): $ python3 Strained_Vec_Generator_uniax.py This will generate strained siesta.fdf files with strained lattice vectors (1-30%) for X and Y directions. Use the copy.tcl script to copy the run.fdf and C.psf files inside X or Y. Modify the run.fdf in the %block GeometryConstraints before using the copy script. More details in steps to reproduce and in the readme.txt file. Note: If the material of interest has a non-rectangular unit cell, you can extend the original structure and extract an appropriate rectangular supercell from it. Then, follow the same procedure described in steps to reproduce. Non-rectangular cells don't have the orthogonal X and Y directions as assumed here, and for them it is not trivial to clearly define something like X and Y directions for strain. This approach is ideal if the structure is stored in a separate .fdf file. In the example, the SIESTA run parameters are in the file run.fdf, while the structure information is in siesta.fdf (generated after you run the Strained_Vec_Generator_uniax.py script), which is included in run.fdf via %include siesta.fdf. You may rename these files as desired (e.g., parameters.fdf and structure.fdf), provided that you update the system_label in the script. For the post-processing part, a script named 2Strain_post_processing.py is provided. After you run all the calculations, use it to output the results automatically. You can extract the .zip file and run $ python3 2Strain_post_processing.py . This methodology greatly simplifies the investigation of mechanical properties of 2D materials using SIESTA. See the readme.txt file for more details. Associated PhD Thesis available at https://repositorio.ufrn.br/home. Tittle: Structural, optical, electronic and mechanical properties of two-dimensional BxCyNz based materials.
Files
Steps to reproduce
The Strained_Vec_Generator_uniax.py code takes the SIESTA output file label.STRUCT_OUT and generates .fdf files with strained lattice vectors. To use the script and generate the strained files, you only need the label.STRUCT_OUT file from a SIESTA optimization (to obtain the 0% strain reference). You must also edit the script according to your structure if you have a different number of species or atoms. If your structure contains only carbon atoms, just verify the number of atoms in the manual input section of the script. See the file readme.txt for more details. Place the .STRUCT_OUT file and the edited Strained_Vec_Generator_uniax.py script in the same folder. Then run the Python script (e.g., via Linux terminal: $ python3 Strained_Vec_Generator_uniax.py). This will generate the strained structures (siesta.fdf files) with lattice vectors corresponding to strain values from 1% up to the final point defined in the script (default: 30%, i.e., 1–30% strained structures). It also generates additional structures for small strains (0.1–0.9%) to facilitate Young’s modulus calculations (by evaluating the slope of the stress–strain curve from 0 to 1%). All .fdf files will have the same name but will be organized into different folders, numerically labeled with the strain value and separated by direction (X and Y). Now copy three files into both X and Y: run.fdf, C.psf, and copy.tcl. The copy.tcl script copies run.fdf and the pseudopotential file C.psf into each numerical folder. Use it, inside either X or Y, via: $ source copy.tcl With the run.fdf and C.psf files located in the same folder, inside either X or Y; notice that the run.fdf is different for each direction. See the file provided, and uncomment the appropriate line in the %block GeometryConstraints before using the copy script. In summary: -Run the Python script to generate the folders and strained structures. -Edit run.fdf for strain in the X or Y direction, and copy it along with C.psf into the corresponding X or Y folder. -Inside each main folder (X or Y), run the copy.tcl script (not inside the numerical subfolders). -Finally, execute: $ ./siesta run.fdf > label.out , inside each numerical folder to perform the calculations (this can also be automated, just edit the copy.tcl script). Another Python script is provided for processing the data and outputting the results, namely, the Young modulus and ultimate strength. To use it, go outside the X and Y folders (not inside one of them) and run the script. It will generate the figures, the data, and the values in the terminal. See the readme.txt file for more details.
Institutions
- Universidade Federal do Rio Grande do NorteRio Grande do Norte, Natal