Prochaine révision | Révision précédente |
teaching:progappchim:rdkit [2020/03/09 15:08] – créée villersd | teaching:progappchim:rdkit [2023/05/27 22:54] (Version actuelle) – villersd |
---|
====== RDKit ====== | ====== RDKit ====== |
* [[http://www.rdkit.org/]] | * [[http://www.rdkit.org/]] |
* [[http://davies-lee.com/index.php/2018/10/06/rdkit-in-jupyter-notebooks/]] | * [[http://www.rdkit.org/docs/GettingStartedInPython.html|Getting Started with the RDKit in Python — The RDKit 2020.09.1 documentation]] |
* | * [[https://ctr.fandom.com/wiki/Depict_a_compound_as_an_image#RDKit.2FPython|Depict a compound as an image | Chemistry Toolkit Rosetta Wiki | Fandom]] |
| * Jupyter & RDKit |
| * [[https://depth-first.com/articles/2020/08/17/getting-started-rdkit-and-jupyter/|Getting Started with RDKit and Jupyter | Depth-First]] |
| * [[http://davies-lee.com/index.php/2018/10/06/rdkit-in-jupyter-notebooks/]] |
| * [[http://www.chemspider.com/|ChemSpider | Search and share chemistry]] site reprenant de nombreuses informations sur des molécules |
| * ... |
| |
| ===== Utilisation avec Anaconda ===== |
| |
| <note warning> |
| L'utilisation de RDKit pouvant poser des problèmes de conflits entre des libairies, il peut être utile de créer et activer un environnement spécifique d'Anaconda (nommé par exemple RDKit). |
| |
| La librairie rdkit est à installer, en renseignant au préalable le canal "rdkit" dans laquelle Anaconda ira la chercher. |
| |
| L'éditeur Spider doit être installé dans chaque nouvel environnement si on souhaite l'utiliser. |
| </note> |
| |
| ===== Utilisation dans Colaboratory ===== |
| * Créer une première cellule de code permettant l'installation de RDKIT : <code>!pip install rdkit-pypi</code> |
| * Fichier exemple : {{ :teaching:progappchim:rdkit_primer_01.ipynb |}} |
| |
| |
| |
| ===== Exemples d'utilisation ===== |
| |
| <code python test-rdkit.py> |
| # from http://ctr.wikia.com/wiki/Depict_a_compound_as_an_image |
| from rdkit.Chem import AllChem |
| from rdkit.Chem import Draw |
| |
| smiles = "CN1C=NC2=C1C(=O)N(C(=O)N2C)C" |
| mol = AllChem.MolFromSmiles(smiles) |
| |
| # technically this step isn't required since the drawing code |
| # will automatically add a 2D conformation to a molecule that has |
| # no conformation information, I'm including it to show how to |
| # generate 2D coords with the RDKit: |
| AllChem.Compute2DCoords(mol) |
| |
| Draw.MolToFile(mol,"caffeine.png",size=(200,250)) |
| </code> |
| |
| ===== Références ===== |
| * [[wp>Chemistry_Development_Kit|Chemistry Development Kit]] |
| * [[https://www.nextmovesoftware.com/talks/Mayfield_ChemicalDepiction_RDKITUGM_201609.pdf|Higher Quality Chemical Depictions: Lessons Learned and Advice]] John Mayfield, 2016 |
| |