A tool for finding percolation pathways in crystals
Project description
About
Perconeb is the library used for fast identifying of the optimal jumps mobile species required for the percolation in a crystal structure.
The identified jumps can be used for nudged elastic band (NEB) clalculation of the mobile species activation barriers.
Functionality includes:
-
1-3D percolation radius calculations (percolation threshold)
-
cutoff search for the shortest ionic jumps between equilibrium positions
-
identifying of unique jumps required for 1-3D percolation
-
initial trajectory preparation for NEB calculations
Installation
!pip install perconeb
How to use
from core import Perconeb
from ase.io import read
file = '/Users/artemdembitskiy/Desktop/perconeb/LiCoO2.cif'
atoms = read(file) # can be .cif, POSCAR, or any that is readable by ase
specie = 3 # mobile specie, atomic number
tr = 0.75 # minimum allowed distance between linear segment connecting i,j-th positions of mobile specie
# and the framework, angstrom
upper_bound = 10.0 # maximum allowed distance for intersite hops of mobile species, angstrom
calc = Perconeb(atoms, specie, upper_bound = upper_bound)
dim, cutoff = calc.percolation_dimensionality(tr = tr)
dimensions = {2: 1, 4: 2, 8: 3} # we use 2x2x2 supercell to evaluate the percolation dimensionality
# if there is a connection between some point in the unitcell
# and its closest replica within supercell then we have the percolation
# number of connected unitcell and dimensionality are related as follows
# 2 -> 1D, 4 -> 2D, 8 -> 3D
print(f'Maximum percolation dimnesionality is {dimensions[dim]}')
print(f'That requires mobile specie hops up to {round(cutoff, 3)} Angstorm')
Maximum percolation dimnesionality is 3
That requires mobile specie hops up to 4.922 Angstorm
Inequivalent mobile specie hops (edges)
edges, edge_ids, inverse = calc.unique_edges(tr = tr, dim = dim, cutoff = cutoff)
edges # each edge is represented by a 5D vector [i, j, offset_x, offset_y, offset_z]
for edge in edges:
source, target = edge[:2] # indices of source and target mobile atoms in the mobile sublattice
offset = edge[2:]
p_source = atoms[atoms.numbers == specie].positions[source]
p_target = atoms[atoms.numbers == specie].positions[target]
distance_vector = p_source - (p_target + np.dot(atoms.cell, offset))
distance = np.linalg.norm(distance_vector)
print(f'Source {source}, target {target}, offset {offset}, hop distance {round(distance, 4)}')
Source 0, target 1, offset [0 0 0], hop distance 4.9124
Source 0, target 0, offset [ 1 -1 0], hop distance 4.7593
Source 0, target 0, offset [0 1 0], hop distance 2.4346
Initial gues for NEB
sep_dist = 8.0 # minimum size of the supercell, Angstrom
idpp = False # whether to use IDPP or linear interpolation scheme
step = 1.0 # interpolation step, Angstroms
out = calc.neb_guess(edges, edge_ids,
min_sep_dist = sep_dist,
idpp = idpp,
step = step
)
calc.write_traj(out, f'{file}_traj.cif') # the whole trajectory can be visualized in jmol
Save percolating pathway within supercell
from ase.io import write
file = '/Users/artemdembitskiy/Desktop/perconeb/LiCoO2.cif'
atoms = read(file)
specie = 3
calc = Perconeb(atoms, specie, upper_bound = 10.0)
dim, cutoff = calc.percolation_dimensionality(tr = 0.75)
mask = calc._filter_edges(tr = 0.75, cutoff = cutoff)
sublattice = calc.mobile_supercell
base = sublattice.copy()
for pair in calc.u[mask][:, :2]:
p1, p2 = sublattice.positions[pair]
traj = np.linspace(p1, p2, 10)
for p in traj[1:-1]:
base.append('B')
base.positions[-1] = p
write('percopath.cif', base)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file perconeb-0.1.1.tar.gz
.
File metadata
- Download URL: perconeb-0.1.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3710cbe7bfe00d0b407a07677ee4f1c94d9edb07b6576b1f499a7975b3de28cc |
|
MD5 | 824ece5452133d86bb338ee76e33e098 |
|
BLAKE2b-256 | ca85f675dd86c7079c0b877a099a1200b50dbeab3dcd428025399526c3ce708c |
File details
Details for the file perconeb-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: perconeb-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.8.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4173bc8791e769594a90adf07fb1783e40b008685dbb0c9cf9d5181f248badeb |
|
MD5 | 918a30e00382a76b5e9b70f16de5095e |
|
BLAKE2b-256 | 9d5b7ebfc9ef6439b52d74fb953520fda6fa61d6a9b54b1720184a4a96b9b0c1 |