This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a basic example of how to create, plot, and analyze Phase Diagrams using the pymatgen | |
codebase and Materials Project database. To run this example, you should: | |
* have pymatgen (www.pymatgen.org) installed along with matplotlib | |
* 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" | |
For citation, see https://www.materialsproject.org/citing | |
For the accompanying comic book, see http://www.hackingmaterials.com/pdcomic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a basic example of how to create, plot, and analyze OPEN Phase Diagrams using the pymatgen | |
codebase and Materials Project database. To run this example, you should: | |
* have pymatgen (www.pymatgen.org) installed along with matplotlib | |
* 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" | |
For citation, see https://www.materialsproject.org/citing | |
For the accompanying comic book, see http://www.hackingmaterials.com/pdcomic | |
""" | |
from __future__ import print_function |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This is a basic example of how to check a new material for stability using the pymatgen | |
codebase and Materials Project database. It assumes that you have already calculated | |
the energy of your predicted compound with DFT. | |
It is very important to note that this code does NOT do a detailed check to make sure | |
your computed energies are compatible with those in the Materials Project database | |
(i.e., uses the same functional, +U corrections, k-point mesh, etc). You must ensure | |
that the energies you provide are directly comparable with those in Materials Project, | |
otherwise this code will give you false results! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This example prints out the corrections applied by a Compatibility scheme | |
(e.g., MaterialsProjectCompatibility) in order to improve the accuracy of reaction energies | |
and phase diagrams. | |
To run this example, you should: | |
* have pymatgen (www.pymatgen.org) installed | |
* obtain a Materials Project API key (https://www.materialsproject.org/open) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer