Closed hongyi-zhao closed 1 week ago
Based on the related documentation here and here, I got the following solution based on the method here in order to demonstrate some of the methodology conventions of simulating elasticity calculations adopted by the materials project. The details and parameter settings of the vasp calculations may not necessarily be consistent, so the final results cannot be directly and accurately compared with those in the Materials Project database.
In the following test, we use the cif structure file from the legacy database to prepare the POSCAR, as shown below:
# Steps to do the test, using Si_mp-149_primitive.cif as an example:
# Use your python venv accordingly:
$ pyenv shell datasci
$ python struct2conv.py -i Si_mp-149_primitive.cif -o Si_mp-149_conventional_standard.vasp
$ mkdir Si_mp-149_conventional_standard && cd Si_mp-149_conventional_standard
$ ln -sfr ../Si_mp-149_conventional_standard.vasp POSCAR
$ (echo 101; echo DC)|vaspkit
$ (echo 102; echo 2; echo 0.03)|vaspkit
# Comment out the `NPAR` tag in INCAR and run the vasp calculation:
$ mpirun -n 16 vasp_std
# Extract the elastic tensor
$ echo 203 |vaspkit
# Convert elastic tensor to IEEE format
$ python ../elastic2ieee.py
All related necessary files and scripts are as follows:
See below for the related discussions and tools:
Hi there,
I have a question about transforming elastic constants when changing the basis/coordinate system. Does pymatgen provide functionality for this kind of transformation?
Specifically, I want to:
Is there a built-in method to do this in pymatgen? If not, what would be the recommended way to implement this?
Thanks in advance! Zhao
P.S.:
The following things seem to have something to do with this problem:
https://pymatgen.org/pymatgen.core.html#pymatgen.core.operations.SymmOp.transform_tensor
https://github.com/materialsproject/pymatgen/blob/0e65d35ae0b1df964639a48067b1a525979eec84/src/pymatgen/core/tensors.py#L406
But the documentation link shown here is outdated: