Skip to content

Commit

Permalink
XRD DB making bug fix, scattering.json update. (#131)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
knc6 authored Oct 21, 2020
1 parent 3674038 commit 9601924
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 100 deletions.
77 changes: 0 additions & 77 deletions .circleci/config.yml

This file was deleted.

2 changes: 0 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.. class:: center
.. image:: https://circleci.com/gh/usnistgov/jarvis.svg?style=shield
:target: https://circleci.com/gh/usnistgov/jarvis
.. image:: https://img.shields.io/travis/usnistgov/jarvis/master.svg?label=Travis%20CI
:target: https://travis-ci.org/usnistgov/jarvis
.. image:: https://ci.appveyor.com/api/projects/status/d8na8vyfm7ulya9p/branch/master?svg=true
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__ = "2020.10.19"
__version__ = "2020.10.20"
4 changes: 4 additions & 0 deletions jarvis/analysis/diffraction/xrd.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
import collections
import os
from jarvis.core.specie import Specie

# from jarvis.core.spectrum import Spectrum
import itertools

# from jarvis.analysis.structure.spacegroup import Spacegroup3D,


Expand Down Expand Up @@ -207,6 +209,7 @@ def is_perm(hkl1, hkl2):
return pretty_unique


"""
if __name__ == "__main__":
# h=create_index()
# print (h,len(h))
Expand All @@ -221,3 +224,4 @@ def is_perm(hkl1, hkl2):
print("a=", a)
print("b=", b)
print("c=", c)
"""
22 changes: 14 additions & 8 deletions jarvis/db/vasp_to_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def encut_kp(self):
encut_files = []
encut_values = []
encut_based_energies = []
for i in glob.glob("*.json"):
for i in glob.glob("ENCUT*.json"):
if "ENCUT" in i:
encut_values.append(
int(str(i.split("-")[-1]).split(".json")[0])
Expand All @@ -195,7 +195,7 @@ def encut_kp(self):
kplength_files = []
kp_values = []
kp_based_energies = []
for i in glob.glob("*.json"):
for i in glob.glob("KPOINT*.json"):
if "KPOINT" in i:
kp_values.append(
int(str(i.split("-")[-1]).split(".json")[0])
Expand Down Expand Up @@ -330,7 +330,9 @@ def get_xrd(self, atoms):
)
line += '<d_hkls>"' + array_to_string(d_hkls) + '"</d_hkls>'
line += (
'<intensities>"' + array_to_string(d_hkls) + '"</intensities>'
'<intensities>"'
+ array_to_string(intensities)
+ '"</intensities>'
)
except Exception:
print("Cannot gt XRD pattern.")
Expand Down Expand Up @@ -1709,16 +1711,20 @@ def write_xml(self, filename="temp.xml"):
"""


if __name__ == "__main__":
folder = "/rk2/knc6/JARVIS-DFT/Elements-bulkk/mp-149_bulk_PBEBO"
filename = "JVASP-1002.xml"
VaspToApiXmlSchema(folder=folder).write_xml(filename=filename)

"""
if __name__ == "__main__":
folder = "/rk2/knc6/JARVIS-DFT/TE-bulk/mp-541837_bulk_PBEBO"
filename = "JVASP-1067.xml"
VaspToApiXmlSchema(folder=folder).write_xml(filename=filename)
folder = "/rk2/knc6/JARVIS-DFT/2DSF-bulk/mp-764365_PBEBO"
filename = "JVASP-30266.xml"
VaspToApiXmlSchema(folder=folder).write_xml(filename=filename)
folder = "/rk2/knc6/JARVIS-DFT/Elements-bulkk/mp-149_bulk_PBEBO"
filename = "JVASP-1002.xml"
VaspToApiXmlSchema(folder=folder).write_xml(filename=filename)
folder = "/rk2/knc6/JARVIS-DFT/2D-1L/POSCAR-mp-2815-1L.vasp_PBEBO"
filename = "JVASP-664.xml"
VaspToApiXmlSchema(folder=folder).write_xml(filename=filename)
Expand Down
23 changes: 11 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,17 @@

setup(
name="jarvis-tools",

version="2020.10.19",

version="2020.10.20",
long_description=long_d,
install_requires=[
"numpy",
"scipy",
"matplotlib",
"spglib",
"joblib",
"requests",
"toolz",
"xmltodict",
"pytest",
"numpy>=1.19.1",
"scipy>=1.4.1",
"matplotlib>=3.0.0",
"spglib>=1.14.1",
"joblib>=0.14.1",
"requests>=2.23.0",
"toolz>=0.9.0",
"xmltodict>=0.11.0",
],
package_data={
"jarvis.core": ["Elements.json", "element_charge.json"],
Expand All @@ -41,6 +38,8 @@
"jarvis.io.vasp": ["default_potcars.json"],
"jarvis.analysis.solarefficiency": ["am1.5G.dat"],
"jarvis.io.wannier": ["default_semicore.json"],
"jarvis.analysis.diffraction": ["atomic_scattering_params.json"],
"jarvis": ["LICENSE.rst"],
},
extras_require={
"ai": [
Expand Down
1 change: 1 addition & 0 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ in
pytest
bokeh
networkx
xmltodict
];
src=builtins.filterSource (path: type: type != "directory" || baseNameOf path != ".git") ./.;
preShellHook = ''
Expand Down

0 comments on commit 9601924

Please sign in to comment.