Manipulate chemical geometries for heterogeneous catalysis
Project description
pyRDTP
* [The 5+1 W](#the-51-w)
* [Installation](#installation)
* [Dependencies](#dependencies)
* [Manual installation](#manual-installation)
* [Automatic installation](#automatic-installation)
* [Jupyter-Lab integration](#jupyter-lab-integration)
* [Usage](#usage)
* [Basic usage](#basic-usage)
* [Reading VASP files](#reading-vasp-files)
* [Transformations](#transformations)
* [Merging different molecules](#merging-different-molecules)
* [Writing VASP files](#writing-vasp-files)
* [Advanced usage](#advanced-usage)
* [Graphs](#graphs)
* [Notebook integration](#notebook-integration)
* [Scripts](#scripts)
The 5+1 W
- What?
- pyRDTP is a Python library designed to manipulate and analyze chemical geometries mainly for heterogeneous catalysis.
- Why?
- Some computational chemistry projects involve a large number of species that are connected between them. The main purpose of pyRDTP is to ease the generation of these structures to calculate them with VASP or another software.
- How?
- pyRDTP contains different packages to transform different formats into molecules and write these objects back into different formats. It also includes different modules that compare, manipulate and analyze these objects.
- When?
- Right now! pyRDTP is still in development, but some modules work perfectly at this moment. Moreover, we will tag stable releases for daily usage.
- Where?
- At Núria López group (ICIQ, Spain). PyRDTP is designed for the daily tasks that every computational chemist in heterogeneous catalysis has to face.
- Who?
- The weird guy with the blue keyboard. I'm the main developer of these libraries and I
HIGHLYappreciate the feedback. If you find a bug, or you need to implement some weird algorithm with these libraries, don't hesitate to contact us.
Installation
Pip
pip install pyrdtp
Dependencies
pyRDTP need the following libraries to run correctly:
networkxshapelynumpyscipymatplotlib
Additional libraries are required to visualize molecules with Jupyter-Lab:
py3Dmol
Jupyter-Lab integration
3Dmol is used to see the molecules in Jupyter-Labs, you will need to install
Usage
Basic usage
Reading VASP files
To simply read a molecule from a CONTCAR file you will need to use the geomio
module from pyRDTP.
from pyRDTP import geomio
mol_1 = geomio.file_to_mol('./CONTCAR', 'contcar')
Transformations
Then mol_1 will store all the information from the CONTCAR file into a
Molecule object, different methods of Molecule can be used, for example you
can remove all the hydrogen atoms from the molecule:
mol_1.atom_remove_by_element('H')
You can also specify that you are reading a Bulk which has special methods.
For example, imagine that you have an unit cell and want to perform a 3x3x4 expansion and add vacuum:
bulk_1 = geomio.file_to_mol('./POSCAR', 'contcar', bulk=True)
bulk_1.expand(x=3, y=3, z=4)
bulk_1.vacuum_add(distance=12, dimension='z')
Merging different molecules
Another useful object is the CatalyticSystem that allows to set a Bulk as
surface and multiple Molecules as an unique system:
from pyRDTP.molecule import CatalyticSystem
caty = CatalyticSystem('dummy')
caty.surface_set(bulk_1)
caty.molecule_add(mol_1)
CatalyticSystem has his own methods, as for example move a molecule
over 2A at the center of 3 atoms:
atoms = caty.surface[[3,6,7]]
caty.move_over_multiple_atoms(mol_1, atoms, distance=3)
Writing VASP files
Once you finish you can write the new molecule to a POSCAR file:
geomio.mol_to_file(caty, './POSCAR', 'contcar')
Advanced usage
Graphs
pyRDTP uses NetworkX to work with graphs. You can
transform any molecule into a graph using the graph module, voronoi option
can be used to automatically detect the bonds:
from pyRDTP.operations import graph
grp_1 = graph.generate(mol_1, voronoi=True)
You can also plot your graph:
graph.plot(grp)
Notebook integration
You can use 3Dmol to visualize your molecules in
Jupyter-Lab. To do so you need to import the jupyter module.
from pyRDTP.tools import jupyter
jupyter.show_molecule(mol_1)
Scripts
A set of scripts is packed inside the libraries. These scripts are prepared to
perform concrete tasks using the command line. They are located inside the
scripts folder. Using:
~/pyrdtp/scripts/somescript --help
You can see the purpose and the usage of the script.
Author
Dr. Sergio P. García Carrillo, PostDoc (sp.garcia@utoronto.ca)
Mantainers
Santiago Morandi, PhD Student (smorandi@iciq.es), Oliver Loveday, PhD Student (oloveday@iciq.es)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyrdtp-0.2.tar.gz.
File metadata
- Download URL: pyrdtp-0.2.tar.gz
- Upload date:
- Size: 66.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8577e187787c3d3d61a327848eaa554b23d2853a91f9ea9e6dcaadff8cb0aba5
|
|
| MD5 |
b5b3538c08c6cb592de3d34d25900027
|
|
| BLAKE2b-256 |
4b47fc97d26ee12d011ffee70963d468a4e30d95a4e81755d1fa3de35f5dfebd
|
File details
Details for the file pyrdtp-0.2-py3-none-any.whl.
File metadata
- Download URL: pyrdtp-0.2-py3-none-any.whl
- Upload date:
- Size: 67.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4f4005fe0c96f01275b0d2964b30991b5ada74e7e06038987cf19aeb0870c45
|
|
| MD5 |
7585ba193c04ab7cff39b057e70766a9
|
|
| BLAKE2b-256 |
e64962b3097363450a131387267997300421674227da88b15e0ba685d9d38ab5
|