Python Notes for mca i year students osmania university.docx
Coding tools
1. 1
Unitat de Farmacologia i Farmacognòsia - Facultat de Farmàcia
Coding tools in Science and
Technology projects
Prof. Dr. Francisco Pérez García
Department of Technology
Pompeu Fabra High School, Martorell, Barcelona (Spain)
SCIENTIX Ambassador
Datura stramonium
Transatlantic Education Dialogue
Collaboration Corner
27 February 2022
2. 2
CONTENTS
Coding tools: block-based programming vs text-based
programming, easy deep learning and machine learning
Three sample Science and Technology projects:
Air pollution project: measuring and analysing data
Astronomy project: analysing supernovas and exoplanet
Herbal drugs project: in silico research against
coronavirus
17. 17
Analysing pollution
Using R library: openair
https://davidcarslaw.github.io/openair/
TUTORIALS, FREE BOOK AND DOCUMENTATION
https://blocs.xtec.cat/tecno/science/environment/openair-r/
http://xtec.cat/~fperez5/medi_ambient.html
20. 20
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing the Universe
Objectives
• One student analyse one constellation including myth or
history
• Creation of an interactive image map of a constellation
using GIMP Image Map option and mapper.js Javascript
library and locating sky objects. Another possibility is to
use skysphere.js library.
• Analysis of quick spectra using js9.si.edu website or
SAOImageDS9 software and imageJ to know the
chemical composition percentages.
21. 21
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Creating a constellation image map
Tools
LEARNING CODING: www.w3schools.com
Learn the basics of Javascript, CSS, HTML, Python, etc with Try it editor
Image constellation from IAU, e.g. https://www.iau.org/public/images/detail/cas/
Finding astronomical data: http://cdsportal.u-strasbg.fr/
GIMP Image editor http://www.gimp.org
Mapper.js available http://www.netzgesta.de/mapper/
Code at my github: https://github.com/drfperez/draco
22. 22
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Creating a constellation image map
Tools
Available at http://www.gimp.org
23. 23
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Creating a constellation image map
Map file contents from GIMP
<img src="[Cassiopeia] (imported)" width="1280" height="1280"
border="0" usemap="#map" />
<map name="map">
<!-- #$-:Image map file created by GIMP Image Map plug-in -->
<!-- #$-:GIMP Image Map plug-in by Maurits Rijk -->
<!-- #$-:Please do not edit lines starting with "#$" -->
<!-- #$VERSION:2.3 -->
<!-- #$AUTHOR:Francisco Pérez García -->
<area shape="circle" coords="914,624,18" alt="Cassiopeia A"
href="https://en.wikipedia.org/wiki/Cassiopeia_A" />
</map>
24. 24
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Creating a constellation image map
Converting map file into html file
<area target="_blank" class="noborder icolor22C2F1" alt="SN 2013hc"
title="SN 2013hc" href="https://wis-tns.weizmann.ac.il/object/2013hc"
coords="363,296,36" shape="circle">
Source code at github.com/drfperez/draco
25. 25
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Creating an interactive sky sphere
Results
Source code available at:
http://github.com/drfperez/skysphere
Visible at http://pompeu.neocities.org/skysphere
26. 26
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Radiation from the sky
Radiation being block by atmosphere
27. 27
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Chandra space telescope
28. 28
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
ACIS
Advanced CCD Imaginging Spectrometer (ACIS) in Chandra
29. 29
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
ACIS intrument
Advanced CCD Imaging Spectrometer (ACIS) is an X-
ray imager. X-ray photons hitting the camera are
detected individually and their position, energy and
arrival time recorded. This allows for high resolution
(~1 arcsec) imaging, moderate resolution
spectroscopy and timing studies.
30. 30
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Resources
Chandra X-Ray Observatory Education:
https://chandra.harvard.edu/edu/
Prof. Kholena (Duke University) website:
https://webhome.phy.duke.edu/~kolena/astroteach.html
Prof. Matilsky (Rutgers University) MOOC:
https://es.coursera.org/learn/analyze
31. 31
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Finding data to analyse
32. 32
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Finding data to analyse
33. 33
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Finding data to analyse
34. 34
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Finding data to analyse
35. 35
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Opening data to analyse
36. 36
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
37. 37
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
38. 38
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Energy spectrum from js9.si.edu
39. 39
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Analysing different areas in js9
40. 40
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Analysing different areas in js9
41. 41
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
42. 42
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
43. 43
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Measuring total area in imageJ
44. 44
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
X-Ray
From
Cassiopea A
45. 45
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Elements in Supernovae
https://webhome.phy.duke.edu/~kolena/strongxlines.html
https://webhome.phy.duke.edu/~kolena/snrspectra.html
46. 46
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Fe XVIII: 0.8 keV
Ne X:1.0 keV
Mg XI: 1.34keV
Si XIII: 1.83keV, 2.16 keV
S XV: 2.41 keV
Ar XVII: 3.08keV
Ca XIX: 3.84 keV
Fe XXV: 6.4-6.8 keV
Si XIII means 13 electrons removed from Silicium atom, moving from upper
level 2 to lower level 1 (1.83keV) and from level 13 to 1 (2.7keV)
47. 47
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
O VII: 0.557 keV
Ne IX: 0.922 keV
Ne X:1.0 keV
Mg XI: 1.34keV
Si XIII: 1.83keV
S XV: 2.41 keV
Ne X means Neon ionized 9 times (9 electrons removed), T= 3.200.000 K
48. 48
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing exoplanets from Kepler
Tools
Our python code is available from bit.do/lightkurve
49. 49
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing anisotropies from supernova
Tools
IMAGEJ and
SAOImageDS9
51. 51
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
52. 52
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
53. 53
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Tools
54. 54
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Analysing data from Chandra
Results from students
Some of my students’ websites:
https://juliaiglesis.neocities.org
https://bertadelvalle.neocities.org/
https://juliaarcas.neocities.org
https://marinamiras.neocities.org/
https://claudiaortiz.neocities.org/
https://ainhoafernandez.neocities.org/
https://claudiaortiz.neocities.org/
https://luciamelero.neocities.org/
https://lauraapolzan.neocities.org/
Some of my websites:
http://blocs.xtec.cat/tecno General blog
http://xtec.cat/~fperez5/index.html
https://pompeu.neocities.org Work in progress
55. 55
Erasmus+ 2019-2022 school project
“Touching the past to reach the future”
Ref: 2019-1-TR01-KA229-074244-1
High Schools from Martorell (Spain), Florence (Italy),
Trabzon (Turkey), Bodrum (Turkey),
Naoussa (Greece) and Prague (Czech Republic)
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
56. 56
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Erasmus+ research on herbal drugs
Objectives and tools
Create an interactive table containing the therapeutical uses and
composition of near 200 herbal drugs according to the European
Medicine Agency and European Pharmacopoiea
Create some powerpoint presentation and mobile apps using
MIT App Inventor
Create quiz, guess the word game, alphabet games,etc.
Study chemical products from plants used against COVID using
molecular docking: UCSF Chimera, swissdock and
deep learning library: DeepPurpose
Information available at our project website:
https://phytotherapy.neocities.org
57. 57
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Research on anti-COVID drugs
Objectives and tools
To know if some natural products from xuebijing injection are
bound to the main protease of coronavirus SARS-CoV-2 (7SI9)
To use UCSF ChimeraX to create the chemical structures of the
compounds from reference number (e.g. pubchem CID)
and to fetch the protein 7SI9 from protein data bank server
Use swissdock.ch/docking to perform the docking and
measure binding energies with UCSF Chimera
Use bit.do/DeepPurpose to find activity using Deep Learning
Compare with literature research in a scientific poster
58. 58
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Research on anti-COVID drugs
Objectives and tools
To know if some natural products from xuebijing injection are
bound to the main protease of coronavirus SARS-CoV-2 (7SI9)
To use UCSF ChimeraX to create the chemical structures of the
compounds from reference number (e.g. pubchem CID)
and to fetch the protein 7SI9 from protein data bank server
Use swissdock.ch/docking to perform the docking and
measure binding energies with UCSF Chimera
Use bit.do/DeepPurpose to find activity using Deep Learning
Compare with literature research in a scientific poster
59. 59
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Find possible antiCOVID compounds
Xuebijing
60. 60
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Find possible anti-COVID compounds
HPLC Xuebijing
61. 61
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Molecular docking
Compounds to analyze
62. 62
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Molecular docking
Compounds to analyze
63. 63
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Molecular docking COVID-19
Domains
Main
protease
of coronavirus
SARS-CoV-2
64. 64
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Proteasa
65. 65
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Protein Data Bank
MAIN PROTEASE OF CORONAVIRUS BOUND TO NIRMATRELVIR DRUG
66. 66
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock
67. 67
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock
68. 68
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock
69. 69
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock
70. 70
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
71. 71
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
72. 72
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
73. 73
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
74. 74
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
75. 75
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
76. 76
Prof. Dr. Francisco Pérez García – Departament de Tecnologia – Institut Pompeu Fabra
Projecte de docking molecular
Swissdock CSV
78. 78
Favorites > Command line
labelopt resinfo %(name)s %(number)s
rlabel: 41,145
color hot pink :145
color red :41
El codi anterior pinta de color vermell la HSE 41
(histidina del centre actiu amb un nitrògen
protonat) i de color vermell la CYS 145 (cisteina
145) i escriu el seu nom
Department of Pharmacology and Experimental Therapeutics - School of Pharmacy