Гомологичное моделирование комплекса белка с лигандом

Цель занятия - ознакомиться с возможностями гомологичного моделирования комплекса белка с лигандом. В этом занятии мы будем пользоваться пакетом Modeller. Это программное обеспечение распространяется бесплатно для академических пользователей. Используя известную структуру лизоцима форели как образец, построим модель комплекса белка лизоцима дальневосточной жабы LYS_BUFAN с лигандом. Скачаем заготовку из PDB и последовательность выбранного белка.

In [2]:
import sys 
sys.path.append('/usr/lib/modeller9v7/modlib/')
sys.path.append('/usr/lib/modeller9v7/lib/x86_64-intel8/python2.5/')
import modeller 
import _modeller
import modeller.automodel 
In [4]:
env=modeller.environ()
env.io.hetatm=True
In [8]:
! wget http://www.pdb.org/pdb/files/1lmp.pdb
--2017-04-21 15:59:56--  http://www.pdb.org/pdb/files/1lmp.pdb
Resolving www.pdb.org... 132.249.231.77
Connecting to www.pdb.org|132.249.231.77|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://www.rcsb.org/pdb/files/1lmp.pdb [following]
--2017-04-21 15:59:57--  http://www.rcsb.org/pdb/files/1lmp.pdb
Resolving www.rcsb.org... 132.249.231.10
Connecting to www.rcsb.org|132.249.231.10|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://files.rcsb.org/view/1lmp.pdb [following]
--2017-04-21 15:59:57--  http://files.rcsb.org/view/1lmp.pdb
Resolving files.rcsb.org... 132.249.213.140
Connecting to files.rcsb.org|132.249.213.140|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/plain]
Saving to: `1lmp.pdb.2'

    [     <=>                               ] 131,301      160K/s   in 0.8s    

2017-04-21 15:59:58 (160 KB/s) - `1lmp.pdb.2' saved [131301]

In [9]:
! wget http://www.uniprot.org/uniprot/LYS_BUFAN.fasta
--2017-04-21 16:01:48--  http://www.uniprot.org/uniprot/LYS_BUFAN.fasta
Resolving www.uniprot.org... 128.175.240.211, 193.62.193.81
Connecting to www.uniprot.org|128.175.240.211|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: /uniprot/P85045.fasta [following]
--2017-04-21 16:01:48--  http://www.uniprot.org/uniprot/P85045.fasta
Reusing existing connection to www.uniprot.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 231 [text/plain]
Saving to: `P85045.fasta'

100%[======================================>] 231         --.-K/s   in 0s      

2017-04-21 16:01:48 (23.0 MB/s) - `P85045.fasta' saved [231/231]

Построим выравнивание последовательностей лизоцима форели и жабы:

In [43]:
alignm=modeller.alignment(env)
In [44]:
alignm.append(file='P85045.fasta', align_codes='all',alignment_format='FASTA')
## создадим модель
mdl = modeller.model(env, file='1lmp.pdb', model_segment=('FIRST:'+'A', 'LAST:'+'A'))
## и добавим в выравнивание
alignm.append_model(mdl, atom_files='1lmp.pdb', align_codes='1lmp')
## есть смысл поправить идентификаторы, это будет в дальнейшем в названии файлов
alignm[0].code = 'P85045'
In [25]:
alignm.salign()
alignm.write(file='all_in_one.ali', alignment_format='PIR')
SALIGN_____> adding the next group to the alignment; iteration    1

Построим модель:

In [26]:
## Выбираем объект для моделирования 
s = alignm[0]
pdb = alignm[1]

print s.code, pdb.code

## Создаем объект automodel
a = modeller.automodel.automodel(env, alnfile='all_in_one.ali', knowns= pdb.code, sequence = s.code )

a.name='mod'+s.code
a.starting_model = 1
a.ending_model = 2
a.make()
P85045 1lmp
automodel__W> Topology and/or parameter libraries already in memory. These will
                be used instead of the automodel defaults. If this is not what you
                want, clear them before creating the automodel object with
                env.libs.topology.clear() and env.libs.parameters.clear()
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)

check_ali___> Checking the sequence-structure alignment. 

Implied target CA(i)-CA(i+1) distances longer than  8.0 angstroms:

ALN_POS  TMPL  RID1  RID2  NAM1  NAM2     DIST
----------------------------------------------
END OF TABLE

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     +N
              atom indices         :  1164     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     CA    +N    O
              atom indices         :  1164  1159     0  1165
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
patch_s_522_> Number of disulfides patched in MODEL:        4
mdtrsr__446W> A potential that relies on one protein is used, yet you have at
              least one known structure available. MDT, not library, potential is used.
iup2crm_280W> No topology library in memory or assigning a BLK residue.
              Default CHARMM atom type assigned:  C1 -->  CT2
              This message is written only for the first such atom.
0 atoms in HETATM residues constrained
to protein atoms within 2.30 angstroms
and protein CA atoms within 10.00 angstroms
0 atoms in residues without defined topology
constrained to be rigid bodies
condens_443_> Restraints marked for deletion were removed.
              Total number of restraints before, now:    13044    12008
iupac_m_397W> Atoms were not swapped because of the uncertainty of how to handle the H atom.


>> ENERGY; Differences between the model's features and restraints:
Number of all residues in MODEL                   :      146
Number of all, selected real atoms                :     1166    1166
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    12008   12008
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2321
Dynamic pairs routine                             : 2, NATM x NATM cell sorting
Atomic shift for contacts update (UPDATE_DYNAMIC) :    0.390
LENNARD_JONES_SWITCH                              :    6.500   7.500
COULOMB_JONES_SWITCH                              :    6.500   7.500
RESIDUE_SPAN_RANGE                                :        0   99999
NLOGN_USE                                         :       15
CONTACT_SHELL                                     :    4.000
DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER :        T       T       F       F       F
SPHERE_STDV                                       :    0.050
RADII_FACTOR                                      :    0.820
Current energy                                    :         858.3019





Summary of the restraint violations: 

   NUM     ... number of restraints.
   NUMVI   ... number of restraints with RVIOL > VIOL_REPORT_CUT[i].
   RVIOL   ... relative difference from the best value.
   NUMVP   ... number of restraints with -Ln(pdf) > VIOL_REPORT_CUT2[i].
   RMS_1   ... RMS(feature, minimally_violated_basis_restraint, NUMB).
   RMS_2   ... RMS(feature, best_value, NUMB).
   MOL.PDF ... scaled contribution to -Ln(Molecular pdf).

 #                     RESTRAINT_GROUP      NUM   NUMVI  NUMVP   RMS_1   RMS_2         MOL.PDF     S_i
