Skip to content

Commit

Permalink
Develop (#196)
Browse files Browse the repository at this point in the history
* Image augmentation.

* Augment images.

* Augment images.

* Specie update.

* Add Latt2D, STM image (b-1) fix, image augmentation fix.

* Add Latt2D, STM image (b-1) fix, image augmentation fix.

* Update conf.py

* Update conf.py

* Multi-output graph bacthing.

* Add EDOS dataset.

* Temp.

* Add circuit maker.

* Add circuit maker.

* NELECT update.

* Version update, more DBs added.

* Fix CHGCAR vasp.

* Added volumetric reshape for CHGCAR.

* Tmp

* Tershoff Hamman update, specie update.

* Add crop from center in STM.

* Add Fourier transfor in STM.

* Update STM pytest.

* Add DPI to STM.

* Zeo++ added, Atoms cif update, STM update, random vacancy maker added.

* Atoms tempfile fix, Potcar from atoms module added.

* Test for docs.

* C2DB link update, docs Atoms update.

* C2DB link update, docs Atoms update.

* Version update, COD DB, QM9 JCTC DB added.

* Compostion bug fix, elemental descriptor added.

* Develop (#186)

* Update outputs.py

I added the calculation of the Raman intensities inside parse_raman_dat

* Update outputs.py

* Update outputs.py

* Update outputs.py

* Update cfid.py

* Delete __init__.py

* stylecss added.

* stylecss added.

* Adding extra Makefile/

* Remove examples from docs.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Docs update.

* Tutorials update.

* Tutorials docs update.

* Docs update,pdb reader updated.

* Update action_build.yml

* Update action_build.yml

* Remove pytraj strong dependencies.

* Update docs, Added PDBBind and HPOV datasets.

* Docs update.

* Add thcikness to surface builder.

* Surface builder update, Chemical only magpie descriptors added, pdb_core dataset added, zeopp tempfile bugfix.

* Typo fix.

* Add names to chem descs.

* Lessen hermsolver pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* Reduced pytest.

* No DFT3D

* Exclude dft_3d dataset for memory issue.

* Update figshare test.

* Update figshare test.

* Exclude db from coverage.

* Exclude db from coverage.

* Add magpie.json.

* Add magpie.json.

* Wien2k bands bug fix.

* Wien2k bands bug fix.

* Update JARVIS-FF,Elastictensor,LAMMPS parse folder, VASP bandstructure plot code.

* JFF update.

* Add JQE_TB3 and hMOF dataset.

* Update LAMMPS module.

* Update LAMMPS module.

* Fix elastic tensor module.

* Figshare update, docs db name update.

* Substitutions.

* Update figshare dft_3d, cfid_3d.

* Docs data update.

* Generate substitutions.

* Lint fix.

* Update DOS.

* Update DOS.

Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>
  • Loading branch information
4 people authored Aug 19, 2021
1 parent b691653 commit d261bba
Show file tree
Hide file tree
Showing 9 changed files with 115 additions and 15 deletions.
2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Documentation

https://jarvis-tools.readthedocs.io

https://jarvis-materials-design.github.io/dbdocs/


Capabilities
-----------------------------------------
Expand Down
4 changes: 3 additions & 1 deletion docs/source/databases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Databases
==================== ========================= =======================================================
Database name Number of data-points Description
==================== ========================= =======================================================
``dft_3d`` 48527 Various 3D materials properties in JARVIS-DFT database
``dft_3d`` 55723 Various 3D materials properties in JARVIS-DFT database
computed with OptB88vdW and TBmBJ methods
``dft_2d`` 1079 Various 2D materials properties in JARVIS-DFT database
computed with OptB88vdW
Expand Down Expand Up @@ -37,6 +37,8 @@ Database name Number of data-points Description
``pdbbind`` 11189 Bio-molecular complexes database from PDBBind v2015
``qmof`` 18321 Bandgaps and total energies of metal organic frameowrks
in QMOF database
``cfid_3d`` 55723 Various 3D materials properties in JARVIS-DFT database
computed with OptB88vdW and TBmBJ methods with CFID
``raw_files`` 144895 Figshare links to download raw calculations VASP files
from JARVIS-DFT
==================== ========================= =======================================================
Expand Down
2 changes: 1 addition & 1 deletion jarvis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
"""Version number."""
__version__ = "2021.08.05"
__version__ = "2021.08.18"
70 changes: 70 additions & 0 deletions jarvis/analysis/defects/substitutions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
"""Modules for making point-defect substituions."""
from jarvis.analysis.structure.spacegroup import Spacegroup3D
from jarvis.core.utils import rand_select
from jarvis.core.atoms import Atoms, get_supercell_dims


def generate_defect(
atoms=None,
enforce_c_size=10.0,
on_conventional_cell=False,
extend=1,
subs_element="Al",
selected_element=None,
):
"""Provide function to generate substitution defects."""
if on_conventional_cell:
atoms = Spacegroup3D(atoms).conventional_standard_structure
if enforce_c_size is not None:
dims = get_supercell_dims(
atoms, enforce_c_size=enforce_c_size, extend=extend
)
supercell_size = [dims[0], dims[1], dims[2]]
# atoms = atoms.make_supercell(supercell_size)
spg = Spacegroup3D(atoms)
wyckoffs = spg._dataset["wyckoffs"]
atoms.props = wyckoffs
supercell = atoms.make_supercell(supercell_size)
props = rand_select(supercell.props)
subs = []
# print(props)
for i, j in props.items():
info = {}
elements = supercell.elements.copy()
if selected_element is not None:
if elements[j] == selected_element:

elements[j] = subs_element

a = Atoms(
lattice_mat=supercell.lattice_mat,
coords=supercell.coords,
cartesian=supercell.cartesian,
elements=elements,
)
info["props"] = props
info["atoms"] = atoms.to_dict()
info["defect_atoms"] = a.to_dict()
info["supercell_size"] = list(supercell_size)
# print(a.elements)
subs.append(info)
else:
elements[j] = subs_element
a = Atoms(
lattice_mat=supercell.lattice_mat,
coords=supercell.coords,
cartesian=supercell.cartesian,
elements=elements,
)
info["props"] = props
info["atoms"] = atoms.to_dict()
info["defect_atoms"] = a.to_dict()
info["supercell_size"] = list(supercell_size)
# print(a.elements)
subs.append(info)
return subs


"""
x = generate_defect(atoms=a, selected_element="Br")
"""
14 changes: 14 additions & 0 deletions jarvis/core/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,22 @@ def check_polar(self):
polar = False
return polar

def strain_atoms(self, strain):
"""Apply volumetric strain to atoms."""
# strains=np.arange(0.80,1.2,0.02)
s = np.eye(3) + np.array(strain) * np.eye(3)
lattice_mat = np.array(self.lattice_mat)
lattice_mat = np.dot(lattice_mat, s)
return Atoms(
lattice_mat=lattice_mat,
elements=self.elements,
coords=self.coords,
cartesian=self.cartesian,
)

def apply_strain(self, strain):
"""Apply a strain(e.g. 0.01, [0,0,.01]) to the lattice."""
print("Use strain_atoms instead.")
s = (1 + np.array(strain)) * np.eye(3)
self.lattice_mat = np.dot(self.lattice_mat.T, s).T

Expand Down
2 changes: 1 addition & 1 deletion jarvis/core/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from skimage.util import random_noise
from skimage.filters import gaussian
from PIL import Image as PIL_Image
except Exception as exp:
except Exception:
# print("Install skimage, Pillow.", exp)
pass
# from scipy.ndimage import rotate
Expand Down
18 changes: 9 additions & 9 deletions jarvis/db/figshare.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ def get_db_info():
],
# https://doi.org/10.6084/m9.figshare.6815699
"dft_3d": [
"https://ndownloader.figshare.com/files/28034994",
"d3-5-16-2021.json",
"Obtaining 3D dataset 48k ...",
"https://ndownloader.figshare.com/files/29204826",
"jdft_3d-8-18-2021.json",
"Obtaining 3D dataset 55k ...",
"https://www.nature.com/articles/s41524-020-00440-1",
],
# https://doi.org/10.6084/m9.figshare.6815699
"cfid_3d": [
"https://ndownloader.figshare.com/files/26808914",
"d3-3-12-2021.json",
"Obtaining 3D dataset 43k ...",
"https://ndownloader.figshare.com/files/29205201",
"cfid_3d-8-18-2021.json",
"Obtaining 3D dataset 55k ...",
"https://www.nature.com/articles/s41524-020-00440-1",
],
# https://doi.org/10.6084/m9.figshare.14213522
Expand Down Expand Up @@ -78,9 +78,9 @@ def get_db_info():
],
# https://doi.org/10.6084/m9.figshare.14745327
"edos_pdos": [
"https://ndownloader.figshare.com/files/28501764",
"edos-up_pdos-elast_interp-6-19-2021.json",
"Interpolated electronic total dos spin-up dataset 48k...",
"https://ndownloader.figshare.com/files/29216859",
"edos-up_pdos-elast_interp-8-18-2021.json",
"Interpolated electronic total dos spin-up dataset 55k...",
"https://www.nature.com/articles/s41524-020-00440-1",
],
# https://doi.org/10.6084/m9.figshare.13054247
Expand Down
16 changes: 16 additions & 0 deletions jarvis/tests/testfiles/analysis/defects/test_subs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from jarvis.analysis.defects.substitutions import generate_defect
from jarvis.core.atoms import Atoms
from jarvis.io.vasp.inputs import Poscar
import os


def test_subs():
box = [[2.715, 2.715, 0], [0, 2.715, 2.715], [2.715, 0, 2.715]]
coords = [[0, 0, 0], [0.25, 0.25, 0.25]]
elements = ["Al", "Al"]
Si = Atoms(lattice_mat=box, coords=coords, elements=elements)
v = generate_defect(atoms=Si)


# test_2d()
# test_vacancy()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="jarvis-tools",
version="2021.08.05",
version="2021.08.18",
long_description=long_d,
install_requires=[
"numpy>=1.19.5",
Expand Down

0 comments on commit d261bba

Please sign in to comment.