Skip to content

Commit

Permalink
Version update (#164)
Browse files Browse the repository at this point in the history
* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Increase coverage. (#137)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* Wannier TB for phonons (#138)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* QAlgo

* Create CODE_OF_CONDUCT.md (#139)

* Update README.rst

* Atoms POSCAR Order update.

* Qiskit tests.

* Lint fix.

* Wien2K extra test, ene file.

* WT.

* WT added.

* Qiskit depedendence.

* Qiskit version.

* Qiskit version.

* Qiskit version.

* Update requirements-ci.txt

* Update requirements-ci.txt

* Update action_build.yml

* Update shell.nix

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Ignore QAlgo tests.

* Make qiskit work.

* Make qiskit work.

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Delete __init__.py

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Pennylane fix attempt.

* Update test_hermsolver.py

* Test ham.

* Test ham.

* Update inputs.py

* Test ham.

* Update action_build.yml

* Update inputs.py

* Create __init__.py

* Test ham.

* Update test_hermsolver.py

* Update test_hermsolver.py

* Test Circuit.

* Update test_hermsolver.py

* Update action_build.yml

* Aer

* Aer .

* Var circuit added.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Fix POSCAR order issue.

* Version change.

* Poscar write fix, CIF reader fix.

* Develop (#141)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* QAlgo

* Atoms POSCAR Order update.

* Qiskit tests.

* Lint fix.

* Wien2K extra test, ene file.

* WT.

* WT added.

* Qiskit depedendence.

* Qiskit version.

* Qiskit version.

* Qiskit version.

* Update requirements-ci.txt

* Update requirements-ci.txt

* Update action_build.yml

* Update shell.nix

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Ignore QAlgo tests.

* Make qiskit work.

* Make qiskit work.

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Delete __init__.py

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Pennylane fix attempt.

* Update test_hermsolver.py

* Test ham.

* Test ham.

* Update inputs.py

* Test ham.

* Update action_build.yml

* Update inputs.py

* Create __init__.py

* Test ham.

* Update test_hermsolver.py

* Update test_hermsolver.py

* Test Circuit.

* Update test_hermsolver.py

* Update action_build.yml

* Aer

* Aer .

* Var circuit added.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Ready for master branch.

* Update shell.nix

* Update __init__.py

* Version change.

* Poscar format fix. (#142)

* Fix POSCAR order issue.

* Version change.

* Poscar write fix, CIF reader fix.

* Develop (#141)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* QAlgo

* Atoms POSCAR Order update.

* Qiskit tests.

* Lint fix.

* Wien2K extra test, ene file.

* WT.

* WT added.

* Qiskit depedendence.

* Qiskit version.

* Qiskit version.

* Qiskit version.

* Update requirements-ci.txt

* Update requirements-ci.txt

* Update action_build.yml

* Update shell.nix

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Ignore QAlgo tests.

* Make qiskit work.

* Make qiskit work.

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Delete __init__.py

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Pennylane fix attempt.

* Update test_hermsolver.py

* Test ham.

* Test ham.

* Update inputs.py

* Test ham.

* Update action_build.yml

* Update inputs.py

* Create __init__.py

* Test ham.

* Update test_hermsolver.py

* Update test_hermsolver.py

* Test Circuit.

* Update test_hermsolver.py

* Update action_build.yml

* Aer

* Aer .

* Var circuit added.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Ready for master branch.

* Update shell.nix

* Update __init__.py

* Minor fix in figshare and spectrum.

* Minor fix in figshare and spectrum.

* Update README.rst

* Lint fix.

* Minor fix in figshare and spectrum. (#143)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* QAlgo

* Atoms POSCAR Order update.

* Qiskit tests.

* Lint fix.

* Wien2K extra test, ene file.

* WT.

* WT added.

* Qiskit depedendence.

* Qiskit version.

* Qiskit version.

* Qiskit version.

* Update requirements-ci.txt

* Update requirements-ci.txt

* Update action_build.yml

* Update shell.nix

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Ignore QAlgo tests.

* Make qiskit work.

* Make qiskit work.

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Delete __init__.py

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Pennylane fix attempt.

* Update test_hermsolver.py

* Test ham.

* Test ham.

* Update inputs.py

* Test ham.

* Update action_build.yml

* Update inputs.py

* Create __init__.py

* Test ham.

* Update test_hermsolver.py

* Update test_hermsolver.py

* Test Circuit.

* Update test_hermsolver.py

* Update action_build.yml

* Aer

* Aer .

* Var circuit added.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Fix POSCAR order issue.

* Version change.

* Poscar write fix, CIF reader fix.

* Develop (#141)

* Added OQMD, MP, QM9 CFID datasets.

* Added OQMD, MP, QM9 CFID datasets.

* vasp2xml schema update.

* Update config.yml

* XRD DB making bug fix, scattering.json update.

* Minor bug fix in vasp_to_xml.py

* Add license.

* Add license, pin versions

* Remove circle.

* Update shell.nix

* Vasprun single element bug fix.

* Minor updates.

* DB XML and VASP Workflow fix.

* AFLOW CFID added, VASP_PSP_DIR fix.

* Linting fix, new version release.

* Wannier update.

* Version update.

* VASP task update.

* Tempfile for downloading zipfiles.

* Pypi fix.

* Pypi fix.

* Updated wannier, vasp2xml, increased tests.

* Update setup.py

* Update action_build.yml

* Speed up test.

* Update DatasetSummary.rst

* Update outputs.py

* Enforce nk1==nk2 in spillage.

* Update test_spillage.py

* Multiple updates.

* Magtest update.

* Version update.

* Update README.rst

* Update README.rst

* WannierTB Phonons.

* phonopy TB.

* phonopy TB.

* Versionupdate.

* QAlgo

* Atoms POSCAR Order update.

* Qiskit tests.

* Lint fix.

* Wien2K extra test, ene file.

* WT.

* WT added.

* Qiskit depedendence.

* Qiskit version.

* Qiskit version.

* Qiskit version.

* Update requirements-ci.txt

* Update requirements-ci.txt

* Update action_build.yml

* Update shell.nix

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Ignore QAlgo tests.

* Make qiskit work.

* Make qiskit work.

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Update action_build.yml

* Delete __init__.py

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Qiskit fix attempt.

* Pennylane fix attempt.

* Update test_hermsolver.py

* Test ham.

* Test ham.

* Update inputs.py

* Test ham.

* Update action_build.yml

* Update inputs.py

* Create __init__.py

* Test ham.

* Update test_hermsolver.py

* Update test_hermsolver.py

* Test Circuit.

* Update test_hermsolver.py

* Update action_build.yml

* Aer

* Aer .

* Var circuit added.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Increase test coverage, ASE, Tequila, Qiskit.

* Ready for master branch.

* Update shell.nix

* Update __init__.py

* Version change.

* Minor fix in figshare and spectrum.

* Update README.rst

* Lint fix.

* Minor update.

* Update figshare.py

* Fix build.

* Update README.rst

* docs update.

* Setup requirement change.

* Update version tag. (#145)

* Minor fix in figshare and spectrum.

* Setup requirement change.

* Cleanup graph (#146)

* revert jarvis.core.graph adjacency matrix weights to interatomic distances

* remove jarvis.core.graph.Graph edges with bond length past threshold max_cut

* fix jarvis.core.graph.Graph.adjacency_matrix to support sparse graphs (with no self edges), and update test file to reflect removal of self edges as well

* Update README.rst

* Update README.rst

* develop (#147)

* Update version tag. (#145)

* Minor fix in figshare and spectrum.

* Setup requirement change.

* Cleanup graph (#146)

* revert jarvis.core.graph adjacency matrix weights to interatomic distances

* remove jarvis.core.graph.Graph edges with bond length past threshold max_cut

* fix jarvis.core.graph.Graph.adjacency_matrix to support sparse graphs (with no self edges), and update test file to reflect removal of self edges as well

* Update README.rst

Co-authored-by: Brian DeCost <[email protected]>

* develop (#147)

* Update version tag. (#145)

* Minor fix in figshare and spectrum.

* Setup requirement change.

* Cleanup graph (#146)

* revert jarvis.core.graph adjacency matrix weights to interatomic distances

* remove jarvis.core.graph.Graph edges with bond length past threshold max_cut

* fix jarvis.core.graph.Graph.adjacency_matrix to support sparse graphs (with no self edges), and update test file to reflect removal of self edges as well

* Update README.rst

Co-authored-by: Brian DeCost <[email protected]>

* Travis update.

* Travis update.

* Travis update.

* Travis update.

* Travis update.

* Travis update.

* Travis update.

* Travis update.

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Update requirements-for-ci-only.txt

* Adding Qiskit.

* Adding Qiskit.

* Adding Qiskit.

* Adding Qiskit.

* Version update.

* Version update.

* Adding Qiskit.

* Adding Qiskit.

* Fix travis.

* Fix travis.

* Fix travis.

* Fix travis.

* VASP outputs bug fix.

* Optics module and Dos module of VASP fixed.

* Fixing commit.

* Lint fix.

* Update inputs.py

* Version update.

* README update.

* Graph and dataset update.

* Graph and dataset update.

* Graph and dataset update.

* Graph module update.

* More datasets added.

* Update .travis.yml

* Update .travis.yml

* Exclude tequila tests.

* Exclude tequila tests.

* Extra tests.

* Pytest-cov added.

* Update action_build.yml

* Update action_build.yml

* Covergae update.

* Covergae update.

* StructureDataset test added.

* Graph tests fixed.

* Figshare update.

* STM image links added.

* Update test_figshare.py

* Update test_figshare.py

* Update .travis.yml

* Update .travis.yml

* Cache github action attempt.

* DB update.

* Update action.

* DB update.

* Figshare test update.

* JARVIS-FF DB added.

* Try to increase coverage.

* Polymer genome added.

* Graph update.

* Graph update.

* Graph update.

* Figshare update.

* Version update.

* Figshare update.

* Hot encoded species.

* STEM with Convolution and Pyprismatic added.

* STEM Conv update.

* Atoms module update.

* Lorentzian fix.

* Digitized features added.

* Graph angle,prdf added. QE parser update.

* Update outputs.py

* Graph angle update and cif2cell added.

* Reduced formula fix and linting fix.

* Test minor fix.

* Graph tests update.

* Pytestfix.

* See also check url in xml

* See also check url in xml

* Phonopy run update.

* Graph update with torch angle.

* Get all neighbors routine bug fix.

* Figshare lint fix.

* Version update, IR extended, graph torch fix.

* Fix IR pytest.

* IR test fix.

* Cache graph dataset (#161)

* modify graph StructureDataset to enable/disable computation of atomistic line graph.

* fix line length setting in black configuration and fix jarvis.core.specie and jarvis.core.graphs

* pin pennylane version to 0.14.1 in GH build action.

* update graph dataloader test.

* fix pennylane version pinning and fix missing pandas.DataFrame in dataloader test.

* bump version number.

* README update.

* Bandgap based on occupation tolerance added to Vasprun.

* id_tag update.

* Version update

* Remove cif2cell dependence.

Co-authored-by: Brian DeCost <[email protected]>
  • Loading branch information
knc6 and bdecost authored Apr 29, 2021
1 parent 6b5bfec commit e8fef5c
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 40 deletions.
11 changes: 0 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,6 @@ or

For detailed instructions, please see `Installation instructions <https://github.com/usnistgov/jarvis/blob/master/Installation.rst>`__

**Do not** install like this:

.. |ss| raw:: html

<strike>

.. |se| raw:: html

</strike>

|ss| pip install jarvis |se|

Example function
-----------------
Expand Down
5 changes: 3 additions & 2 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ codecov >=2.1.11
torch >=1.8.0
keras >=2.4.3
tensorflow>=2.4.0
cif2cell
cif2cell==2.0.0a3
PyCifRW==4.4
pytest >=6.2.2
pytest-cov >=2.11.1
pytest-xdist>=2.2.1
bokeh>=2.3.0
bokeh>=2.3.0
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.4.21"
__version__ = "2021.4.28"
3 changes: 2 additions & 1 deletion jarvis/core/graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,7 @@ def __init__(
transform=None,
line_graph=False,
classification=False,
id_tag="jid",
):
"""Pytorch Dataset for atomistic graphs.
Expand All @@ -533,7 +534,7 @@ def __init__(
self.line_graph = line_graph

self.labels = self.df[target]
self.ids = self.df["jid"]
self.ids = self.df[id_tag]
self.labels = torch.tensor(self.df[target]).type(
torch.get_default_dtype()
)
Expand Down
43 changes: 37 additions & 6 deletions jarvis/io/vasp/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1044,12 +1044,9 @@ def gvectors(self, ikpt=1):
% (Gvec.shape[0], self._nplws[ikpt - 1], np.prod(self._ngrid))
)
else:
assert (
Gvec.shape[0] == self._nplws[ikpt - 1]
), "No. of planewaves not consistent! %d %d %d" % (
Gvec.shape[0],
self._nplws[ikpt - 1],
np.prod(self._ngrid),
assert Gvec.shape[0] == self._nplws[ikpt - 1], (
"No. of planewaves not consistent! %d %d %d"
% (Gvec.shape[0], self._nplws[ikpt - 1], np.prod(self._ngrid),)
)
self._gvec = np.asarray(Gvec, dtype=int)

Expand Down Expand Up @@ -1375,6 +1372,40 @@ def get_indir_gap(self):
gap = min(cat[:, nelect]) - max(cat[:, nelect - 1])
return gap, cbm, vbm

def bandgap_occupation_tol(self, occu_tol=0.1):
"""Get bandgap based on occupation tolerance."""
eigs = np.concatenate(
(self.eigenvalues[0][:, :, 0], self.eigenvalues[1][:, :, 0]),
axis=1,
)
occs = np.concatenate(
(self.eigenvalues[0][:, :, 1], self.eigenvalues[1][:, :, 1]),
axis=1,
)

vbm = -np.inf
vbm_kpoint = None
cbm = np.inf
cbm_kpoint = None
k = 0
for i, j in zip(eigs, occs):
k += 1
for (eigenval, occu) in zip(i, j):
if occu > occu_tol and eigenval > vbm:
vbm = eigenval
vbm_kpoint = k
elif occu <= occu_tol and eigenval < cbm:
cbm = eigenval
cbm_kpoint = k
return (
max(cbm - vbm, 0),
cbm,
vbm,
vbm_kpoint,
cbm_kpoint,
vbm_kpoint == cbm_kpoint,
)

@property
def fermi_velocities(self):
"""Get fermi velocities in m/s."""
Expand Down
21 changes: 18 additions & 3 deletions jarvis/tests/testfiles/core/test_graph.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
from jarvis.core.atoms import Atoms
from jarvis.core.graphs import StructureDataset, Graph
from jarvis.core.graphs import (
StructureDataset,
Graph,
prepare_dgl_batch,
prepare_line_graph_batch,
)
from jarvis.db.figshare import data
import pandas as pd
import os
import torch

test_pos = os.path.join(
os.path.dirname(__file__),
Expand All @@ -15,14 +21,17 @@ def test_graph():
from jarvis.db.figshare import get_jid_data

atoms = Atoms.from_poscar(test_pos)
g = g = Graph.atom_dgl_multigraph(atoms=atoms, atom_features="cgcnn")
g = Graph.atom_dgl_multigraph(atoms=atoms, atom_features="cgcnn")
atoms = Atoms.from_dict(get_jid_data("JVASP-664")["atoms"])
feature_sets = ("atomic_number", "basic", "cfid", "cgcnn")
for i in feature_sets:
g = Graph.atom_dgl_multigraph(atoms=atoms, atom_features=i)
g = Graph.atom_dgl_multigraph(atoms=atoms, atom_features=i)
print(i, g)
batch = prepare_dgl_batch(torch.tensor([1, 1]))
batch = prepare_line_graph_batch(torch.tensor([1, 1, 1]))
g = Graph.from_atoms(atoms=atoms, features="atomic_number")
gnx = g.to_networkx()
g = Graph.from_atoms(atoms=atoms, features="atomic_number")
g = Graph.from_atoms(atoms=atoms, features="atomic_fraction")
g = Graph.from_atoms(
Expand Down Expand Up @@ -79,8 +88,14 @@ def test_dataset():
)
graphs.append(g)

s = StructureDataset(d, graphs, "formation_energy_peratom")
s = StructureDataset(
d, graphs, "formation_energy_peratom", line_graph=True
)
col = s.collate
col1 = s.collate_line_graph
ix = s[0]
sz = len(s)
s_std = s.setup_standardizer([1, 2])


# test_graph()
20 changes: 6 additions & 14 deletions jarvis/tests/testfiles/io/vasp/test_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,12 @@
)
non_spinpol_vrun = Vasprun(
filename=os.path.join(
os.path.dirname(__file__),
"vasprun.xml.JVASP-23436",
os.path.dirname(__file__), "vasprun.xml.JVASP-23436",
)
)
vasp544_mbj_optics_vrun = Vasprun(
filename=os.path.join(
os.path.dirname(__file__),
"vasprun.xml.JVASP-97577",
os.path.dirname(__file__), "vasprun.xml.JVASP-97577",
)
)
opt_vrun = Vasprun(
Expand Down Expand Up @@ -226,11 +224,7 @@ def test_chgcar():
chg.is_spin_polarized(),
chg.is_spin_orbit(),
np.array(chg.chg).shape,
) == (
True,
False,
(4, 56, 56, 56),
)
) == (True, False, (4, 56, 56, 56),)
td = chg.to_dict()
fd = Chgcar.from_dict(td)

Expand All @@ -241,11 +235,7 @@ def test_locpot():
loc.is_spin_polarized(),
loc.is_spin_orbit(),
np.array(chg.chg).shape,
) == (
False,
False,
(4, 56, 56, 56),
)
) == (False, False, (4, 56, 56, 56),)
vac = loc.vac_potential()[0]
assert round(vac, 2) == round(7.62302803577618, 2)

Expand All @@ -262,6 +252,8 @@ def test_locpot():
def test_vrun():
# print ('gapp',round(vrun.get_indir_gap,2))
assert (round(vrun.get_indir_gap[0], 2)) == (0.73)
gap2 = vrun.bandgap_occupation_tol()
assert round(gap2[0], 2) == 0.73
assert (round(vrun.get_dir_gap, 2)) == (2.62)
vrun.get_bandstructure(kpoints_file_path=band_kp, plot=True)
assert (round(opt_vrun.get_dir_gap, 2)) == (2.62)
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name="jarvis-tools",
version="2021.4.21",
version="2021.4.28",
long_description=long_d,
install_requires=[
"numpy>=1.18.5",
Expand All @@ -23,7 +23,6 @@
"toolz>=0.9.0",
"xmltodict>=0.11.0",
"tqdm>=4.41.1",
"cif2cell>=2.0.0a3",
],
package_data={
"jarvis.core": [
Expand Down

0 comments on commit e8fef5c

Please sign in to comment.