pyCSRO is a python package using pairwise multi-component short-range order (PM-SRO) parameters to discover the chemical short range ordering in materials, including crystalline, amorphous, and high-entropy alloys, etc. The PM-SRO parameter was extended from the Warren-Cowley short-range order (WC-SRO) to describe the local distribution of element pairs in the multicomponent system, which is defined as:
where
Note that in order to keep the same meaning of the
- Python 3.9+
- matplotlib
- numpy
- scipy
- ase
- pymatgen
The pyCSRO package requires Python 3.9 or later, and run the following command to install it:
pip install pycsro
If you prefer to install from sources, navigate to the source archive directory and run:
python setup.py install
from pycsro.main import run_pycsro_pmsro
run_pycsro_pmsro(ion1, cutoff1, file_name, cutoff2, save_name, skip_distance, plot_save, cal_same_pair, safe_mode, partial_neighbors, xyz)
-
ion1
: The selected elements for the PM-SRO calculation. (Required, range: elements in the structure model, type: str) -
cutoff1
: The cutoff of thr 1st shell. (Required, range: positive number, type: float) -
cutoff2
: The cutoff of the 2nd shell. (Cutoff2 should be equal or greater than cutoff1, range: positive number, type: float) -
file_name
: The absolute path of input file. (Required, type: str) -
save_name
: The absolute path of saved file. (type: str) -
skip_distance
: Skip the neighbor distance under this parameter. (Default: 0.1, range: positive number, type: float) -
cal_same_pair
: Whether calculate the wcp of same elements but different center atoms. (Default: Yes, range: Yes or No, type: str) -
safe_mode
: Whether use the supercell selection function, which can reduce the calculation time. (Default: No, range: Yes or No, type: str) -
plot_save
: Whether save the neighbor plot. (Default: No, range: Yes or No, type: str) -
partial_neighbors
: Whether plot the partial neighbor distribution of atoms in the cell. (Default: No, range: Yes or No, type: str) -
xyz
: Whether use the xyz mode to read input file. (Default: No, range: Yes or No, type: str)
Attention:
- The calculation requires the user to input parameters of
ion1
,cutoff1
, andfile_name
. - Supported input file formats incllude
CIF
,POSCAR
,xyz
, and more. - For compounds, cations and anions should be placed in different ion groups, and calculated separately.
- You can try a larger cutoff value at the first time, and then adjust the cutoff value to the trough of the neighbor distribution.
- The second shell was defined as cutoff1 to cutoff2.
- Noremaly, the program automatically detects the xyz input file without specifying an additional xyz parameter. This parameter can be manually selected when the automatic judgment fails.
- When the input file is in xyz format, the radial distribution function will be switched to the local neighbor statistics function.
Example models are placed at /example/
.
The basic command for running PbTe system:
run_pycsro_pmsro(ion1='Pb Te', cutoff1=3.7, cutoff2=5, file_name='PbTe_pcell.vasp', save_name='PbTe.txt', partial_neighbors='y')
The output:
+-----------------------------------------------------------------------------
| Element group: ['Pb', 'Te']
| Cutoff for the 1st shell: 3.7 Å Cutoff for the 2nd shell: 5 Å
| Read file: PbTe_pcell.vasp Save file: PbTe.txt
| Skip neighbor distance under 0.1 Å
| Calculate same pair: Yes Safe mode: No
+-----------------------------------------------------------------------------
| The PM-SRO parameter for ['Pb', 'Te'] element group in the 1st shell
| Pb-Pb 1.0
| Pb-Te -1.0
| Te-Pb -1.0
| Te-Te 1.0
+-----------------------------------------------------------------------------
| The PM-SRO parameter for ['Pb', 'Te'] element group in the 2nd shell
| Pb-Pb -1.0
| Pb-Te 1.0
| Te-Pb 1.0
| Te-Te -1.0
+-----------------------------------------------------------------------------
The basic command for running Cu xyz system:
run_pycsro_pmsro(ion1='Cu', cutoff1=3, cutoff2=5, file_name='Cu.xyz', save_name='Cu.txt', partial_neighbors='y')
The output:
+-----------------------------------------------------------------------------
| Element group: ['Cu']
| Cutoff for the 1st shell: 3 Å Cutoff for the 2nd shell: 5 Å
| Read file: Cu.xyz Save file: Cu.txt
| Skip neighbor distance under 0.1 Å
| Calculate same pair: Yes Safe mode: No
+-----------------------------------------------------------------------------
| Reading the XYZ file!
+-----------------------------------------------------------------------------
| The PM-SRO parameter for ['Cu'] element group in the 1st shell
| Cu-Cu 0.0
+-----------------------------------------------------------------------------
| The PM-SRO parameter for ['Cu'] element group in the 2nd shell
| Cu-Cu 0.0
+-----------------------------------------------------------------------------
For more information, please email Prof. Long Yang at long_yang@tongji.edu.cn