Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

perconeb-0.1.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

perconeb-0.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file perconeb-0.1.tar.gz.

File metadata

  • Download URL: perconeb-0.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

Hashes for perconeb-0.1.tar.gz
Algorithm Hash digest
SHA256 7f31f7cf07681cd3dc67d91d82776347818821863822953b6d29754ce1cbd76d
MD5 4f85965a90fe7cce9ef5a2817da52a83
BLAKE2b-256 70f1b22c24d9c6521646e2fa4cf7df2387e1a1eac401e66e0e489222033c79da

See more details on using hashes here.

File details

Details for the file perconeb-0.1-py3-none-any.whl.

File metadata

  • Download URL: perconeb-0.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

Hashes for perconeb-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4030216782fecf91fc2185c6da2c00cc8f07e3a79bfe424d52521452f3ab4f62
MD5 c0ca51b6b027969d054ef9963d6029da
BLAKE2b-256 6933298ba1fab317ba5cd1153cda14a4cbe74655bc75f85dd797b5fe50e7ea54

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page