------------------------------------------------------------------------------------------------------
 1 Bond length potential              :    1197       0      0   0.006   0.006      11.523       1.000
 2 Bond angle potential               :    1618       0      7   2.212   2.212      155.27       1.000
 3 Stereochemical cosine torsion poten:     814       0     28  47.325  47.325      275.94       1.000
 4 Stereochemical improper torsion pot:     502       0      0   1.200   1.200      17.155       1.000
 5 Soft-sphere overlap restraints     :    2321       0      0   0.002   0.002     0.65122       1.000
 6 Lennard-Jones 6-12 potential       :       0       0      0   0.000   0.000      0.0000       1.000
 7 Coulomb point-point electrostatic p:       0       0      0   0.000   0.000      0.0000       1.000
 8 H-bonding potential                :       0       0      0   0.000   0.000      0.0000       1.000
 9 Distance restraints 1 (CA-CA)      :    2405       0      0   0.128   0.128      37.057       1.000
10 Distance restraints 2 (N-O)        :    2564       0      3   0.181   0.181      85.178       1.000
11 Mainchain Phi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
12 Mainchain Psi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
13 Mainchain Omega dihedral restraints:     145       0      3   4.627   4.627      36.614       1.000
14 Sidechain Chi_1 dihedral restraints:     126       0      1  66.549  66.549      19.757       1.000
15 Sidechain Chi_2 dihedral restraints:      93       0      0  70.362  70.362      33.787       1.000
16 Sidechain Chi_3 dihedral restraints:      37       0      0  79.567  79.567      23.557       1.000
17 Sidechain Chi_4 dihedral restraints:      21       0      0  78.775  78.775      13.961       1.000
18 Disulfide distance restraints      :       4       0      0   0.009   0.009     0.50379E-01   1.000
19 Disulfide angle restraints         :       8       0      0   1.714   1.714     0.51906       1.000
20 Disulfide dihedral angle restraints:       4       0      0  31.405  31.405      3.4443       1.000
21 Lower bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
22 Upper bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
23 Distance restraints 3 (SDCH-MNCH)  :    1582       0      0   0.467   0.467      47.536       1.000
24 Sidechain Chi_5 dihedral restraints:       0       0      0   0.000   0.000      0.0000       1.000
25 Phi/Psi pair of dihedral restraints:     144      16     13  20.695  58.989      27.991       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     744       0      0   0.750   0.750      68.305       1.000
27 Distance restraints 5 (X-Y)        :       0       0      0   0.000   0.000      0.0000       1.000
28 NMR distance restraints 6 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
29 NMR distance restraints 7 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
30 Minimal distance restraints        :       0       0      0   0.000   0.000      0.0000       1.000
31 Non-bonded restraints              :       0       0      0   0.000   0.000      0.0000       1.000
32 Atomic accessibility restraints    :       0       0      0   0.000   0.000      0.0000       1.000
33 Atomic density restraints          :       0       0      0   0.000   0.000      0.0000       1.000
34 Absolute position restraints       :       0       0      0   0.000   0.000      0.0000       1.000
35 Dihedral angle difference restraint:       0       0      0   0.000   0.000      0.0000       1.000
36 GBSA implicit solvent potential    :       0       0      0   0.000   0.000      0.0000       1.000
37 EM density fitting potential       :       0       0      0   0.000   0.000      0.0000       1.000
38 SAXS restraints                    :       0       0      0   0.000   0.000      0.0000       1.000
39 Symmetry restraints                :       0       0      0   0.000   0.000      0.0000       1.000



# Heavy relative violation of each residue is written to: P85045.V99990001
# The profile is NOT normalized by the number of restraints.
# The profiles are smoothed over a window of residues:    1
# The sum of all numbers in the file:   14591.1025



List of the violated restraints:
   A restraint is violated when the relative difference
   from the best value (RVIOL) is larger than CUTOFF.

   ICSR   ... index of a restraint in the current set.
   RESNO  ... residue numbers of the first two atoms.
   ATM    ... IUPAC atom names of the first two atoms.
   FEAT   ... the value of the feature in the model.
   restr  ... the mean of the basis restraint with the smallest
              difference from the model (local minimum).
   viol   ... difference from the local minimum.
   rviol  ... relative difference from the local minimum.
   RESTR  ... the best value (global minimum).
   VIOL   ... difference from the best value.
   RVIOL  ... relative difference from the best value.


-------------------------------------------------------------------------------------------------

Feature 25                           : Phi/Psi pair of dihedral restraints     
List of the RVIOL violations larger than   :       6.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   4148   1S   2G C   N       5    7 -145.44 -167.20   36.17    0.94   82.20 -169.36   14.57
    1          2G   2G N   CA      7    8  145.70  174.60                    8.50
    2   4149   2G   3K C   N       9   11 -102.04 -118.00   31.19    1.23  -62.90  158.03   18.75
    2          3K   3K N   CA     11   12  112.30  139.10                  -40.80
    3   4150   3K   4Y C   N      18   20 -120.43 -124.30    6.28    0.26  -63.50 -177.06   26.39
    3          4Y   4Y N   CA     20   21  130.45  135.40                  -43.40
    4   4152   5I   6S C   N      38   40 -123.74 -136.60   15.01    0.79  -64.10  176.43   16.98
    4          6S   6S N   CA     40   41  158.95  151.20                  -35.00
    5   4153   6S   7W C   N      44   46  -73.46  -71.30   11.34    0.80  -63.00  166.00   21.40
    5          7W   7W N   CA     46   47  150.13  139.00                  -44.20
    6   4154   7W   8E C   N      58   60 -104.10 -117.80   18.91    0.60  -63.60  168.99   20.58
    6          8E   8E N   CA     60   61  123.77  136.80                  -40.30
    7   4155   8E   9D C   N      67   69 -122.33  -96.50   40.49    1.67  -63.30  136.45   14.50
    7          9D   9D N   CA     69   70   83.03  114.20                  -40.00
    8   4156   9D  10S C   N      75   77 -109.99 -136.60   27.32    0.93  -64.10 -174.26   11.57
    8         10S  10S N   CA     77   78  144.98  151.20                  -35.00
    9   4159  12S  13Y C   N      93   95  -66.75  -98.40   32.35    1.34  -63.50  178.54   28.16
    9         13Y  13Y N   CA     95   96  135.10  128.40                  -43.40
   10   4160  13Y  14L C   N     105  107  -71.26  -70.70   10.67    0.79  -63.50  166.72   23.60
   10         14L  14L N   CA    107  108  152.26  141.60                  -41.20
   11   4162  15Q  16L C   N     122  124  -71.85  -70.70    1.79    0.18  -63.50  178.76   25.31
   11         16L  16L N   CA    124  125  140.23  141.60                  -41.20
   12   4163  16L  17Q C   N     130  132 -118.04 -121.10   14.46    0.63  -63.80  174.51   23.20
   12         17Q  17Q N   CA    132  133  125.57  139.70                  -40.30
   13   4198  51E  52S C   N     414  416 -137.70  -64.10   81.56    8.56  -64.10   81.56    8.56
   13         52S  52S N   CA    416  417    0.16  -35.00                  -35.00
   14   4210  63P  64P C   N     504  506  -75.49  -58.70   17.64    1.90  -64.50  172.63   13.47
   14         64P  64P N   CA    506  507  -25.08  -30.50                  147.20
   15   4279 132C 133K C   N    1054 1056  -51.61  -62.90   28.44    3.28  -70.20  153.83   11.57
   15        133K 133K N   CA   1056 1057  -66.90  -40.80                  140.40
   16   4280 133K 134G C   N    1063 1065  -75.00  -62.40   15.35    2.28   82.20  162.45   12.12
   16        134G 134G N   CA   1065 1066  -32.45  -41.20                    8.50


