Skip to content

Instantly share code, notes, and snippets.

Avatar

Anubhav Jain computron

View GitHub Profile
@computron
computron / co_authors.py
Last active Jan 15, 2020
A script to automatically generate a list of co-authors / collaborators using the Scopus database
View co_authors.py
"""
OVERVIEW: This script will automatically export a list of all your co-authors and
their institutions to an Excel file based on information already in the Scopus database.
LIMITATIONS:
1. Only up to 150 collaborators are supported by Scopus.
2. Sometimes, you want to filter by collaborators for only the last 4 years. Unfortunately,
there is no simple way to do this.
INSTRUCTIONS:
@computron
computron / oxidative_stability.py
Last active Mar 2, 2018
estimate oxidative stability of a compound using Materials Project data. The higher (less negative) the maximum chemical potential of oxygen that is tolerated, the more stable.
View oxidative_stability.py
from pymatgen import Composition, Element, MPRester
from pymatgen.analysis.phase_diagram import PhaseDiagram
if __name__ == "__main__":
# stuff the user needs to set
MAPI_KEY = None
FORMULA = "FeP2"
OPEN_ELEMENT = "O"
@computron
computron / Matminer_bulkmodulus.ipynb
Last active Jan 21, 2018
An introductory tutorial for matminer that involves data mining bulk modulus
View Matminer_bulkmodulus.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@computron
computron / esdr_scopus_to_endnote.py
Last active Sep 22, 2017
Look up ESDR researchers by Scopus ID and export citation data to Endnote
View esdr_scopus_to_endnote.py
from scopus import ScopusAuthor, ScopusAbstract
AUTHOR_SCOPUS_ID = """
Sumanjeet Kaur, 15071548400
Sean Lubner, 55895288700
Fuduo Ma, 55390403200
Ravi Prasher, 7004221271
Peiyuan Yu, 56412335300
Vivek Subramanian, 56504639000
David Suich, 55804751900
@computron
computron / BulkModulus.ipynb
Created Nov 30, 2016
Demo: Bulk modulus prediction with MatMiner
View BulkModulus.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@computron
computron / get_dos_csv.py
Created Feb 24, 2016
Helps convert a DOS to tab-delimited. Useful for experimentalists working in Excel
View get_dos_csv.py
from pymatgen import MPRester, Spin, Element
def print_dos_data(dos):
print("The Fermi energy is {}".format(dos.efermi))
cols = ["energy", "total_dos", "up_dos", "down_dos"]
energies = dos.energies
total_dos = dos.get_densities() # note that you can also get smeaered densities using a different function
up_dos = dos.get_densities(Spin.up)
@computron
computron / fireworks-vasp_demo.py
Created Nov 9, 2014
basic demo of using the fireworks-vasp codebase
View fireworks-vasp_demo.py
from fireworks import Firework
from fireworks.core.firework import Workflow
from fireworks_vasp.tasks import WriteVaspInputTask, VaspCustodianTask, VaspAnalyzeTask
from pymatgen.matproj.rest import MPRester
"""
This demo shows how one can use the fireworks-vasp codebase. It runs only a single VASP job.
To run multiple VASP jobs in a workflow, one needs to pass the directory information between
jobs such that input files can be copied.
"""
@computron
computron / create_vaspinputs.py
Created May 18, 2014
Create VASP inputs for an MP structure
View create_vaspinputs.py
"""
This example prints out VASP inputs for an MP structure.
To run this example, you should:
* have pymatgen (www.pymatgen.org) installed
* obtain a Materials Project API key (https://www.materialsproject.org/open)
* paste that API key in the MAPI_KEY variable below, e.g. MAPI_KEY = "foobar1234"
as well as:
@computron
computron / print_structures.py
Created May 18, 2014
Print structures from Materials Project
View print_structures.py
"""
This example prints out structure(s) by MP id, by formula, or by chemical system
To run this example, you should:
* have pymatgen (www.pymatgen.org) installed
* obtain a Materials Project API key (https://www.materialsproject.org/open)
* paste that API key in the MAPI_KEY variable below, e.g. MAPI_KEY = "foobar1234"
as well as:
@computron
computron / plot_bs.py
Last active Nov 2, 2016
plot_bandstructure
View plot_bs.py
"""
This example prints out a band structure object of a Materials Project entry.
To run this example, you should:
* have pymatgen (www.pymatgen.org) installed
* obtain a Materials Project API key (https://www.materialsproject.org/open)
* paste that API key in the MAPI_KEY variable below, e.g. MAPI_KEY = "foobar1234"
as well as:
You can’t perform that action at this time.