jarvis.db package

Submodules

jarvis.db.figshare module

Downloads files from Figshare.

Main page: https://figshare.com/authors/Kamal_Choudhary/4445539

jarvis.db.figshare.data(dataset='dft_2d')[source]

Provide main function to download datasets.

jarvis.db.figshare.datasets(dataset='')[source]

Get collection of dataset names and URLs.

jarvis.db.figshare.get_ff_eneleast()[source]

Get JARVIS-FF related data.

jarvis.db.figshare.get_hk_tb(k=array([0, 0, 0]), w=[])[source]

Get Wannier TB Hamiltonian.

jarvis.db.figshare.get_jid_data(jid='JVASP-667', dataset='dft_2d')[source]

Get info for a jid and dataset.

jarvis.db.figshare.get_wann_electron(jid='JVASP-816')[source]

Download electron WTBH if available.

jarvis.db.figshare.get_wann_phonon(jid='JVASP-1002', factor=15.633302)[source]

Download phonon WTBH if available.

jarvis.db.jsonutils module

Helper functions for JSON files.

jarvis.db.jsonutils.dumpjson(data=[], filename='')[source]

Provide helper function to write a json file.

jarvis.db.jsonutils.loadjson(filename='')[source]

Provide helper function to load a json file.

jarvis.db.lammps_to_xml module

Module to generate XML file for LAMMPS calculation.

jarvis.db.lammps_to_xml.basic_data(data={}, source='JARVIS-FF-LAMMPS')[source]

Get basic data for table.

jarvis.db.lammps_to_xml.get_jvid(mp='')[source]

Get JARVIS-ID for MPID.

jarvis.db.lammps_to_xml.write_xml(data={}, filename='temp.xml')[source]

Write XML file.

jarvis.db.restapi module

Module to access or upload data in JARVIS-API.

class jarvis.db.restapi.Api(base_url='https://jarvis.nist.gov', user_info_file_path='/users/knc6/myinfo')[source]

Bases: object

Class for handling functions for JARVIS-API.

delete_all_blobs()[source]

Delete binary blob files.

delete_all_records(query='.xml')[source]

Delete all XML files.

delete_blob(bid='')[source]

Delete a blob by id.

delete_chunks(array=[])[source]

Delete a list of records.

delete_file_by_hash_id(id='')[source]

Delete files for a hash id.

download_blob(save_file=True, bid='5f6a4bb7ece4b0002de4fb60')[source]

Download a binary blob file.

get_all_blobs()[source]

Download binary blob files.

get_all_template_ids(title=None, only_user=False)[source]

Get templates for a user or global templates/schema/xsd.

get_all_xmls()[source]

Get all XML data. Used for deleting.

get_data_by_hash_id(id='')[source]

Gat data file info for a hash_id.

get_data_by_template_id(id='5f6162b4ece4b00034e4fe19', query='.xml', max_record=5)[source]

Get data by template IDs.

For template IDs see: https://jarvis.nist.gov/rest/template-version-manager/global/ and is_disabled=False

get_global_workspace_id()[source]

Get workspace ID.

send_keyword_query(data={'query': 'JVASP-1002.xml', 'title': 'JVASP-1002.xml'})[source]

Post general query to API.

send_query(query='JVASP-1002.xml')[source]

Send query to API.

upload_blob(filepath='')[source]

Upload binary blob files.

upload_jarvisdft_xmls(files='/rk2/knc6/DB/XMLs/VASPDASK/*.xml', template_id='5f626925ece4b00035e5277f', json_name='jarvisdft_xmls.json')[source]

Upload JARVIS-DFT XML files.

upload_jarvisff_xmls(files='/rk2/knc6/DB/XMLs/LAMMPS/*.xml', template_id='5f6162b4ece4b00034e4fe19', json_name='jarvisff_xmls.json')[source]

Upload JARVIS-FF XML files.

upload_xml_file(filename='', workspace_id='5df7b6defb7e53000c4652aa', template_id='')[source]

Upload file using path of the file and schema/template id.

jarvis.db.vasp_to_xml module

Module to make XML for JARVIS-REST-API schema.

class jarvis.db.vasp_to_xml.VaspToApiXmlSchema(folder='', meta_data={'data_source': 'JARVIS-DFT-VASP', 'ehull': '', 'exfoliation_energy': '', 'id_file': 'JARVIS-ID', 'material_type': 'bulk', 'tmp_data_source': "'JARVIS-DFT-VASP'", 'tmp_id_file': "'JARVIS-ID'", 'tmp_material_type': "'bulk'"})[source]

