bthedragonmaster / pikachu Goto Github PK
View Code? Open in Web Editor NEWPython-based Informatics Kit for Analysing Chemical Units
License: MIT License
Python-based Informatics Kit for Analysing Chemical Units
License: MIT License
After playing around with the attributes of drawing.Options(), I have noticed that some of them don't do anything:
It seems the radicals can not be generated from SIMLES, they just show the same as the close shell species:
for instance:
draw_smiles('CN(C=O)([CH2])') is the same as draw_smiles('CN(C=O)C'), no dot appears as a lone electron
Hey there!
When reading SMILES strings using PIKAChU, @Mar-Gol ran into the following problem:
>>> smiles = 'CCOC1=CC2=C(C=C1)S(=O)C(=C2C3=CC=CC=C3)C(=O)C4=CC=CC=C4'
>>> from pikachu.general import read_smiles
>>> mol = read_smiles(smiles)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\general.py", line 45, in read_smiles
structure = smiles.smiles_to_structure()
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\smiles\smiles.py", line 496, in smiles_to_structure
structure.refine_structure()
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\chem\structure.py", line 916, in refine_structure
self.aromatic_cycles = self.find_aromatic_cycles()
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\chem\structure.py", line 781, in find_aromatic_cycles
self.promote_lone_pairs_in_aromatic_cycles(aromatic_cycles)
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\chem\structure.py", line 731, in promote_lone_pairs_in_aromatic_cycles
atom.promote_lone_pair_to_p_orbital()
File "C:\Users\Otto Brinkhaus\anaconda3\envs\RanDepict\lib\site-packages\pikachu\chem\atom.py", line 512, in promote_lone_pair_to_p_orbital
p_orbital = p_orbitals[-1]
IndexError: list index out of range
pip install pikachu-chem
.I will build a work-around for our application for now, but I would appreciate your help a lot!
Thank you in advance!
Otto
Hey,
Really nice python package. Excited to see further developments.
I tried the draw functionality of the package and found the default Bond thickness to be higher than most of the other toolkits. Probably setting a lower thickness would benefit most of the users.
SMILES: CN1C=NC2=C1C(=O)N(C(=O)N2C)C
Do let me know once you have updated the documentation.
Kind regards,
Kohulan
Hi developers, I am very happy that you have developed a new molecular image generation tool, which has been very useful to me. I hope it will support more drawing standards, such as ACS-1996 Document Settings, instead of the commercial software ChemDraw.
If there is a solution, please let me know, thank you.
Hey there!
We have run into a problem with the depiction functionalities in PIKAChU. When depicting large molecules, Python simply crashes. We don't get an exception that can be caught or something like that. If I execute the code below in my Python shell, the Python shell simply closes.
from pikachu.general import read_smiles
from pikachu.drawing import drawing
smiles = 'CC(=O)N[C@H]1[C@H]([C@H](O)[C@H](O)CO)O[C@@](O[C@H](CO)[C@@H](O)[C@@H]2O[C@@](O[C@H](CO)[C@@H](O)[C@@H]3O[C@@](O[C@H](CO)[C@@H](O)[C@@H]4O[C@@](O[C@H](CO)[C@@H](O)[C@@H]5O[C@@](O[C@H](CO)[C@@H](O)[C@@H]6O[C@@](O[C@H](CO)[C@@H](O)[C@@H]7O[C@@](O[C@H](CO)[C@@H](O)[C@@H]8O[C@@](O[C@H](CO)[C@@H](O)[C@@H]9O[C@@](O[C@H](CO)[C@@H](O)[C@@H]%10O[C@@](O[C@H](CO)[C@@H](O)[C@@H]%11O[C@@](O[C@H](CO)[C@@H](O)[C@@H]%12O[C@@](O[C@H](CO)[C@@H](O)[C@@H]%13O[C@@](O[C@H](CO)[C@@H](O)[C@@H]%14O[C@@](O)(C(=O)O)C[C@H](O)[C@H]%14NC(C)=O)(C(=O)O)C[C@H](O)[C@H]%13NC(C)=O)(C(=O)O)C[C@H](O)[C@H]%12NC(C)=O)(C(=O)O)C[C@H](O)[C@H]%11NC(C)=O)(C(=O)O)C[C@H](O)[C@H]%10NC(C)=O)(C(=O)O)C[C@H](O)[C@H]9NC(C)=O)(C(=O)O)C[C@H](O)[C@H]8NC(C)=O)(C(=O)O)C[C@H](O)[C@H]7NC(C)=O)(C(=O)O)C[C@H](O)[C@H]6NC(C)=O)(C(=O)O)C[C@H](O)[C@H]5NC(C)=O)(C(=O)O)C[C@H](O)[C@H]4NC(C)=O)(C(=O)O)C[C@H](O)[C@H]3NC(C)=O)(C(=O)O)C[C@H](O)[C@H]2NC(C)=O)(C(=O)O)C[C@@H]1O'
mol = read_smiles(smiles)
drawer = drawing.Drawer(mol)
We will build a workaround and simply not use PIKAChU for large structures in our application, but I think it may make sense to look into this.
Have a nice day!
Otto
Hello!
I met a problem while trying to save the structure with smile.general.smiles_to_molfile()
. I would be grateful if you could help.
To check if there is an issue with the molecular, I also try to draw it with the NCBI online tool(https://pubchem.ncbi.nlm.nih.gov//edit3/index.html). The SMILE string, structure and error message are following.
CC1=C(/C=C/C(C)=C/C=C/C(C)=C/C=O)C(C)(C)CCC1.NC(=O)c1ccc[n+]([C@@H]2O[C@H](COP(=O)(O)OP(=O)(O)OC[C@H]3O[C@@H](n4cnc5c(N)ncnc54)[C@H](O)[C@@H]3O)[C@@H](O)[C@H]2O)c1.O
Thank you!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.