MoleculesManager.ipynb

In [1]:
from xv.util import listAttr, locatePath, listProp
from xv.chemistry.physical import MoleculesManager
from IPython.display import Image, HTML
In [2]:
from rdkit import Chem
from rdkit.Chem import Draw
from rdkit.Chem.Draw import IPythonConsole
from xv.chemistry.helper import RdkitHelper
In [3]:
ke = MoleculesManager()
ke
Out[3]:
2430947621328@MoleculesManager

Details of molecules


Minimum Grade: 6
Maximum Grade: 12


Examples
--------
ke = MoleculesManager()
ke

ke.printProblemTypes()

ke.getRandomProblem()
ke.getRandomProblem(problem_type = 0)
...

ke.printProblem()
ke.printAnswer()
ke.printSolution()


doc_style: xv_doc

In [4]:
ke.printProblemTypes()
0. _problem_search_a_molecule
1. _view_3d_of_a_molecule
In [13]:
ke.getRandomProblem(problem_type = 1, 
#                   search = 'acetic anhydride',
#                   search = "water",
                  search = "sulfuric acid",

#                     search = '1S/Li'
#                    search = '7439-93-2',
#                    search = 'silver tetrafluoroborate',
                   # search = 'Iron(II) oxide',
                   #search = 'alcohol',
                   #search = 'nitric oxide',
#                    search = 'glucose',
#                    search = "WQZGKKKJIJFFOK-GASJEMHNSA-N",
                   )
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
Please wait, converting data to dict ...
[17:33:18] WARNING: Omitted undefined stereo

[17:33:18] WARNING: Omitted undefined stereo

[17:33:18] WARNING: Omitted undefined stereo

[17:33:18] WARNING: Omitted undefined stereo

[17:33:18] WARNING: Omitted undefined stereo

[17:33:18] WARNING: Omitted undefined stereo

[17:33:19] WARNING: Omitted undefined stereo

[17:33:19] WARNING: Omitted undefined stereo

[17:33:19] WARNING: Omitted undefined stereo

[17:33:19] WARNING: Omitted undefined stereo

Out[13]:

Write common properties of molecules matching 'sulfuric acid'
In [14]:
ke.printAnswer()
Out[14]:


chebi_par_id:     26836
csid:     1086
pref_name:     SULFURIC ACID
common_name:     SULFURIC ACID
molecular_formula:     $\displaystyle
H2O4S
$
full_molformula:     $\displaystyle
H2O4S
$


csid:     8962
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
CH_{8}N_{2}O_{4}S
$


csid:     10640
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{13}H_{13}N_{3}O_{4}S
$


csid:     13806
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{3}H_{11}N_{3}O_{4}S
$


csid:     58305
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{14}H_{26}N_{2}O_{11}S
$


csid:     84226
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{18}N_{2}O_{6}S
$


csid:     141579
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{14}N_{2}O_{7}S
$


csid:     227990
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{3}H_{8}N_{4}O_{5}S
$


csid:     242019
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{21}H_{25}FN_{6}O_{7}S_{2}
$


csid:     242021
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{21}H_{24}FN_{5}O_{7}S_{2}
$


csid:     242023
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{21}H_{24}FN_{5}O_{7}S_{2}
$


csid:     390116
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{18}H_{38}N_{4}O_{15}S
$


csid:     2038660
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{11}Cl_{2}N_{3}O_{7}S_{2}
$


csid:     2038662
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{11}Cl_{2}N_{3}O_{7}S_{2}
$


csid:     2039540
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{14}H_{16}ClN_{3}O_{8}S_{2}
$


csid:     2039542
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{14}H_{16}ClN_{3}O_{8}S_{2}
$


csid:     2041244
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{12}ClN_{3}O_{7}S_{2}
$


csid:     4572187
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{22}H_{45}N_{5}O_{17}S
$


csid:     9217586
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{5}H_{14}N_{4}O_{4}S
$


csid:     9531945
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{4}H_{14}N_{4}O_{6}S
$


csid:     10124000
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{20}H_{26}N_{2}O_{6}S
$


csid:     14033122
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{24}H_{20}FN_{5}O_{6}S
$


csid:     21326670
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{16}H_{28}N_{2}O_{4}S
$


csid:     21379228
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{30}N_{8}O_{4}S
$


csid:     21467933
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{16}N_{4}O_{6}S
$


csid:     21467975
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{18}H_{20}BrN_{3}O_{6}S
$


csid:     23041657
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{20}N_{2}O_{4}S
$


csid:     26463734
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{8}H_{17}N_{3}O_{4}S
$


csid:     28346717
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{7}H_{18}N_{4}O_{4}S
$


csid:     28543318
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{7}H_{18}N_{4}O_{5}S
$


csid:     28544026
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{12}H_{28}N_{6}O_{4}S
$


csid:     28577962
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{14}H_{32}N_{6}O_{6}S
$


csid:     28604824
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{21}H_{19}NO_{9}S
$


csid:     29312478
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{18}H_{24}N_{6}O_{8}S
$


csid:     29314130
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{6}H_{14}N_{4}O_{5}S
$


csid:     29314131
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{16}N_{4}O_{6}S
$


csid:     29314132
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{17}N_{5}O_{4}S
$


csid:     29314133
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{9}H_{16}N_{6}O_{4}S
$


csid:     29314135
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{7}H_{13}N_{5}O_{4}S
$


csid:     29356285
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{13}H_{19}ClN_{2}O_{8}S_{2}
$


csid:     30649227
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{16}H_{26}N_{4}O_{8}S
$


csid:     57421125
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{20}H_{24}F_{2}N_{4}O_{4}S
$


csid:     58811244
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{9}H_{10}BrNO_{5}S_{2}
$


csid:     67178591
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{12}N_{6}O_{8}S
$


csid:     95501720
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{7}H_{11}BrN_{2}O_{4}S
$


csid:     114711347
pref_name:     Sulfuric acid
common_name:     Sulfuric acid
molecular_formula:     $\displaystyle
C_{10}H_{14}ClN_{5}O_{8}S
$
In [15]:
ke.view3D(ke.compounds)
SULFURIC ACID

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid
[17:33:30] WARNING: Omitted undefined stereo

[17:33:30] WARNING: Omitted undefined stereo

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid
[17:33:31] WARNING: Omitted undefined stereo

[17:33:31] WARNING: Omitted undefined stereo

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

Sulfuric acid

You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol

In [ ]:
 

Machine Learning

  1. Deal Banking Marketing Campaign Dataset With Machine Learning

TensorFlow

  1. Difference Between Scalar, Vector, Matrix and Tensor
  2. TensorFlow Deep Learning Model With IRIS Dataset
  3. Sequence to Sequence Learning With Neural Networks To Perform Number Addition
  4. Image Classification Model MobileNet V2 from TensorFlow Hub
  5. Step by Step Intent Recognition With BERT
  6. Sentiment Analysis for Hotel Reviews With NLTK and Keras
  7. Simple Sequence Prediction With LSTM
  8. Image Classification With ResNet50 Model
  9. Predict Amazon Inc Stock Price with Machine Learning
  10. Predict Diabetes With Machine Learning Algorithms
  11. TensorFlow Build Custom Convolutional Neural Network With MNIST Dataset
  12. Deal Banking Marketing Campaign Dataset With Machine Learning

PySpark

  1. How to Parallelize and Distribute Collection in PySpark
  2. Role of StringIndexer and Pipelines in PySpark ML Feature - Part 1
  3. Role of OneHotEncoder and Pipelines in PySpark ML Feature - Part 2
  4. Feature Transformer VectorAssembler in PySpark ML Feature - Part 3
  5. Logistic Regression in PySpark (ML Feature) with Breast Cancer Data Set

PyTorch

  1. Build the Neural Network with PyTorch
  2. Image Classification with PyTorch
  3. Twitter Sentiment Classification In PyTorch
  4. Training an Image Classifier in Pytorch

Natural Language Processing

  1. Spelling Correction Of The Text Data In Natural Language Processing
  2. Handling Text For Machine Learning
  3. Extracting Text From PDF File in Python Using PyPDF2
  4. How to Collect Data Using Twitter API V2 For Natural Language Processing
  5. Converting Text to Features in Natural Language Processing
  6. Extract A Noun Phrase For A Sentence In Natural Language Processing