Bases: object

Module to convert VASP data to XML schema for API.

basic_info(include_dos_info=True, include_neighbor_info=True, use_cfid_data=True)[source]

Get data from MAIN-RELAX folder.

boltztrap_data(path='MAIN-RELAX-bulk@mp-149/boltztrap', temperature=600, doping=1e+20)[source]

Get transport data.

Get DFPT data.

ebandstruct(vrun='', kp='')[source]

Get electronic bandstucre related data.

effective_mass_data()[source]

Get effective-mass data.

efg_tensor()[source]

Get electric field gradient tensor.

elastic_props(outcar='MAIN-ELASTIC-bulk@mp-149/OUTCAR')[source]

Get elastic property data.

electronic_band_struct(vasprun='', kpoints_file_path='')[source]

Get electronic_band_struct.

electronic_dos_info(vrun)[source]

Get electronic dos information with , _ and ; seperators.

encut_kp()[source]

Get ENCUT, cut-off convergence data.

get_wannier_lines(data={}, energy_tol=4, write_full_data=False)[source]

Get data for wannier- quality check.

get_xrd(atoms)[source]

Get XRD pattern.

image_to_string(img_path='2DSTM/PNG_JSON3/JVASP-60776_mp-19795_pos.jpg')[source]

Transform image to string.

loptics_optoelectronics(vrun='')[source]

Get optoelctronic data.

main_band()[source]

Get bandstructure from MAIN-BAND-*.

main_boltz_data()[source]

Get transport data from folder.

main_elastic()[source]

Get elastic property data from folder.

main_hse06_band()[source]

Get bandstructure from MAIN-HSE-*.

main_lepsilon()[source]

Get DFPT data from folder.

main_optics_mbj()[source]

Get optoelctronic data from MAIN-MBJ*.

main_optics_semilocal()[source]

Get optoelctronic data from MAIN-OPTICS*.

main_pbe0_band()[source]

Get bandstructure from MAIN-PBE0-*.

main_soc_spillage(jid='')[source]

Get spillage data from folder.

main_stm_neg()[source]

Get neg. bias constant height STM image.

main_stm_pos()[source]

Get pos. bias constant height STM image.

raman_data()[source]

Get Raman intensity.

spillage(soc_wf='MAIN-SOCSCFBAND-bulk@JVASP-1067_mp-541837/WAVECAR', nonsoc_wf='MAIN-MAGSCFBAND-bulk@JVASP-1067_mp-541837/WAVECAR', spl_json_existing='/rk2/knc6/DB/SPILLAGE/all_spillage.json', jid='')[source]

Get spillage data.

vacancy_formation_optb88vdw()[source]

Get vacancy formation energy data.

wannier_comparison_plot(energy_tol=4)[source]

Compare Wannier and DFT data on mesh and BZ.

write_xml(filename='temp.xml')[source]

Get overall XML file.

jarvis.db.vasp_to_xml.get_cfid_descriptors(jid='JVASP-1002', atoms='', make_cfid=True, material_type='bulk')[source]

Get CFID pre-computed descriptors for a JID.

jarvis.db.vasp_to_xml.get_figshare_files(jid='JVASP-1067')[source]

Get Figshare download links.

jarvis.db.vasp_to_xml.get_see_also(folder='')[source]

Generate see also link.

jarvis.db.vasp_to_xml.icsd_mp(ref='')[source]

Get ICSD IDs given MPIDs.

jarvis.db.webpages module

Module for obtaining webpage data.

All the webpages are formatted in XML format. They are converted into python dict from which appropriate keys and values can be obtained. Use ‘list_keys’ functions to find types of data stored in each XML document.

class jarvis.db.webpages.Webpage(data=[], jid='')[source]

Bases: object

Get content of JARVIS-DFT and JARVIS-FF webpages.

get_dft_electron_dos()[source]

Get JARVIS-DFT MAIN-RELAX DOS.

get_dft_mbj_dielectric_function()[source]

Get JARVIS-DFT TBmBJ dielectric function.

get_dft_phonon_dos()[source]

Get JARVIS-DFT MAIN-ELAST finite-diff DOS.

get_dft_semilocal_dielectric_function()[source]

Get JARVIS-DFT semilocal dielectric function.

list_keys()[source]

Get all main keys from webpages.

to_dict()[source]

Get dictionary for webpages.

Module contents

Modules for uploading and downloading dataset.