report______> Distribution of short non-bonded contacts:


DISTANCE1:  0.00 2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40
DISTANCE2:  2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40 3.50
FREQUENCY:     0    0    0    0    0    7    5   40   66  121  114  135  154  167  190


<< end of ENERGY.
iupac_m_397W> Atoms were not swapped because of the uncertainty of how to handle the H atom.


>> ENERGY; Differences between the model's features and restraints:
Number of all residues in MODEL                   :      146
Number of all, selected real atoms                :     1166    1166
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    12008   12008
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2416
Dynamic pairs routine                             : 2, NATM x NATM cell sorting
Atomic shift for contacts update (UPDATE_DYNAMIC) :    0.390
LENNARD_JONES_SWITCH                              :    6.500   7.500
COULOMB_JONES_SWITCH                              :    6.500   7.500
RESIDUE_SPAN_RANGE                                :        0   99999
NLOGN_USE                                         :       15
CONTACT_SHELL                                     :    4.000
DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER :        T       T       F       F       F
SPHERE_STDV                                       :    0.050
RADII_FACTOR                                      :    0.820
Current energy                                    :         785.2393





Summary of the restraint violations: 

   NUM     ... number of restraints.
   NUMVI   ... number of restraints with RVIOL > VIOL_REPORT_CUT[i].
   RVIOL   ... relative difference from the best value.
   NUMVP   ... number of restraints with -Ln(pdf) > VIOL_REPORT_CUT2[i].
   RMS_1   ... RMS(feature, minimally_violated_basis_restraint, NUMB).
   RMS_2   ... RMS(feature, best_value, NUMB).
   MOL.PDF ... scaled contribution to -Ln(Molecular pdf).

 #                     RESTRAINT_GROUP      NUM   NUMVI  NUMVP   RMS_1   RMS_2         MOL.PDF     S_i
------------------------------------------------------------------------------------------------------
 1 Bond length potential              :    1197       0      0   0.006   0.006      11.297       1.000
 2 Bond angle potential               :    1618       0      6   2.082   2.082      140.40       1.000
 3 Stereochemical cosine torsion poten:     814       0     30  47.211  47.211      281.54       1.000
 4 Stereochemical improper torsion pot:     502       0      0   1.212   1.212      17.209       1.000
 5 Soft-sphere overlap restraints     :    2416       0      0   0.001   0.001     0.50072       1.000
 6 Lennard-Jones 6-12 potential       :       0       0      0   0.000   0.000      0.0000       1.000
 7 Coulomb point-point electrostatic p:       0       0      0   0.000   0.000      0.0000       1.000
 8 H-bonding potential                :       0       0      0   0.000   0.000      0.0000       1.000
 9 Distance restraints 1 (CA-CA)      :    2405       0      0   0.123   0.123      33.800       1.000
10 Distance restraints 2 (N-O)        :    2564       0      0   0.161   0.161      69.693       1.000
11 Mainchain Phi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
12 Mainchain Psi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
13 Mainchain Omega dihedral restraints:     145       0      2   4.243   4.243      30.783       1.000
14 Sidechain Chi_1 dihedral restraints:     126       0      0  63.073  63.073      14.516       1.000
15 Sidechain Chi_2 dihedral restraints:      93       0      0  71.196  71.196      36.508       1.000
16 Sidechain Chi_3 dihedral restraints:      37       0      0  78.144  78.144      25.899       1.000
17 Sidechain Chi_4 dihedral restraints:      21       0      0  77.065  77.065      14.328       1.000
18 Disulfide distance restraints      :       4       0      0   0.008   0.008     0.41944E-01   1.000
19 Disulfide angle restraints         :       8       0      0   1.838   1.838     0.59700       1.000
20 Disulfide dihedral angle restraints:       4       0      0  29.519  29.519      3.3655       1.000
21 Lower bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
22 Upper bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
23 Distance restraints 3 (SDCH-MNCH)  :    1582       0      0   0.338   0.338      24.598       1.000
24 Sidechain Chi_5 dihedral restraints:       0       0      0   0.000   0.000      0.0000       1.000
25 Phi/Psi pair of dihedral restraints:     144      16     13  24.038  61.228      45.027       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     744       0      0   0.543   0.543      35.141       1.000
27 Distance restraints 5 (X-Y)        :       0       0      0   0.000   0.000      0.0000       1.000
28 NMR distance restraints 6 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
29 NMR distance restraints 7 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
30 Minimal distance restraints        :       0       0      0   0.000   0.000      0.0000       1.000
31 Non-bonded restraints              :       0       0      0   0.000   0.000      0.0000       1.000
32 Atomic accessibility restraints    :       0       0      0   0.000   0.000      0.0000       1.000
33 Atomic density restraints          :       0       0      0   0.000   0.000      0.0000       1.000
34 Absolute position restraints       :       0       0      0   0.000   0.000      0.0000       1.000
35 Dihedral angle difference restraint:       0       0      0   0.000   0.000      0.0000       1.000
36 GBSA implicit solvent potential    :       0       0      0   0.000   0.000      0.0000       1.000
37 EM density fitting potential       :       0       0      0   0.000   0.000      0.0000       1.000
38 SAXS restraints                    :       0       0      0   0.000   0.000      0.0000       1.000
39 Symmetry restraints                :       0       0      0   0.000   0.000      0.0000       1.000



# Heavy relative violation of each residue is written to: P85045.V99990002
# The profile is NOT normalized by the number of restraints.
# The profiles are smoothed over a window of residues:    1
# The sum of all numbers in the file:   14358.1240



List of the violated restraints:
   A restraint is violated when the relative difference
   from the best value (RVIOL) is larger than CUTOFF.

   ICSR   ... index of a restraint in the current set.
   RESNO  ... residue numbers of the first two atoms.
   ATM    ... IUPAC atom names of the first two atoms.
   FEAT   ... the value of the feature in the model.
   restr  ... the mean of the basis restraint with the smallest
              difference from the model (local minimum).
   viol   ... difference from the local minimum.
   rviol  ... relative difference from the local minimum.
   RESTR  ... the best value (global minimum).
   VIOL   ... difference from the best value.
   RVIOL  ... relative difference from the best value.


