Apps

HTTP Request to the Apps backend can be made in Python using e.g. the requests library for GET requests, like so:

#!/usr/bin/env python

import json
import pprint

import requests

url = 'http://api.catalysis-hub.org/apps/prototypeSearch/facet_search/'
r = requests.get(url,
                  params={
                      'search_terms': [
                          'hollandite',
                      ],
                      'facet_filters': '["spacegroup:87"]'
                  }
                  )
pprint.pprint(json.loads(r.content))

or for POST requests, like so:

#!/usr/bin/env python

import json
import pprint

import requests

url = 'http://api.catalysis-hub.org/apps/prototypeSearch/get_structure/'

r = requests.post(url,
    json={
        'parameters': '[3.1]',
        'species': '["S"]',
        'spacegroup': 221,
        })
pprint.pprint(json.loads(r.content))

That is, every function below that is declared either as a GET or a POST request can be translated into a corresponding HTTP request by replacing every dot (‘.’) with a slash (‘/’) and passing in arguments either as params=… (GET) or json=… (POST) .

Please refer to the following API documentation for details.

ActivityMaps

class apps.activityMaps.ReactionModel(xlabel=None, ylabel=None, zlabel=None, reference='')[source]

Bases: object

get_raw_systems(filters)[source]
get_xyz(systems)[source]
apps.activityMaps.graphql_query(products='products: "O"', reactants='', facet='', limit=5000)[source]
apps.activityMaps.systems(request=None)[source]

GET: Get systems for given reactions

Parameters:activityMap (str) – request Map like OER, NRR, HER. Defaults to CO_Hydrogenation_111.
Returns:
The corresponding systems in the database.
  • reference(str): Reference for activity map.
  • systems(list): Corresponding systems.
Return type:dict

Examples

curl {ROOT}/apps/activityMaps/systems/?activityMap=OER
curl {ROOT}/apps/activityMaps/systems/?activityMap=CO_Hydrogenation_111
  {
"reference": "[1] Friebel, Daniel, Mary W. Louie, Michal Bajdich, Kai E. Sanwald, Yun Cai, Anna M. Wise, Mu-Jeng Cheng et al. "Identification of highly active Fe sites in (Ni, Fe) OOH for electrocatalytic water splitting." Journal of the American Chemical Society 137, no. 3 (2015): 1305-1313. DOI: 10.1021/ja511559d [2] Man, Isabela C., Hai\u2010Yan Su, Federico Calle\u2010Vallejo, Heine A. Hansen, Jos\u00e9 I. Mart\u00ednez, Nilay G. Inoglu, John Kitchin, Thomas F. Jaramillo, Jens K. N\u00f8rskov, and Jan Rossmeisl. "Universality in oxygen evolution electrocatalysis on oxide surfaces." ChemCatChem 3, no. 7 (2011): 1159-1165. DOI: 10.1002/cctc.201000397",
"systems": [
  {
    "facet": "3ML",
    "formula": "Ir16Sr4O51",
    "uid": "5b0b436e4d3d07c3fb7a4cee6d5975f1",
    "x": 1.5028540934200003,
    "y": 1.3901226701799998,
    "z": -0.3208143060400004
  },
  {
    "facet": "100",
    "formula": "Ir24O53",
    "uid": "b33747e9868b9514639752f1b58e2f03",
    "x": 1.4204331210799999,
    "y": 0.44616836241,
    "z": -0.4164322559
  }, ] }

AtoMl

Bulk Enumerator

apps.bulkEnumerator.get_bulk_enumerations(request=None)[source]

Return a list of prototypes names

Parameters:
  • stoichiometry (str, optional) – Stoichiometry separated by ‘_’. Defaults to ‘1’.
  • num_type (str, optional) – Limit by number of ‘atoms’ or number of ‘wyckoff’ sites. Possible values are ‘atoms’ or ‘wyckoff’. Defaults to ‘atoms’.
  • num_start (int, optional) – Mininum number of sites. Defaults to 1.
  • num_end (int, optional) – Maximum number of sites. Defaults to 1.
  • SG_start (int, optional) – Lowest spacegroup to consider. Can be between 1 and 230. Defaults to 1.
  • SG_end (int, optional) – Hightest spacegroup to consider. Can be between 1 and 230. Defaults to 10.
Returns:

Dictionary of input and corresponding

enumerations.

dict {input }: Input parameters. list [enumerations]: List of possible enumeations. dict {enumerations}: {

name: (str) Prototype Name, natom: (int) Number of Atoms, parameters: [str] Free parameters, spaceGroupNumber: (int) The number of the spacegroup (1-230), specie_permutations: [str] Equivalent permutations, species: [str] The possible occupations, wyckoffs [str] The Wyckoff sites,

}

Return type:

dict {input, enumerations }

apps.bulkEnumerator.get_structure(request=None)[source]

Construct structure from wyckoff positions, species, and other parameters

Parameters:
  • wyckoffPositions ([str]) – List of Wyckoff positions (length one strings).
  • wyckoffSpecies ([str]) – Corresponding list of elements.
apps.bulkEnumerator.get_wyckoff_from_cif(request=None)[source]

Function clone of get_wyckoff_from_structure, except working w/ string input instead of file upload.

apps.bulkEnumerator.get_wyckoff_from_structure(request=None)[source]
apps.bulkEnumerator.get_wyckoff_list(request=None)[source]

Return a list of possible wyckoff position belonging to a certain spacegroup.

Parameters:
  • spacegroup (int, optional) –
  • tolerance (float, optional) –
apps.bulkEnumerator.mstripb(liste)[source]
apps.bulkEnumerator.stripb(string)[source]

CatKitDemo

Pourbaix diagrams

Prototype Search

Utilities

apps.utils.ase_convert(instring, informat=None, outformat=None, atoms_in=False, atoms_out=False)[source]

Enter a input file that is understood by ASE and return a string in a different format as written by ase.