BVlain is a python library for bond valence site energy calculations. The functionality includes calculation of the 1-3D percolation barrier and radius of a mobile ion (e.g. Li+), calculation of the bond valence sum mismatch, writing of volumetric data files (.grd or .cube) for visualization of a mobile ion diffusion map.
For more details, see documentation.
Installation
pip install bvlain
Examples
Percolation barriers
from bvlain import Lain
file = './Downloads/LiFePO4.cif'
calc = Lain(verbose = False)
atoms = calc.read_file(file) # alternatively, you can use read_atoms() or read_structure()
params = {'mobile_ion': 'Li1+', # mobile specie
'r_cut': 10.0, # cutoff for interaction between the mobile species and framework
'resolution': 0.2, # distance between the grid points
'k': 100, # maximum number of neighbors to be collected for each point
'use_softbv_covalent_radii': False # default is False, use True to compare results with softBV
}
_ = calc.bvse_distribution(**params)
energies = calc.percolation_barriers(encut = 5.0)
for key in energies.keys():
print(f'{key[-2:]} percolation barrier is {round(energies[key], 4)} eV')
1D percolation barrier is 0.4395 eV
2D percolation barrier is 3.3301 eV
3D percolation barrier is 3.3594 eV
Save volumetric data for visualization (.grd or .cube)
from bvlain import Lain
file = './Downloads/LiFePO4.cif'
calc = Lain(verbose = False)
atoms = calc.read_file(file)
params = {'mobile_ion': 'Li1+', # mobile specie
'r_cut': 10.0, # cutoff for interaction between the mobile species and framework
'resolution': 0.2, # distance between the grid points
'k': 100 # maximum number of neighbors to be collected for each point
}
_ = calc.bvse_distribution(**params)
calc.write_grd(file + '_bvse', task = 'bvse') # saves .grd file
# calc.write_cube(file + '_bvse', task = 'bvse') # alternatively, save .cube file
Percolation radii
from bvlain import Lain
file = './Downloads/LiFePO4.cif'
calc = Lain(verbose = False)
atoms = calc.read_file(file)
params = {'mobile_ion': 'Li1+', # mobile specie
'r_cut': 10.0, # cutoff for interaction between the mobile species and framework
'resolution': 0.2, # distance between the grid points
}
_ = calc.void_distribution(**params)
radii = calc.percolation_radii()
for key in radii.keys():
print(f'{key[-2:]} percolation barrier is {round(radii[key], 4)} angstrom')
1D percolation barrier is 0.3943 angstrom
2D percolation barrier is 0.2957 angstrom
3D percolation barrier is 0.1972 angstrom
calc.write_grd(file + '_void', task = 'void') # # save void distribution
Bond valence sum mismatch
from bvlain import Lain
file = './Downloads/LiFePO4.cif'
calc = Lain(verbose = False)
atoms = calc.read_file(file)
dataframe = calc.mismatch(r_cut = 3.5)
For more examples, see documentation.
The library is under active development and it is not guaranteed that there are no bugs. If you observe not expected results, errors, please report an issue at github.
Metadata
Release files for bvlain 0.25.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bvlain-0.25.1.tar.gz | 59.6 kB | Without provenance | Details for bvlain-0.25.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bvlain-0.25.1-py3-none-any.whl | Python 3 | none | any | Details for bvlain-0.25.1-py3-none-any.whl |
Total release size: 119.7 kB
Release files / bvlain-0.25.1.tar.gz
| Download URL | bvlain-0.25.1.tar.gz |
|---|---|
| Size | 59.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
55c63944bccca3a1c4bff2ebe57188c82123716682c01215ece02c7648aa9016
|
|
BLAKE2b-256 checksum How to use checksums |
cde2c3f784736f01e9516104e5f6bcefccf73c0e9151f6811ee5d34923efeec8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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.66.2 CPython/3.8.8
|
Release files / bvlain-0.25.1-py3-none-any.whl
| Download URL | bvlain-0.25.1-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c785978dc69c0dab1939ec3b5e1832518ccd3237eea2c572ba65b0a5ae78701
|
|
BLAKE2b-256 checksum How to use checksums |
a9592f801132ace647ddba5494b9f03a8b67feb29163e8707af425695a07bdbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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.66.2 CPython/3.8.8
|
Security for bvlain 0.25.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.