Python Programming for Biology: Bioinformatics and Beyond


Object data modelling



Download 7,75 Mb.
Pdf ko'rish
bet99/514
Sana30.12.2021
Hajmi7,75 Mb.
#91066
1   ...   95   96   97   98   99   100   101   102   ...   514
Bog'liq
[Tim J. Stevens, Wayne Boucher] Python Programming

8

Object data modelling

Contents

Data models

Designing a molecular structure data model

Implementing a data model

Structure

Chain


Residue and atom

Populating the model: reading PDB files

Refined implementation

Getter and setter functions

Properties

Data models

This  chapter  delves  more  deeply  into  the  topic  of  creating  custom  Python  objects  using

class definitions. Given that we have discussed the basics of object-oriented programming

in


Chapter  7

,  we  now  move  on  to  illustrate  how  such  mechanisms  can  be  used  in  a

practical, scientific sense. If you are interested in only a light introduction to Python, you

might  consider  skipping  this  chapter  on  a  first  reading.  However,  the  objects  we  discuss

here will underpin many of the examples given later on in this book, in

Chapters 15

 and

20

, so you may like to look back to see how such things are constructed.



In  the  previous  chapter  we  saw  how  to  introduce  our  own  types  of  data  object  into

Python, using classes. Here we move on to look at how to use a number of different, but

connected, classes to construct what is often known as a data model. A data model is an

abstract description of concepts that can be used to build a computational version of some

topic or real-world situation that you are interested in. Essentially, you examine the kind

of information you wish to describe and divide it up into conceptual parcels. Each of these

will  become  one  kind  of  computer  object  (a  class  with  attributes,  functions  and  links  to

other classes), which then allows you to create a synthetic analogue of the thing you are

interested in. Virtually all programs, irrespective of size, rely on some kind of underlying

model  to  organise  data,  although  this  may  not  use  object-oriented  programming  and  is

often not formalised in any way. No data model can be expected to be a perfect computer

representation of what it describes, but the idea is to make it good enough to serve a useful

purpose, by having some of the properties of the things being modelled.




Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   95   96   97   98   99   100   101   102   ...   514




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish