Package: pyRDTP
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)AuthorThe 5+1 WWhat?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 IHIGHLYappreciate the feedback. If you find a bug, or you need to implement some weird algorithm with these libraries, don't hesitate to contact us.InstallationPippip install pyrdtpDependenciespyRDTP need the following libraries to run correctly:networkxshapelynumpyscipymatplotlibAdditional libraries are required to visualize molecules with Jupyter-Lab:py3DmolJupyter-Lab integration3Dmol is used to see the molecules in Jupyter-Labs, you will need to installUsageBasic usageReading VASP filesTo simply read a molecule from a CONTCAR file you will need to use thegeomiomodule from pyRDTP.frompyRDTPimportgeomiomol_1=geomio.file_to_mol('./CONTCAR','contcar')TransformationsThenmol_1will store all the information from the CONTCAR file into aMoleculeobject, different methods ofMoleculecan 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 aBulkwhich 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 moleculesAnother useful object is theCatalyticSystemthat allows to set aBulkas
surface and multipleMoleculesas an unique system:frompyRDTP.moleculeimportCatalyticSystemcaty=CatalyticSystem('dummy')caty.surface_set(bulk_1)caty.molecule_add(mol_1)CatalyticSystemhas 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 filesOnce you finish you can write the new molecule to a POSCAR file:geomio.mol_to_file(caty,'./POSCAR','contcar')Advanced usageGraphspyRDTP usesNetworkXto work with graphs. You can
transform any molecule into a graph using the graph module,voronoioption
can be used to automatically detect the bonds:frompyRDTP.operationsimportgraphgrp_1=graph.generate(mol_1,voronoi=True)You can also plot your graph:graph.plot(grp)Notebook integrationYou can use3Dmolto visualize your molecules in
Jupyter-Lab.  To do so you need to import thejupytermodule.frompyRDTP.toolsimportjupyterjupyter.show_molecule(mol_1)ScriptsA set of scripts is packed inside the libraries. These scripts are prepared to
perform concrete tasks using the command line. They are located inside thescriptsfolder. Using:~/pyrdtp/scripts/somescript --helpYou can see the purpose and the usage of the script.AuthorDr. Sergio P. García Carrillo, PostDoc (sp.garcia@utoronto.ca)MantainersSantiago Morandi, PhD Student (smorandi@iciq.es), Oliver Loveday, PhD Student (oloveday@iciq.es)