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)
Metadata
Release files for pyRDTP 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyrdtp-0.2.tar.gz | 66.3 kB | Without provenance | Details for pyrdtp-0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyrdtp-0.2-py3-none-any.whl | Python 3 | none | any | Details for pyrdtp-0.2-py3-none-any.whl |
Total release size: 133.4 kB
Release files / pyrdtp-0.2.tar.gz
| Download URL | pyrdtp-0.2.tar.gz |
|---|---|
| Size | 66.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8577e187787c3d3d61a327848eaa554b23d2853a91f9ea9e6dcaadff8cb0aba5
|
|
BLAKE2b-256 checksum How to use checksums |
4b47fc97d26ee12d011ffee70963d468a4e30d95a4e81755d1fa3de35f5dfebd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / pyrdtp-0.2-py3-none-any.whl
| Download URL | pyrdtp-0.2-py3-none-any.whl |
|---|---|
| Size | 67.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4f4005fe0c96f01275b0d2964b30991b5ada74e7e06038987cf19aeb0870c45
|
|
BLAKE2b-256 checksum How to use checksums |
e64962b3097363450a131387267997300421674227da88b15e0ba685d9d38ab5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Security for pyRDTP 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.