-------------------------------------------------------------------------------------------------

Feature 25                           : Phi/Psi pair of dihedral restraints     
List of the RVIOL violations larger than   :       6.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   4149   2G   3K C   N       9   11  -65.71  -70.20    5.84    0.49  -62.90  175.09   22.89
    1          3K   3K N   CA     11   12  144.13  140.40                  -40.80
    2   4150   3K   4Y C   N      18   20  -71.95  -98.40   26.59    1.03  -63.50  174.81   27.31
    2          4Y   4Y N   CA     20   21  131.21  128.40                  -43.40
    3   4152   5I   6S C   N      38   40 -147.84 -136.60   21.52    0.80  -64.10  176.57   18.81
    3          6S   6S N   CA     40   41  169.55  151.20                  -35.00
    4   4153   6S   7W C   N      44   46  -64.89  -71.30   16.88    1.10  -63.00  167.59   20.84
    4          7W   7W N   CA     46   47  123.38  139.00                  -44.20
    5   4154   7W   8E C   N      58   60 -126.80 -117.80    9.06    0.31  -63.60 -170.98   22.39
    5          8E   8E N   CA     60   61  137.84  136.80                  -40.30
    6   4156   9D  10S C   N      75   77 -127.64 -136.60   11.71    0.37  -64.10 -170.38   11.68
    6         10S  10S N   CA     77   78  143.66  151.20                  -35.00
    7   4158  11C  12S C   N      87   89 -125.13 -136.60   13.35    0.70  -64.10  177.76   17.18
    7         12S  12S N   CA     89   90  158.04  151.20                  -35.00
    8   4159  12S  13Y C   N      93   95 -115.28 -124.30   10.01    0.58  -63.50 -178.02   26.44
    8         13Y  13Y N   CA     95   96  131.06  135.40                  -43.40
    9   4160  13Y  14L C   N     105  107 -120.89 -108.50   12.39    0.59  -63.50 -176.88   22.86
    9         14L  14L N   CA    107  108  132.69  132.50                  -41.20
   10   4161  14L  15Q C   N     113  115 -136.54 -121.10   25.01    0.86  -63.80  176.05   29.70
   10         15Q  15Q N   CA    115  116  159.38  139.70                  -40.30
   11   4162  15Q  16L C   N     122  124 -110.82 -108.50   60.53    3.25  -63.50  134.41   21.59
   11         16L  16L N   CA    124  125 -167.01  132.50                  -41.20
   12   4163  16L  17Q C   N     130  132  -74.09  -73.00   15.51    1.04  -63.80  165.85   23.86
   12         17Q  17Q N   CA    132  133  125.23  140.70                  -40.30
   13   4198  51E  52S C   N     414  416 -137.53  -64.10   81.39    8.55  -64.10   81.39    8.55
   13         52S  52S N   CA    416  417    0.09  -35.00                  -35.00
   14   4210  63P  64P C   N     504  506  -60.58  -58.70    7.21    0.75  -64.50  175.38   13.29
   14         64P  64P N   CA    506  507  -37.46  -30.50                  147.20
   15   4265 118D 119P C   N     942  944  -68.86  -64.50   31.70    2.60  -58.70  146.65   11.31
   15        119P 119P N   CA    944  945  115.80  147.20                  -30.50
   16   4266 119P 120N C   N     949  951  147.79  -63.20  149.02   22.65  -63.20  149.02   22.65
   16        120N 120N N   CA    951  952  -42.82  -41.10                  -41.10


report______> Distribution of short non-bonded contacts:


DISTANCE1:  0.00 2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40
DISTANCE2:  2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40 3.50
FREQUENCY:     0    0    0    0    0    6   10   44   72  115  105  131  172  172  178


<< end of ENERGY.

>> Summary of successfully produced models:
Filename                          molpdf
----------------------------------------
P85045.B99990001.pdb           858.30188
P85045.B99990002.pdb           785.23926

In [51]:
import nglview
import ipywidgets
w1 = nglview.show_structure_file('P85045.B99990001.pdb')
w1
In [38]:
## Получим список остатков последовательности
new_list = []
for smth in alignm[0].residues:
    new_list.append(smth.code)
for i in range(3): new_list.append('.') #для того чтобы взять из PDB файла лизоцима форели три последние компоненты, это лиганды
new_line =  ''.join(new_list) 
print new_line
SGKYISWEDSCSYLQLQKYERCELAKALKKGGLADFKGYSLENWICTAFHESGYNTASTNYNPPDKSTDYGIFQINSRWWCNDYKTPRSKNTCNIDCKVLLGDDISPAIKCAKRVVSDPNGMGAWVAWKKYCKGKNLSQWTQGCKL...
In [45]:
## Добавим в объект выравнивание последовательность из строки
alignm.append_sequence(new_line)
In [49]:
alignm.salign()
alignm.write(file='all_in_one.ali', alignment_format='PIR')
SALIGN_____> adding the next group to the alignment; iteration    1

SALIGN_____> adding the next group to the alignment; iteration    2
In [50]:
## Выбираем объект для моделирования 
new = alignm[2]
pdb = alignm[1]

new.code = 'new'
print s.code, pdb.code,new.code

## Создаем объект automodel
a = modeller.automodel.automodel(env, alnfile='all_in_one.ali', knowns= pdb.code, sequence = new.code )

a.name='mod'+s.code
a.starting_model = 1
a.ending_model = 2
a.make()
P85045 1lmp new
automodel__W> Topology and/or parameter libraries already in memory. These will
                be used instead of the automodel defaults. If this is not what you
                want, clear them before creating the automodel object with
                env.libs.topology.clear() and env.libs.parameters.clear()
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)

check_ali___> Checking the sequence-structure alignment. 

Implied target CA(i)-CA(i+1) distances longer than  8.0 angstroms:

ALN_POS  TMPL  RID1  RID2  NAM1  NAM2     DIST
----------------------------------------------
END OF TABLE

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     +N
              atom indices         :  1164     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     CA    +N    O
              atom indices         :  1164  1159     0  1165
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
patch_s_522_> Number of disulfides patched in MODEL:        4
mdtrsr__446W> A potential that relies on one protein is used, yet you have at
              least one known structure available. MDT, not library, potential is used.
iup2crm_280W> No topology library in memory or assigning a BLK residue.
              Default CHARMM atom type assigned:  C1 -->  CT2
              This message is written only for the first such atom.
43 atoms in HETATM residues constrained
to protein atoms within 2.30 angstroms
and protein CA atoms within 10.00 angstroms
43 atoms in residues without defined topology
constrained to be rigid bodies
condens_443_> Restraints marked for deletion were removed.
              Total number of restraints before, now:    14445    13409
read_pd_403W> Treating residue type  NAG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.
read_pd_403W> Treating residue type  NAG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.
read_pd_403W> Treating residue type  NDG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.
iupac_m_397W> Atoms were not swapped because of the uncertainty of how to handle the H atom.


>> ENERGY; Differences between the model's features and restraints:
Number of all residues in MODEL                   :      149
Number of all, selected real atoms                :     1209    1209
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    13409   13409
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2599
Dynamic pairs routine                             : 2, NATM x NATM cell sorting
Atomic shift for contacts update (UPDATE_DYNAMIC) :    0.390
LENNARD_JONES_SWITCH                              :    6.500   7.500
COULOMB_JONES_SWITCH                              :    6.500   7.500
RESIDUE_SPAN_RANGE                                :        0   99999
NLOGN_USE                                         :       15
CONTACT_SHELL                                     :    4.000
DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER :        T       T       F       F       F
SPHERE_STDV                                       :    0.050
RADII_FACTOR                                      :    0.820
Current energy                                    :         969.0060





Summary of the restraint violations: 

   NUM     ... number of restraints.
   NUMVI   ... number of restraints with RVIOL > VIOL_REPORT_CUT[i].
   RVIOL   ... relative difference from the best value.
   NUMVP   ... number of restraints with -Ln(pdf) > VIOL_REPORT_CUT2[i].
   RMS_1   ... RMS(feature, minimally_violated_basis_restraint, NUMB).
   RMS_2   ... RMS(feature, best_value, NUMB).
   MOL.PDF ... scaled contribution to -Ln(Molecular pdf).

 #                     RESTRAINT_GROUP      NUM   NUMVI  NUMVP   RMS_1   RMS_2         MOL.PDF     S_i
------------------------------------------------------------------------------------------------------
 1 Bond length potential              :    1197       0      0   0.006   0.006      12.273       1.000
 2 Bond angle potential               :    1618       0     10   2.264   2.264      162.67       1.000
 3 Stereochemical cosine torsion poten:     814       0     30  47.154  47.154      279.56       1.000
 4 Stereochemical improper torsion pot:     502       0      0   1.283   1.283      19.695       1.000
 5 Soft-sphere overlap restraints     :    2599       1      2   0.007   0.007      14.675       1.000
 6 Lennard-Jones 6-12 potential       :       0       0      0   0.000   0.000      0.0000       1.000
 7 Coulomb point-point electrostatic p:       0       0      0   0.000   0.000      0.0000       1.000
 8 H-bonding potential                :       0       0      0   0.000   0.000      0.0000       1.000
 9 Distance restraints 1 (CA-CA)      :    2405       0      0   0.130   0.130      41.421       1.000
10 Distance restraints 2 (N-O)        :    2564       1      9   0.222   0.222      125.58       1.000
11 Mainchain Phi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
12 Mainchain Psi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
13 Mainchain Omega dihedral restraints:     145       0      3   4.732   4.732      38.287       1.000
14 Sidechain Chi_1 dihedral restraints:     126       0      0  69.971  69.971      25.813       1.000
15 Sidechain Chi_2 dihedral restraints:      93       0      1  74.817  74.817      35.850       1.000
16 Sidechain Chi_3 dihedral restraints:      37       0      0  71.814  71.814      24.115       1.000
17 Sidechain Chi_4 dihedral restraints:      21       0      0  88.784  88.784      15.781       1.000
18 Disulfide distance restraints      :       4       0      0   0.008   0.008     0.45310E-01   1.000
19 Disulfide angle restraints         :       8       0      0   1.508   1.508     0.40162       1.000
20 Disulfide dihedral angle restraints:       4       0      0  35.824  35.824      4.3226       1.000
21 Lower bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
22 Upper bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
23 Distance restraints 3 (SDCH-MNCH)  :    1582       0      0   0.424   0.424      46.151       1.000
24 Sidechain Chi_5 dihedral restraints:       0       0      0   0.000   0.000      0.0000       1.000
25 Phi/Psi pair of dihedral restraints:     144      18     15  21.963  64.140      49.894       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     744       0      1   0.682   0.682      57.136       1.000
27 Distance restraints 5 (X-Y)        :    1401       0      0   0.036   0.036      15.324       1.000
28 NMR distance restraints 6 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
29 NMR distance restraints 7 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
30 Minimal distance restraints        :       0       0      0   0.000   0.000      0.0000       1.000
31 Non-bonded restraints              :       0       0      0   0.000   0.000      0.0000       1.000
32 Atomic accessibility restraints    :       0       0      0   0.000   0.000      0.0000       1.000
33 Atomic density restraints          :       0       0      0   0.000   0.000      0.0000       1.000
34 Absolute position restraints       :       0       0      0   0.000   0.000      0.0000       1.000
35 Dihedral angle difference restraint:       0       0      0   0.000   0.000      0.0000       1.000
36 GBSA implicit solvent potential    :       0       0      0   0.000   0.000      0.0000       1.000
37 EM density fitting potential       :       0       0      0   0.000   0.000      0.0000       1.000
38 SAXS restraints                    :       0       0      0   0.000   0.000      0.0000       1.000
39 Symmetry restraints                :       0       0      0   0.000   0.000      0.0000       1.000



# Heavy relative violation of each residue is written to: new.V99990001
# The profile is NOT normalized by the number of restraints.
# The profiles are smoothed over a window of residues:    1
# The sum of all numbers in the file:   16123.2061



List of the violated restraints:
   A restraint is violated when the relative difference
   from the best value (RVIOL) is larger than CUTOFF.

   ICSR   ... index of a restraint in the current set.
   RESNO  ... residue numbers of the first two atoms.
   ATM    ... IUPAC atom names of the first two atoms.
   FEAT   ... the value of the feature in the model.
   restr  ... the mean of the basis restraint with the smallest
              difference from the model (local minimum).
   viol   ... difference from the local minimum.
   rviol  ... relative difference from the local minimum.
   RESTR  ... the best value (global minimum).
   VIOL   ... difference from the best value.
   RVIOL  ... relative difference from the best value.


-------------------------------------------------------------------------------------------------

Feature 10                           : Distance restraints 2 (N-O)             
List of the RVIOL violations larger than   :       4.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   8128  67S  87P N   O     530  712    8.56    6.49    2.07    4.55    6.49    2.07    4.55

-------------------------------------------------------------------------------------------------

Feature 25                           : Phi/Psi pair of dihedral restraints     
List of the RVIOL violations larger than   :       6.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   4149   2G   3K C   N       9   11  -70.86  -70.20   16.51    1.21  -62.90  164.89   20.99
    1          3K   3K N   CA     11   12  123.90  140.40                  -40.80
    2   4150   3K   4Y C   N      18   20 -133.49 -124.30   14.74    0.61  -63.50 -176.45   32.61
    2          4Y   4Y N   CA     20   21  146.92  135.40                  -43.40
    3   4152   5I   6S C   N      38   40  -81.68  -72.40    9.43    0.62  -64.10  171.83   13.57
    3          6S   6S N   CA     40   41  154.07  152.40                  -35.00
    4   4153   6S   7W C   N      44   46  -82.42  -71.30   14.73    0.86  -63.00  168.28   22.27
    4          7W   7W N   CA     46   47  148.65  139.00                  -44.20
    5   4154   7W   8E C   N      58   60 -115.91 -117.80    5.08    0.28  -63.60 -174.30   27.72
    5          8E   8E N   CA     60   61  141.51  136.80                  -40.30
    6   4155   8E   9D C   N      67   69  -79.93  -96.50   24.42    1.02  -63.30  137.27   16.00
    6          9D   9D N   CA     69   70   96.26  114.20                  -40.00
    7   4156   9D  10S C   N      75   77 -164.69 -136.60   47.09    1.65  -64.10  169.16   19.52
    7         10S  10S N   CA     77   78 -171.01  151.20                  -35.00
    8   4158  11C  12S C   N      87   89  -63.26  -72.40   34.25    1.72  -64.10  154.40   11.24
    8         12S  12S N   CA     89   90  119.40  152.40                  -35.00
    9   4159  12S  13Y C   N      93   95  171.84 -124.30   67.82    5.58  -63.50 -160.33   27.55
    9         13Y  13Y N   CA     95   96  112.58  135.40                  -43.40
   10   4160  13Y  14L C   N     105  107 -143.45 -108.50   36.78    1.90  -63.50 -179.13   22.17
   10         14L  14L N   CA    107  108  121.04  132.50                  -41.20
   11   4161  14L  15Q C   N     113  115 -160.00 -121.10   46.51    1.44  -63.80 -177.98   31.65
   11         15Q  15Q N   CA    115  116  165.18  139.70                  -40.30
   12   4162  15Q  16L C   N     122  124  -73.61  -70.70   15.31    1.05  -63.50  162.48   23.15
   12         16L  16L N   CA    124  125  156.63  141.60                  -41.20
   13   4163  16L  17Q C   N     130  132  -85.56  -73.00   36.70    2.65  -63.80  148.13   20.70
   13         17Q  17Q N   CA    132  133  106.22  140.70                  -40.30
   14   4210  63P  64P C   N     504  506  -79.23  -58.70   22.84    2.21  -64.50  168.34   13.35
   14         64P  64P N   CA    506  507  -20.50  -30.50                  147.20
   15   4233  86T  87P C   N     704  706  -46.16  -58.70   65.60    4.48  -64.50  119.33    9.90
   15         87P  87P N   CA    706  707  -94.88  -30.50                  147.20
   16   4234  87P  88R C   N     711  713  -96.14  -72.10   61.35    5.17   57.30  160.61   16.10
   16         88R  88R N   CA    713  714   85.46  141.90                   38.00
   17   4279 132C 133K C   N    1054 1056  -53.42  -62.90   23.51    2.71  -70.20  158.18   11.85
   17        133K 133K N   CA   1056 1057  -62.31  -40.80                  140.40
   18   4280 133K 134G C   N    1063 1065  -76.28  -62.40   16.36    2.47   82.20  163.71   12.20
   18        134G 134G N   CA   1065 1066  -32.54  -41.20                    8.50


report______> Distribution of short non-bonded contacts:


DISTANCE1:  0.00 2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40
DISTANCE2:  2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40 3.50
FREQUENCY:     0    0    0    0    0   10   10   60   69  126  127  133  196  187  216


<< end of ENERGY.
read_pd_403W> Treating residue type  NAG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.
read_pd_403W> Treating residue type  NAG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.
read_pd_403W> Treating residue type  NDG as a BLK (rigid body)
              even though topology information appears to be at least
              partially available. To treat this residue flexibly
              instead, remove the corresponding 'MODELLER BLK RESIDUE'
              REMARK from the input PDB file.


>> ENERGY; Differences between the model's features and restraints:
Number of all residues in MODEL                   :      149
Number of all, selected real atoms                :     1209    1209
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    13409   13409
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2685
Dynamic pairs routine                             : 2, NATM x NATM cell sorting
Atomic shift for contacts update (UPDATE_DYNAMIC) :    0.390
LENNARD_JONES_SWITCH                              :    6.500   7.500
COULOMB_JONES_SWITCH                              :    6.500   7.500
RESIDUE_SPAN_RANGE                                :        0   99999
NLOGN_USE                                         :       15
CONTACT_SHELL                                     :    4.000
DYNAMIC_PAIRS,_SPHERE,_COULOMB,_LENNARD,_MODELLER :        T       T       F       F       F
SPHERE_STDV                                       :    0.050
RADII_FACTOR                                      :    0.820
Current energy                                    :         884.0015





Summary of the restraint violations: 

   NUM     ... number of restraints.
   NUMVI   ... number of restraints with RVIOL > VIOL_REPORT_CUT[i].
   RVIOL   ... relative difference from the best value.
   NUMVP   ... number of restraints with -Ln(pdf) > VIOL_REPORT_CUT2[i].
   RMS_1   ... RMS(feature, minimally_violated_basis_restraint, NUMB).
   RMS_2   ... RMS(feature, best_value, NUMB).
   MOL.PDF ... scaled contribution to -Ln(Molecular pdf).

 #                     RESTRAINT_GROUP      NUM   NUMVI  NUMVP   RMS_1   RMS_2         MOL.PDF     S_i
------------------------------------------------------------------------------------------------------
 1 Bond length potential              :    1197       0      0   0.007   0.007      14.555       1.000
 2 Bond angle potential               :    1618       0      6   2.247   2.247      161.49       1.000
 3 Stereochemical cosine torsion poten:     814       0     27  47.045  47.045      281.24       1.000
 4 Stereochemical improper torsion pot:     502       0      0   1.343   1.343      20.558       1.000
 5 Soft-sphere overlap restraints     :    2685       1      2   0.007   0.007      15.483       1.000
 6 Lennard-Jones 6-12 potential       :       0       0      0   0.000   0.000      0.0000       1.000
 7 Coulomb point-point electrostatic p:       0       0      0   0.000   0.000      0.0000       1.000
 8 H-bonding potential                :       0       0      0   0.000   0.000      0.0000       1.000
 9 Distance restraints 1 (CA-CA)      :    2405       0      0   0.115   0.115      35.418       1.000
10 Distance restraints 2 (N-O)        :    2564       0      0   0.165   0.165      68.996       1.000
11 Mainchain Phi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
12 Mainchain Psi dihedral restraints  :       0       0      0   0.000   0.000      0.0000       1.000
13 Mainchain Omega dihedral restraints:     145       0      3   4.442   4.442      33.746       1.000
14 Sidechain Chi_1 dihedral restraints:     126       0      0  72.386  72.386      34.576       1.000
15 Sidechain Chi_2 dihedral restraints:      93       0      1  80.100  80.100      36.854       1.000
16 Sidechain Chi_3 dihedral restraints:      37       0      0  82.833  82.833      26.335       1.000
17 Sidechain Chi_4 dihedral restraints:      21       0      0  82.092  82.092      14.398       1.000
18 Disulfide distance restraints      :       4       0      0   0.010   0.010     0.73453E-01   1.000
19 Disulfide angle restraints         :       8       0      0   2.723   2.723      1.3097       1.000
20 Disulfide dihedral angle restraints:       4       0      0  28.948  28.948      2.9157       1.000
21 Lower bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
22 Upper bound distance restraints    :       0       0      0   0.000   0.000      0.0000       1.000
23 Distance restraints 3 (SDCH-MNCH)  :    1582       0      0   0.409   0.409      41.414       1.000
24 Sidechain Chi_5 dihedral restraints:       0       0      0   0.000   0.000      0.0000       1.000
25 Phi/Psi pair of dihedral restraints:     144      17     13  20.373  61.039      36.378       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     744       0      0   0.637   0.637      44.094       1.000
27 Distance restraints 5 (X-Y)        :    1401       0      0   0.034   0.034      14.167       1.000
28 NMR distance restraints 6 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
29 NMR distance restraints 7 (X-Y)    :       0       0      0   0.000   0.000      0.0000       1.000
30 Minimal distance restraints        :       0       0      0   0.000   0.000      0.0000       1.000
31 Non-bonded restraints              :       0       0      0   0.000   0.000      0.0000       1.000
32 Atomic accessibility restraints    :       0       0      0   0.000   0.000      0.0000       1.000
33 Atomic density restraints          :       0       0      0   0.000   0.000      0.0000       1.000
34 Absolute position restraints       :       0       0      0   0.000   0.000      0.0000       1.000
35 Dihedral angle difference restraint:       0       0      0   0.000   0.000      0.0000       1.000
36 GBSA implicit solvent potential    :       0       0      0   0.000   0.000      0.0000       1.000
37 EM density fitting potential       :       0       0      0   0.000   0.000      0.0000       1.000
38 SAXS restraints                    :       0       0      0   0.000   0.000      0.0000       1.000
39 Symmetry restraints                :       0       0      0   0.000   0.000      0.0000       1.000



# Heavy relative violation of each residue is written to: new.V99990002
# The profile is NOT normalized by the number of restraints.
# The profiles are smoothed over a window of residues:    1
# The sum of all numbers in the file:   16238.7637



List of the violated restraints:
   A restraint is violated when the relative difference
   from the best value (RVIOL) is larger than CUTOFF.

   ICSR   ... index of a restraint in the current set.
   RESNO  ... residue numbers of the first two atoms.
   ATM    ... IUPAC atom names of the first two atoms.
   FEAT   ... the value of the feature in the model.
   restr  ... the mean of the basis restraint with the smallest
              difference from the model (local minimum).
   viol   ... difference from the local minimum.
   rviol  ... relative difference from the local minimum.
   RESTR  ... the best value (global minimum).
   VIOL   ... difference from the best value.
   RVIOL  ... relative difference from the best value.


-------------------------------------------------------------------------------------------------

Feature 25                           : Phi/Psi pair of dihedral restraints     
List of the RVIOL violations larger than   :       6.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   4148   1S   2G C   N       5    7 -167.54 -167.20    4.84    0.19   82.20 -164.65   14.25
    1          2G   2G N   CA      7    8  169.77  174.60                    8.50
    2   4149   2G   3K C   N       9   11  -66.09  -70.20    4.12    0.31  -62.90  178.55   23.36
    2          3K   3K N   CA     11   12  140.68  140.40                  -40.80
    3   4150   3K   4Y C   N      18   20 -124.68 -124.30    5.95    0.30  -63.50 -174.37   32.54
    3          4Y   4Y N   CA     20   21  141.34  135.40                  -43.40
    4   4152   5I   6S C   N      38   40 -140.35 -136.60    4.41    0.13  -64.10 -172.33   19.03
    4          6S   6S N   CA     40   41  153.52  151.20                  -35.00
    5   4153   6S   7W C   N      44   46  -71.05  -71.30    6.26    0.47  -63.00  177.13   21.68
    5          7W   7W N   CA     46   47  132.75  139.00                  -44.20
    6   4154   7W   8E C   N      58   60 -105.85 -117.80   18.66    1.01  -63.60  173.78   25.56
    6          8E   8E N   CA     60   61  151.13  136.80                  -40.30
    7   4155   8E   9D C   N      67   69  -72.99  -70.90   11.05    0.45  -63.30  159.15   20.24
    7          9D   9D N   CA     69   70  161.15  150.30                  -40.00
    8   4156   9D  10S C   N      75   77  -60.30  -72.40   14.20    0.76  -64.10 -180.00   13.27
    8         10S  10S N   CA     77   78  144.96  152.40                  -35.00
    9   4158  11C  12S C   N      87   89  -85.18  -72.40   19.78    0.91  -64.10  158.89   12.88
    9         12S  12S N   CA     89   90  167.51  152.40                  -35.00
   10   4159  12S  13Y C   N      93   95  -91.81  -98.40    6.60    0.26  -63.50  173.84   26.18
   10         13Y  13Y N   CA     95   96  128.12  128.40                  -43.40
   11   4160  13Y  14L C   N     105  107  -89.07 -108.50   20.86    0.93  -63.50  168.07   22.00
   11         14L  14L N   CA    107  108  124.92  132.50                  -41.20
   12   4161  14L  15Q C   N     113  115 -135.22 -121.10   31.11    1.19  -63.80  168.19   28.46
   12         15Q  15Q N   CA    115  116  167.43  139.70                  -40.30
   13   4162  15Q  16L C   N     122  124 -106.75 -108.50    9.64    0.50  -63.50  169.82   21.51
   13         16L  16L N   CA    124  125  123.02  132.50                  -41.20
   14   4163  16L  17Q C   N     130  132 -145.18 -121.10   28.47    0.88  -63.80 -176.20   31.26
   14         17Q  17Q N   CA    132  133  154.90  139.70                  -40.30
   15   4198  51E  52S C   N     414  416 -138.92  -64.10   85.07    8.64  -64.10   85.07    8.64
   15         52S  52S N   CA    416  417    5.48  -35.00                  -35.00
   16   4209  62N  63P C   N     497  499  -67.70  -64.50   67.75    4.89  -58.70  114.98   10.24
   16         63P  63P N   CA    499  500 -145.13  147.20                  -30.50
   17   4210  63P  64P C   N     504  506  -57.47  -58.70   24.52    2.13  -64.50  153.36   11.08
   17         64P  64P N   CA    506  507   -6.00  -30.50                  147.20


report______> Distribution of short non-bonded contacts:


DISTANCE1:  0.00 2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40
DISTANCE2:  2.10 2.20 2.30 2.40 2.50 2.60 2.70 2.80 2.90 3.00 3.10 3.20 3.30 3.40 3.50
FREQUENCY:     0    0    0    0    0    4   12   45   83  130  135  167  159  211  205


<< end of ENERGY.

>> Summary of successfully produced models:
Filename                          molpdf
----------------------------------------
new.B99990001.pdb              969.00598
new.B99990002.pdb              884.00146

In [53]:
import nglview
import ipywidgets
w1 = nglview.show_structure_file('new.B99990001.pdb')
w1

Посмотрим на полученные структуры. Modeller выдал два варианта, они показаны розовым и голубым. Исходная структура лизоцима форели показана фиолетовым. В целом, модели похожи по расположению вторичной структуры, но не идентичны друг другу. У исходной структуры нет такого длинного хвоста.

In [1]:
import nglview
import ipywidgets
w1 = nglview.show_structure_file('new.B99990001.pdb')
w1
In [1]:
from IPython.display import Image
Image(filename='pr10.png')
Out[1]:

Попробуем присоединить лиганд в другое место. Так как лиганд с точки зрения Modeller - твердое тело, то достаточно указать 3 точки в пространстве, куда ему нужно присоединиться. Попробую присоединить на N-конец. Что-то он пока не работает. В процессе доработки. Номера атомов соответствуют PDB файлу.

In [64]:
class mymodel(modeller.automodel.automodel):
    def special_restraints(self, aln):
        rsr = self.restraints
        for ids in (('CA:1', 'O6:147'),
                    ('N:2', 'O6:148'),
                    ('CA:2', 'C1:149')):
                    atoms = [self.atoms[i] for i in ids]
#                    rsr.add(forms.upper_bound(group=physical.upper_distance,
#                    feature=features.distance(*atoms), mean=3.5, stdev=0.1)) 
a = mymodel(env, alnfile='all_in_one.ali', knowns= pdb.code, sequence = new.code)
a.make()
automodel__W> Topology and/or parameter libraries already in memory. These will
                be used instead of the automodel defaults. If this is not what you
                want, clear them before creating the automodel object with
                env.libs.topology.clear() and env.libs.parameters.clear()
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)

check_ali___> Checking the sequence-structure alignment. 

Implied target CA(i)-CA(i+1) distances longer than  8.0 angstroms:

ALN_POS  TMPL  RID1  RID2  NAM1  NAM2     DIST
----------------------------------------------
END OF TABLE

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     +N
              atom indices         :  1164     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:    10   146
              atom names           : C     CA    +N    O
              atom indices         :  1164  1159     0  1165
fndatmi_285W> Only      129 residues out of      132 contain atoms of type  CA
              (This is usually caused by non-standard residues, such
              as ligands, or by PDB files with missing atoms.)
patch_s_522_> Number of disulfides patched in MODEL:        4
mdtrsr__446W> A potential that relies on one protein is used, yet you have at
              least one known structure available. MDT, not library, potential is used.
iup2crm_280W> No topology library in memory or assigning a BLK residue.
              Default CHARMM atom type assigned:  C1 -->  CT2
              This message is written only for the first such atom.
43 atoms in HETATM residues constrained
to protein atoms within 2.30 angstroms
and protein CA atoms within 10.00 angstroms
43 atoms in residues without defined topology
constrained to be rigid bodies
indxatm_278E> No ":" in ATOM:RESID[:CHAINID] atom identifier:  C
---------------------------------------------------------------------------
ModellerError                             Traceback (most recent call last)
<ipython-input-64-19d6e6e80947> in <module>()
      7 #                    feature=features.distance(*atoms), mean=3.5, stdev=0.1))
      8 a = mymodel(env, alnfile='all_in_one.ali', knowns= pdb.code, sequence = new.code)
----> 9 a.make()

/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py in make(self, exit_stage)
     96 
     97         self.outputs = []
---> 98         self.homcsr(exit_stage)
     99         # Exit early?
    100         if exit_stage >= 1:

/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py in homcsr(self, exit_stage)
    433         # make and write the stereochemical, homology, and special restraints?
    434         if self.create_restraints:
--> 435             self.mkhomcsr(selection(self), aln)
    436             self.restraints.condense()
    437             self.restraints.write(self.csrfile)

/usr/lib/modeller9v7/modlib/modeller/automodel/automodel.py in mkhomcsr(self, atmsel, aln)
    521         # Special restraints have to be called last so that possible cis-proline
    522         # changes are reflected in the current restraints:
--> 523         self.special_restraints(aln)
    524 
    525     def distance_restraints(self, atmsel, aln):

<ipython-input-64-19d6e6e80947> in special_restraints(self, aln)
      3         rsr = self.restraints
      4         for ids in (('CA:1', 'O6:147')):
----> 5                     atoms = [self.atoms[i] for i in ids]
      6 #                    rsr.add(forms.upper_bound(group=physical.upper_distance,
      7 #                    feature=features.distance(*atoms), mean=3.5, stdev=0.1))

/usr/lib/modeller9v7/modlib/modeller/coordinates.py in __getitem__(self, indx)
    359     def __getitem__(self, indx):
    360         ret = modutil.handle_seq_indx(self, indx, self.mdl._indxatm,
--> 361                                       (self.offset, self.length, self.suffix))
    362         if isinstance(ret, int):
    363             return self.mdl._atom_class(self.mdl, ret + self.offset)

/usr/lib/modeller9v7/modlib/modeller/util/modutil.py in handle_seq_indx(seqtype, indx, lookup_func, lookup_args, require_inrange)
     17     elif lookup_func is not None:
     18         args = lookup_args + (indx,)
---> 19         int_indx = lookup_func(*args)
     20         if int_indx < 0:
     21             raise KeyError(indx)

/usr/lib/modeller9v7/modlib/modeller/coordinates.py in _indxatm(self, offset, length, suffix, indx)
    270         if isinstance(indx, str):
    271             func = _modeller.mod_coordinates_find_atom
--> 272             newindx = func(self.cdpt, self.seqpt, indx+suffix) - 1 - offset
    273             if newindx < 0 or (length is not None and newindx >= length):
    274                 raise KeyError("No such atom: %s" % indx)

ModellerError: indxatm_278E> No ":" in ATOM:RESID[:CHAINID] atom identifier:  C