-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
b691653
commit d261bba
Showing
9 changed files
with
115 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
"""Version number.""" | ||
__version__ = "2021.08.05" | ||
__version__ = "2021.08.18" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters