Code Monkey home page Code Monkey logo

catkit's Introduction

CatKit: Catalysis Kit

Coverage Status Documentation Status

Welcome to CatKit! A staging ground for computational tools which are generally useful for catalysis research. The goal of the project is to provide a communal location for those interested in hosting such tools under a common banner. In doing so, we hope to provide the infrastructure to produce more advanced functionality based on modular components of individual contributors.

You can find our full documentation here.

Installation

Pip installation

CatKit is most easily installed with pip using:

pip install git+https://github.com/SUNCAT-Center/CatKit.git

For usage on high-performance computers, installation will need to be performed locally which can be done using:

pip install --user git+https://github.com/SUNCAT-Center/CatKit.git

These commands will install all of the necessary dependencies for you.

Source installation

Alternatively, clone the git repo to your home directory.

git clone https://github.com/SUNCAT-Center/CatKit.git catkit

Then, add ~/catkit/bin and ~/catkit to your PATH and PYTHONPATH environment variables by adding the following line to your ~/.bashrc file.

export PYTHONPATH=~/catkit:$PYTHONPATH
export PATH=~/catkit/bin:$PATH

And install the package:

cd catkit/
python setup.py install

CatGen: Catalysis Generator

CatGen is an enumeration module designed to construct various catalytic structures.

  • [X] Gas phase molecules
  • [ ] Bulk structures
  • [X] Surfaces structures
  • [X] Adsorption sites
  • [X] Catalytic structures

It also has functionality for enumeration of other systems relevant to the field of catalysis.

  • [X] Reaction mechanisms
  • [X] Reaction routes

For additional details regarding how the generator operates, including example usage, see the CatGen documentation.

CatFlow: Catalysis Workflow

CatFlow is currently a staging ground for Workflow code and techniques. These functions are meant to be used in conjunction with the other modules inside CatKit to help automate these tasks.

Currently, CatFlow’s functionality utilizes Fireworks and many of the functions are also specifically tailored to work on the high-performance computers which are available to the SUNCAT group as Stanford.

For additional detail see the CatFlow documentation.

Dependencies

CatKit attempts to make use of basic functionalities implemented by existing softwares when possible to extend its capabilities.

A full list of required packaged can be found in the requirements.

catkit's People

Contributors

ehermes avatar equationcrunchor avatar kirstenwinther avatar mamunm avatar mhangaard avatar mhoffman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

catkit's Issues

AdsorptionSites incompatible with newest numpy version

Creating np.array() from inhomogeneous lists is no longer allowed. "dtype=object" has to be explicitly stated.
Examples where the issue exists:
-catkit.gen.adsorption lines 60-61, 94, 876-877

fix: self.r1_topology = np.array(self.r1_topology) --> self.r1_topology = np.array(self.r1_topology, dtype=object)

Improve molecule geometry prediction

I am trying to convert RMG adjacency list molecule specifications into 3D structures, and I've been running into issues where the predicted structures are unreasonable and do not match chemical intuition. As an illustration of the problem, consider the following script, which generates hydrogen peroxide

from catkit.build import molecule
from ase.visualize import view

view(molecule('H2O2')[0])

This results in the following geometry, with the O-O-H bond highlighted to show a bond angle of 180 degrees:
screen shot 2018-11-19 at 11 11 11

From what I can tell, CatKit determines the bond angles by just looking at the number of bonds each atom has, and assuming the hybridization is whatever a neutral carbon atom would be given the same number of bonds. This breaks for other elements (like oxygen) and for species containing carbon radicals.

Ideally, CatKit would at least be able to generate proper structures for compounds containing oxygen atoms. Perhaps this could be done by connecting dummy "lone pair" atoms to elements like oxygen, then generating the 3D structure and deleting the lone pair sites. This could also be extended to allow for user-specified lone pairs for radical species, which would enable me to quickly convert RMG adjacency lists (which optionally specify lone pairs and lone unpaired electrons) into reasonable 3D structures.

get_voronoi_neighbors exhausts memory

This seems to happen for high aspect ratio unit cells with many atoms, when the call is made to scipy.spatial.Voronoi. Can something be done to either:

  • Estimate memory usage before running and raise MemoryError if too intensive?
  • Break the problem down to something less memory intensive?
    The current behavior risks exhausting memory and cause a freeze.

Recommendations about merge

Have you considered merging projects into ase or pymatgen? There are many functions are repeated, and repeated wheel is not a good choice. This can also help some features quickly promote.

Adsorbate splits in example script

Following the SI of the 2019 paper results in a split adsorbate (C3H5) as shown below

image

Following the code:

from catkit.gen.surface import SlabGenerator
from catkit.gen.adsorption import Builder
from ase.build import bulk
from ase.io import write
from ase.visualize import view
import numpy as np
from catkit.build import molecule
atoms = bulk('Pd', 'fcc', a=4, cubic=True)
atoms[3].symbol='Au'

gen = SlabGenerator(atoms, miller_index= [1,1,1], layers=6, layer_type='trim', vacuum=10)
slab = gen.get_slab()

exslab=slab.copy()
exslab*=(9,9,1)
exslab.set_cell(slab.cell)
exslab.translate(-4*np.sum(exslab.cell[:2], axis=0))

adsorbate=molecule('C3H5')[4]
builder=Builder(slab)


ads_slab = builder.add_adsorbate(adsorbate, bonds=[0, 2], index=-1)
for aslab in ads_slab:
    aslab = aslab.copy()
    surf_atoms = np.where(np.in1d(aslab.get_chemical_symbols(), ['Pd', 'Au']))
    del aslab[surf_atoms]
    aslab += exslab
    aslab.set_cell([0, 0, 0])
write('tutorial-1.xyz', ads_slab)
write('tutorial-2.xyz', aslab)

import catkit
catkit.__version__ # '0.5.4'

add_adsorbate fails for linear molecules with 3 or more atoms

I ran into this issue when trying to adsorb linear molecules with three or more atoms. Here's a small example, adapted from the documentation:

from catkit import Gratoms
from catkit.build import molecule
from catkit.gen.surface import SlabGenerator
from catkit.gen.adsorption import Builder
from catkit.gen.molecules import get_3D_positions

from ase.build import bulk
from ase.visualize import view

slab = SlabGenerator(bulk('Pd'),
                     miller_index=(1, 1, 1),
                     layers=8,
                     vacuum=4,
                     standardize_bulk=True).get_slab()

adsorbate = molecule('OCO', bond_index=1)[0]

ads_slab = Builder(slab).add_adsorbate(adsorbate, bonds=[1], index=-1)

print('{} adsorption structures generated'.format(len(ads_slab)))

view(ads_slab)

Produces the output:

Traceback (most recent call last):
  File "bug.py", line 18, in <module>
    ads_slab = Builder(slab).add_adsorbate(adsorbate, bonds=[1], index=-1)
  File "/Users/ehermes/Library/Python/3.6/lib/python/site-packages/catkit/gen/adsorption.py", line 525, in add_adsorbate
    **kwargs)]
  File "/Users/ehermes/Library/Python/3.6/lib/python/site-packages/catkit/gen/adsorption.py", line 602, in _single_adsorption
    atoms, branch, root, adsorption=True)
  File "/Users/ehermes/Library/Python/3.6/lib/python/site-packages/catkit/gen/molecules.py", line 267, in _branch_molecule
    basis[:, 1] *= -np.sin(tor)
IndexError: index 1 is out of bounds for axis 1 with size 1

ReactionNerwork(Catgen) error

Dear all,

Thank you for your work.
I am trying to use CatGen and I can't running a program in 1.3 Gas-phase
Is it necessary to generate C2H6-example.db with NetworkX?
image

Query for Delaunay triangulation

Hallo,

I would like to ask in your webpage you have mentioned Delaunay triangulation symmetries for surface atoms. Is this technique implemented and can it be used to find optimal position of ad-atoms inside a bulk phase. Is this technique depends on adaptive sampling approach.

One more questions regarding CatGen: Catalysis Generator is whether can we construct surfaces of any orientation for any alloys using this tool.

Thank for your input.

Asif

.get_adsorption_sites() fails when called more than once

When using the same catkit.surface.SlabGenerator() more than once to get adsorption sites (e.g. to get the adsorption sites for more than one termination), it fails with a rather cryptic error message. The problem is demonstrated in this Gist. From the outside it seems counter-intuitive to instantiate a fresh SlabGenerator before every call to this function.

Steps to reproduce

  1. Download the Gist in raw format
  2. Run the script with the current installation
  3. Watch it crash

What should happen instead

  1. Should fail more gracefully
  2. Alternatively, if surface_sites is very expensive to calculate it should somehow detect if the function has been called with the same slab argument or a different one than previously and re-calculate the surface_atoms/surface_sites iff the slab has changed.

Gratoms attribute with _ missing? (_cell, _pbc)

Seems that starting from 0.5.1, the copy method in gratoms is trying to access _cell, and _pbc attributes. But I don't see those attributes being defined anywhere, nor in ase.

def copy(self): atoms = self.__class__(cell=self._cell, pbc=self._pbc, info=self.info)

reporting alerts when import catkit

I meet a alert, but it looks like nothing serious.

from catkit.build import molecule
/home/xxx/anaconda3/lib/python3.8/site-packages/CatKit-0.5.4-py3.8.egg/catkit/gen/adsorption.py:517: SyntaxWarning: "is" with a literal. Did you mean "=="?
/home/xxx/anaconda3/lib/python3.8/site-packages/CatKit-0.5.4-py3.8.egg/catkit/gen/adsorption.py:517: SyntaxWarning: "is" with a literal. Did you mean "=="?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.