Skip to content

Commit

Permalink
Develop (#236)
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.

* Adding folders for nexus setup.

* Update QMOF and hMOF info.

* Fixing auto klength error.

* Adding zeopp surface area.

* Vacancy bug fix, added hmof to docs.

* vacancy update.

* QE inputs update.

* Pyhon 3.9 test, added QE el-ph, VASP XANES, modified hmof db details.

* Update Contribution.rst

* Minor lint fix.

* Update action_build.yml

* Update action_build.yml

* Fix qiskit requirements.

* Fix phonopy requirements.

* Fix all requirements.

* Fix phonopy requirements.

* QE test.

* QE test.

* Update action_build.

* Try other python versions.

* Try other python versions.

* README updates.

* Adding nexus. (#197)

* Develop (#196)

* 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]>

* First input.

* added black

* Example folder.

Co-authored-by: Kamal Choudhary <[email protected]>
Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>

* Revert back.

* Update .readthedocs.yaml

* Update dev-requirements.txt

* Docs requirements update.

* Update .readthedocs.yaml

* Update requirements.txt

* Update .readthedocs.yaml

* Update requirements.txt

* Update .readthedocs.yaml

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update atoms.py

* Fixe pbc in ase_to_Atoms.

* Add installation tests (#214)

* QE inputs, XANES, GHAction updates. (#210)

* 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.

* Adding folders for nexus setup.

* Update QMOF and hMOF info.

* Fixing auto klength error.

* Adding zeopp surface area.

* Vacancy bug fix, added hmof to docs.

* vacancy update.

* QE inputs update.

* Pyhon 3.9 test, added QE el-ph, VASP XANES, modified hmof db details.

* Update Contribution.rst

* Minor lint fix.

* Update action_build.yml

* Update action_build.yml

* Fix qiskit requirements.

* Fix phonopy requirements.

* Fix all requirements.

* Fix phonopy requirements.

* QE test.

* QE test.

* Update action_build.

* Try other python versions.

* Try other python versions.

* README updates.

* Adding nexus. (#197)

* Develop (#196)

* 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]>

* First input.

* added black

* Example folder.

Co-authored-by: Kamal Choudhary <[email protected]>
Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>

* Revert back.

* Update .readthedocs.yaml

* Update dev-requirements.txt

* Docs requirements update.

* Update .readthedocs.yaml

* Update requirements.txt

* Update .readthedocs.yaml

* Update requirements.txt

* Update .readthedocs.yaml

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update requirements.txt

* Update atoms.py

* Fixe pbc in ase_to_Atoms.

Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>
Co-authored-by: wines1 <[email protected]>

* Add installation tests

* Fix codestyle

* Fix codestyle with black

* Add docstrings

* Fix pydocstyle error

* Update __init__.py

* Update __init__.py

Co-authored-by: Kamal Choudhary <[email protected]>
Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>
Co-authored-by: wines1 <[email protected]>

* Adding QE super.

* Minor changes to QE module, atoms xyz fix.

* Adding qe_tb info, and version update.

* Update __init__.py

* WIP super QE.

* Working version of ScSi.

* QE inputs and task update.

* Add master super.

* Add master super.

* Lint fix.

* Lint fix.

* Minor fix.

* ET update.

* Fix ET test.

* Update sanitize atoms.

* Additonal checks on supercond.

* Debye bug fix.

* Pressure in QE Super.

* Version fix, publication update, supercond workflow update.

* Lint fix.

* Tensorboard fix.

* Tensorboard fix.

* Tensorboard fix.

* Melting temp fix.

* Update vasp.py (#234)

* Local tetra tmp.

* Version update.

* Lint fix.

* HSE06

Co-authored-by: tavazza <[email protected]>
Co-authored-by: knc6 <[email protected]>
Co-authored-by: KAMAL CHOUDHARY <[email protected]>
Co-authored-by: wines1 <[email protected]>
Co-authored-by: Saurav Maheshkar <[email protected]>
  • Loading branch information
6 people authored May 7, 2022
1 parent 217eb37 commit 2c2241d
Show file tree
Hide file tree
Showing 15 changed files with 943 additions and 229 deletions.
12 changes: 6 additions & 6 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Jinja2==3.0.3
joblib==1.1.0
jsonschema==4.3.1
julia==0.5.6
keras==2.7.0
keras
Keras-Preprocessing==1.1.2
kiwisolver==1.3.2
libclang==12.0.0
Expand All @@ -63,7 +63,7 @@ mpmath==1.2.1
multitasking==0.0.10
networkx==2.6.3
ntlm-auth==1.5.0
numpy==1.21.0
numpy==1.20.0
oauthlib==3.1.1
opencv-python==4.5.4.60
opt-einsum==3.3.0
Expand All @@ -72,7 +72,7 @@ pandas==1.3.5
pbr==5.8.0
PennyLane==0.14.1
phonopy==2.10.0
Pillow==9.0.0
Pillow==9.0.1
pluggy==1.0.0
ply==3.11
protobuf==3.19.1
Expand Down Expand Up @@ -125,10 +125,10 @@ sphinxcontrib-serializinghtml==1.1.5
stevedore==3.5.0
symengine==0.8.1
sympy==1.9
tensorboard==2.7.0
tensorboard
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.7.0
tensorflow==2.8.0
tensorflow-estimator==2.7.0
tensorflow-io-gcs-filesystem==0.23.1
termcolor==1.1.0
Expand All @@ -148,4 +148,4 @@ Werkzeug==2.0.2
wrapt==1.13.3
xmltodict==0.12.0
yfinance==0.1.67
zipp==3.6.0
zipp==3.6.0
10 changes: 5 additions & 5 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Jinja2==3.0.3
joblib==1.1.0
jsonschema==4.3.1
julia==0.5.6
keras==2.7.0
keras
Keras-Preprocessing==1.1.2
kiwisolver==1.3.2
libclang==12.0.0
Expand All @@ -64,7 +64,7 @@ mpmath==1.2.1
multitasking==0.0.10
networkx==2.6.3
ntlm-auth==1.5.0
numpy==1.21.0
numpy==1.20.0
oauthlib==3.1.1
opencv-python==4.5.4.60
opt-einsum==3.3.0
Expand All @@ -73,7 +73,7 @@ pandas==1.3.5
pbr==5.8.0
PennyLane==0.14.1
#phonopy==2.10.0
Pillow==9.0.0
Pillow==9.0.1
pluggy==1.0.0
ply==3.11
protobuf==3.19.1
Expand Down Expand Up @@ -127,7 +127,7 @@ sphinxcontrib-serializinghtml==1.1.5
stevedore==3.5.0
symengine==0.8.1
sympy==1.9
tensorboard==2.7.0
tensorboard
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.0
tensorflow==2.7.0
Expand All @@ -150,4 +150,4 @@ Werkzeug==2.0.2
wrapt==1.13.3
xmltodict==0.12.0
yfinance==0.1.67
zipp==3.6.0
zipp==3.6.0
24 changes: 22 additions & 2 deletions docs/source/publications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,28 @@ JARVIS-ML related

[23. Enhancing materials property prediction by leveraging computational and experimental data using deep transfer learning, Nature Commun.](https://www.nature.com/articles/s41467-019-13297-w)

[24. Atomistic Line Graph Neural Network for Improved Materials Property Predictions.](https://arxiv.org/abs/2106.01829)
[24. Atomistic Line Graph Neural Network for Improved Materials Property Predictions, npj Computational Materials 7, 1 (2021)](https://www.nature.com/articles/s41524-021-00650-1)

[25. Recent advances and applications of deep learning methods in materials science, npj Computational Materials 8, 1 (2022)](https://www.nature.com/articles/s41524-022-00734-6)


[26. Graph neural network predictions of metal organic framework CO2 adsorption properties, Comp. Mat. Sci., 210, 111388 (2022)](https://www.sciencedirect.com/science/article/pii/S092702562200163X)

[27. Data-Driven Multi-Scale Modeling and Optimization for Elastic Properties of Cubic Microstructures](https://link.springer.com/article/10.1007/s40192-022-00258-3)

[28. Uncertainty Prediction for Machine Learning Models of Material Properties](https://pubs.acs.org/doi/abs/10.1021/acsomega.1c03752)

[29. Cross-property deep transfer learning framework for enhanced predictive analytics on small materials data](https://www.nature.com/articles/s41467-021-26921-5)

[30. Prediction of the Electron Density of States for Crystalline Compounds with Atomistic Line Graph Neural Networks (ALIGNN)](https://link.springer.com/article/10.1007/s11837-022-05199-y)

[31. Designing High-Tc Superconductors with BCS-inspired Screening, Density Functional Theory and Deep-learning](https://arxiv.org/abs/2205.00060)

JARVIS-QC related
-----------------------------------------------------
[25. Quantum Computation for Predicting Electron and Phonon Properties of Solids., J. Phys.: Cond. Matt.](https://iopscience.iop.org/article/10.1088/1361-648X/ac1154)
[32. Quantum Computation for Predicting Electron and Phonon Properties of Solids., J. Phys.: Cond. Matt.](https://iopscience.iop.org/article/10.1088/1361-648X/ac1154)


JARVIS-QETB related
-----------------------------------------------------
[33. Quantum Computation for Predicting Electron and Phonon Properties of Solids., J. Phys.: Cond. Matt.](https://iopscience.iop.org/article/10.1088/1361-648X/ac1154)
2 changes: 1 addition & 1 deletion jarvis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Version number."""
__version__ = "2022.01.10"
__version__ = "2022.05.05"

import os

Expand Down
81 changes: 81 additions & 0 deletions jarvis/analysis/elastic/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,94 @@ def reuss_modulus(self):
)
return [Kr, Gr]

def long_velocity(self, atoms=None):
"""Longitudinal velocity using Navier equation."""
# density = atoms.density
weight = float(atoms.composition.weight)
volume = atoms.volume
mass_density = 1.6605e3 * weight / volume
avg_mod = self.average_modulus
k_vrh = avg_mod[0]
g_vrh = avg_mod[1]
# 1e9:= GPa to Pascal (kg/ms^2)
vel = np.sqrt(1e9 * (k_vrh + 4.0 / 3.0 * g_vrh) / mass_density)
return vel

def trans_velocity(self, atoms=None):
"""Transverse velocity."""
avg_mod = self.average_modulus
g_vrh = avg_mod[1]
volume = atoms.volume
weight = float(atoms.composition.weight)
mass_density = 1.6605e3 * weight / volume
vel = np.sqrt(1e9 * g_vrh / mass_density)
return vel

def velocity_average(self, atoms=None):
"""Average velocity."""
vt = self.trans_velocity(atoms=atoms)
vl = self.long_velocity(atoms=atoms)
return 1.0 / (
np.cbrt(
(1.0 / 3.0) * (2.0 / (vt * vt * vt) + 1.0 / (vl * vl * vl))
)
)

def debye_temperature(self, atoms=None):
"""Debye temperature."""
const = 1.05457e-34 / 1.38065e-23 # (h/kb)
v0 = atoms.volume * 1e-30 / atoms.num_atoms
vl = self.long_velocity(atoms=atoms)
vt = self.trans_velocity(atoms=atoms)
vm = 3 ** (1.0 / 3.0) * (1 / vl ** 3 + 2 / vt ** 3) ** (-1.0 / 3.0)
theta = const * vm * (6 * np.pi ** 2 / v0) ** (1.0 / 3.0)
return theta

@property
def average_modulus(self):
"""Get average modulus."""
return (
np.array(self.voigt_modulus) + np.array(self.reuss_modulus)
) / 2

@property
def pugh_ratio_voigt(self):
"""Get Voigt Pugh ratio."""
Kv, Gv = self.voigt_modulus
return Gv / Kv

@property
def pettifor_criteria(self):
"""Get Pettifor criteria."""
c = self.et_tensor
return c[0][1] - c[3][3]

@property
def is_brittle(self):
"""Check if brittle material."""
return self.pugh_ratio_voigt > 0.571 and self.pettifor_criteria < 0

@property
def is_ductile(self):
"""Check if ductile material."""
return self.pugh_ratio_voigt < 0.571 and self.pettifor_criteria > 0

@property
def melting_temperature_metals(self):
"""Get crude Melting temp. estimate."""
# https://doi.org/10.1016/0036-9748(84)90267-9
avg_mod = self.average_modulus
k_vrh = avg_mod[0]
return 607 + 9.3 * k_vrh

@property
def cauchy_pressure(self):
"""Get Cauchy pressure."""
# >0 ionic bonding
# <0 covalent bonding
c = self.et_tensor
return c[0][1] - c[3][3]

@property
def poisson_ratio(self):
"""Get poisson's ratio."""
Expand Down
8 changes: 5 additions & 3 deletions jarvis/core/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -870,7 +870,9 @@ def atomwise_angle_and_radial_distribution(
and nbor_info["dist"][in1][i] * nbor_info["dist"][in2][i] != 0
]
ang_hist, ang_bins = np.histogram(
angles, bins=np.arange(1, nbins + 2, 1), density=False,
angles,
bins=np.arange(1, nbins + 2, 1),
density=False,
)
for jj, j in enumerate(angles):
actual_pangs[i, jj] = j
Expand Down Expand Up @@ -1648,13 +1650,13 @@ def pmg_to_atoms(pmg=""):
)


def ase_to_atoms(ase_atoms=""):
def ase_to_atoms(ase_atoms="", cartesian=True):
"""Convert ase structure to Atoms."""
return Atoms(
lattice_mat=ase_atoms.get_cell(),
elements=ase_atoms.get_chemical_symbols(),
coords=ase_atoms.get_positions(),
# pbc=True,
cartesian=cartesian,
)


Expand Down
18 changes: 10 additions & 8 deletions jarvis/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ def xml_to_dict(fname):
return data


def get_factors(x, start=2):
"""Get factors of a number."""
facts = []
for i in range(start, x + 1):
if x % i == 0:
facts.append(i)
return facts


def get_counts(array=["W", "W", "Mo", "Mo", "S", "S"]):
"""
Get number of unique elements and their counts.
Expand Down Expand Up @@ -266,14 +275,7 @@ def digitize_array(values=[], max_len=10):


def bond_angle(
dist1,
dist2,
bondx1,
bondx2,
bondy1,
bondy2,
bondz1,
bondz2,
dist1, dist2, bondx1, bondx2, bondy1, bondy2, bondz1, bondz2,
):
"""Get an angle."""
nm = dist1 * dist2
Expand Down
Loading

0 comments on commit 2c2241d

Please sign in to comment.