Python Programming for Biology: Bioinformatics and Beyond


Implementing a data model



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

Implementing a data model

Once you have designed a data model, you can implement it in terms of code. Things are

not necessarily fixed, however; in practice it is very common to modify a data model and

the  corresponding  code  in  a  continuous  process  of  improvement  and  adaptation.  It  is

somewhat unusual to get the model ‘correct’ the first time around. Also, it is also almost

inevitable that more functionality is added over time, and this often requires a change to

the data model.

We  have  stated  that  we  will  use  a  data  model  to  allow  an  ensemble  of  different

conformations for the same molecule. There are various ways that this aspect of the model

could be implemented, but there are two appealing choices. We could have Python classes

that describe the molecular composition once and have multiple sets of coordinates which

emanate  from  this  reference;  each  atom  would  have  alternative  coordinates  for  the

different  conformations.  Alternatively,  we  could  have  multiple  descriptions  of  the

molecular composition, each of which holds a single set of coordinates. Here we choose

the  second  option,  and  although  this  approach  has  advantages  and  disadvantages,  it  is

mostly chosen here in view of coding simplicity.

Our  molecular  structure  data  model  will  have  a  top  class  called  Structure,  which  will

group  all  the  objects  belonging  to  other  classes.  There  will  be  three  additional  classes:

Chain,  Residue  and  Atom,  and  the  overall  hierarchy  is  illustrated  in

Figure  8.1

.  The

Chain


2

 class  will  represent  one  polymer  molecule.  The  class  called  Residue

3

 will  model



the individual chemical compounds or residues that have been linked together into a chain

to form the molecule; for proteins these will be amino acids and for DNA and RNA these

will  be  nucleotides.  Lastly,  the  Atom  class  will,  somewhat  unsurprisingly,  represent  the

atoms  that  are  found  in  the  linked  chemical  components.  The  Atom  class  will  contain  a

single  set  of  three-dimensional  coordinates  for  that  atom.  The  classes  in  our  data  model

will be linked together to form a containment hierarchy; structures contain chains, chains

contain  residues  and  residues  contain  atoms,  thus  going  from  the  largest  entity  and

subdividing it into progressively smaller, but still meaningful, parts.





Download 7,75 Mb.

Do'stlaringiz bilan baham:
1   ...   97   98   99   100   101   102   103   104   ...   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