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

In [13]:
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 [2]:
env=modeller.environ()
env.io.hetatm=True
                         MODELLER 9v7, 2009/06/12, r6923

     PROTEIN STRUCTURE MODELLING BY SATISFACTION OF SPATIAL RESTRAINTS


                     Copyright(c) 1989-2009 Andrej Sali
                            All Rights Reserved

                             Written by A. Sali
                               with help from
           B. Webb, M.S. Madhusudhan, M-Y. Shen, M.A. Marti-Renom,
                N. Eswar, F. Alber, M. Topf, B. Oliva, A. Fiser,
                    R. Sanchez, B. Yerkovich, A. Badretdinov,
                      F. Melo, J.P. Overington, E. Feyfant
                 University of California, San Francisco, USA
                    Rockefeller University, New York, USA
                      Harvard University, Cambridge, USA
                   Imperial Cancer Research Fund, London, UK
              Birkbeck College, University of London, London, UK


Kind, OS, HostName, Kernel, Processor: 4, Linux kodomo.fbb.msu.ru 3.8-2-amd64 x86_64
Date and time of compilation         : 2009/06/12 12:23:44
MODELLER executable type             : x86_64-intel8
Job starting time (YY/MM/DD HH:MM:SS): 2017/05/26 18:00:33

In [3]:
! wget http://www.pdb.org/pdb/files/1lmp.pdb
--2017-04-21 16:03:58--  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 16:03:59--  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 16:03:59--  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'

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

2017-04-21 16:04:01 (158 KB/s) - `1lmp.pdb' saved [131301]

In [3]:
! wget http://www.uniprot.org/uniprot/LYS_BOMMO.fasta
--2017-05-26 18:00:40--  http://www.uniprot.org/uniprot/LYS_BOMMO.fasta
Resolving www.uniprot.org... 193.62.193.81, 128.175.240.211
Connecting to www.uniprot.org|193.62.193.81|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://www.uniprot.org/uniprot/P48816.fasta [following]
--2017-05-26 18:00:41--  http://www.uniprot.org/uniprot/P48816.fasta
Reusing existing connection to www.uniprot.org:80.
HTTP request sent, awaiting response... 200 OK
Length: 195 [text/plain]
Saving to: `P48816.fasta'

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

2017-05-26 18:00:41 (15.2 MB/s) - `P48816.fasta' saved [195/195]

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

In [5]:
alignm=modeller.alignment(env)
In [6]:
alignm.append(file='LYZ_BOMMO.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 = 'LYZ_aln'
read_pd_459W> Residue type  NAG not recognized. 'automodel' model building
              will treat this residue as a rigid body.
              To use real parameters, add the residue type to ${LIB}/restyp.lib,
              its topology to ${LIB}/top_*.lib, and suitable forcefield
              parameters to ${LIB}/par.lib.
read_pd_459W> Residue type  NDG not recognized. 'automodel' model building
              will treat this residue as a rigid body.
              To use real parameters, add the residue type to ${LIB}/restyp.lib,
              its topology to ${LIB}/top_*.lib, and suitable forcefield
              parameters to ${LIB}/par.lib.
In [7]:
alignm.salign()
alignm.write(file='all_in_one.ali', alignment_format='PIR')
SALIGN_____> adding the next group to the alignment; iteration    1

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

In [8]:
## Выбираем объект для моделирования 
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()
LYZ_aln 1lmp
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
----------------------------------------------
     88     1   73    76      D     C    8.895
END OF TABLE
read_to_681_> topology.submodel read from topology file:        3

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     +N
              atom indices         :  1094     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     CA    +N    O
              atom indices         :  1094  1091     0  1095
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:        3
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:    11705    10745
iupac_m_397W> Atoms were not swapped because of the uncertainty of how to handle the H atom.
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                   :      137
Number of all, selected real atoms                :     1096    1096
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    10745   10745
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2205
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                                    :         896.4709





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              :    1119       0      1   0.008   0.008      23.204       1.000
 2 Bond angle potential               :    1504       1      7   2.046   2.046      128.04       1.000
 3 Stereochemical cosine torsion poten:     713       0     29  47.980  47.980      260.46       1.000
 4 Stereochemical improper torsion pot:     461       0      0   1.069   1.069      12.404       1.000
 5 Soft-sphere overlap restraints     :    2205       0      0   0.002   0.002      1.4087       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)      :    2215       0      2   0.311   0.311      97.192       1.000
10 Distance restraints 2 (N-O)        :    2371       0      6   0.337   0.337      126.70       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:     136       0      2   4.630   4.630      34.383       1.000
14 Sidechain Chi_1 dihedral restraints:     121       0      1  74.885  74.885      30.340       1.000
15 Sidechain Chi_2 dihedral restraints:      87       0      0  61.795  61.795      26.445       1.000
16 Sidechain Chi_3 dihedral restraints:      35       0      0  82.629  82.629      22.599       1.000
17 Sidechain Chi_4 dihedral restraints:      22       0      0  83.776  83.776      14.811       1.000
18 Disulfide distance restraints      :       3       0      0   0.023   0.023     0.27485       1.000
19 Disulfide angle restraints         :       6       0      0   2.710   2.710     0.97320       1.000
20 Disulfide dihedral angle restraints:       3       0      0  24.594  24.594      1.8101       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)  :    1316       0      0   0.343   0.343      25.894       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:     135      17     16  27.770  61.748      65.296       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     498       0      0   0.554   0.554      24.233       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: LYZ_aln.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:   14751.1201



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  2                           : Bond angle potential                    
List of the RVIOL violations larger than   :       4.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   2080  88D  88D N   CA    697  698  124.70  107.00   17.70    5.09  107.00   17.70    5.09

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

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   3810   1M   2Q C   N       7    9  -78.47  -73.00    9.95    0.75  -63.80  173.32   24.74
    1          2Q   2Q N   CA      9   10  132.39  140.70                  -40.30
    2   3811   2Q   3K C   N      16   18   58.01  -70.20  143.18   11.70  -62.90  166.91   20.47
    2          3K   3K N   CA     18   19 -155.87  140.40                  -40.80
    3   3812   3K   4L C   N      25   27  -66.84  -70.70   10.52    0.94  -63.50  167.44   23.44
    3          4L   4L N   CA     27   28  151.39  141.60                  -41.20
    4   3815   6I   7F C   N      49   51  -94.75  -71.40   25.98    2.12  -63.20  176.45   22.47
    4          7F   7F N   CA     51   52  129.30  140.70                  -44.30
    5   3816   7F   8A C   N      60   62 -167.81 -134.00   39.34    0.92  -62.50 -175.09   35.87
    5          8A   8A N   CA     62   63  167.11  147.00                  -40.90
    6   3817   8A   9L C   N      65   67 -104.36 -108.50   12.34    0.70  -63.50  179.39   27.41
    6          9L   9L N   CA     67   68  144.13  132.50                  -41.20
    7   3820  11V  12L C   N      87   89  -93.83  -70.70   28.14    1.93  -63.50  164.00   24.61
    7         12L  12L N   CA     89   90  157.63  141.60                  -41.20
    8   3823  14V  15G C   N     108  110 -115.17  -80.20   44.14    3.21   82.20 -146.28   16.58
    8         15G  15G N   CA    110  111  147.16  174.10                    8.50
    9   3824  15G  16S C   N     112  114 -144.03 -136.60   13.09    0.47  -64.10 -178.43   18.88
    9         16S  16S N   CA    114  115  161.97  151.20                  -35.00
   10   3844  35F  36E C   N     274  276   56.65   54.60    9.50    0.58  -63.60  140.89   24.25
   10         36E  36E N   CA    276  277   33.12   42.40                  -40.30
   11   3860  51S  52S C   N     411  413   64.51   56.90    9.51    0.68  -64.10  144.41   19.16
   11         52S  52S N   CA    413  414   30.69   36.40                  -35.00
   12   3896  87K  88D C   N     695  697  168.59  -96.50   96.43    3.93  -63.30 -172.33   20.93
   12         88D  88D N   CA    697  698   97.15  114.20                  -40.00
   13   3920 111I 112Y C   N     872  874  -34.49  -98.40   66.92    3.43  -63.50  154.70   26.04
   13        112Y 112Y N   CA    874  875  108.55  128.40                  -43.40
   14   3923 114R 115H C   N     904  906  -98.32 -125.60   66.86    1.97  -63.20  125.09   13.82
   14        115H 115H N   CA    906  907   77.76  138.80                  -42.30
   15   3924 115H 116R C   N     914  916  -59.15  -63.00   29.95    3.80 -125.20  162.62    8.89
   15        116R 116R N   CA    916  917  -70.80  -41.10                  140.60
   16   3934 125N 126H C   N    1010 1012 -120.69  -63.20   71.55    8.58  -63.20   71.55    8.58
   16        126H 126H N   CA   1012 1013    0.28  -42.30                  -42.30
   17   3935 126H 127C C   N    1020 1022 -121.38  -63.00   58.90    9.38  -63.00   58.90    9.38
   17        127C 127C N   CA   1022 1023  -33.26  -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   11   12   46   81  116  101  116  142  173  188


<< end of ENERGY.
iupac_m_397W> Atoms were not swapped because of the uncertainty of how to handle the H atom.
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                   :      137
Number of all, selected real atoms                :     1096    1096
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    10745   10745
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2221
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                                    :         895.6688





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              :    1119       0      1   0.008   0.008      22.826       1.000
 2 Bond angle potential               :    1504       1      7   2.089   2.089      133.64       1.000
 3 Stereochemical cosine torsion poten:     713       0     26  47.985  47.985      256.16       1.000
 4 Stereochemical improper torsion pot:     461       0      0   1.193   1.193      14.397       1.000
 5 Soft-sphere overlap restraints     :    2221       0      0   0.002   0.002      1.2234       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)      :    2215       0      3   0.306   0.306      98.584       1.000
10 Distance restraints 2 (N-O)        :    2371       0      8   0.346   0.346      139.39       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:     136       0      3   4.683   4.683      35.176       1.000
14 Sidechain Chi_1 dihedral restraints:     121       0      1  71.447  71.447      25.528       1.000
15 Sidechain Chi_2 dihedral restraints:      87       0      0  73.102  73.102      29.026       1.000
16 Sidechain Chi_3 dihedral restraints:      35       0      0  78.283  78.283      20.915       1.000
17 Sidechain Chi_4 dihedral restraints:      22       0      0  91.710  91.710      12.397       1.000
18 Disulfide distance restraints      :       3       0      0   0.026   0.026     0.35156       1.000
19 Disulfide angle restraints         :       6       0      0   2.561   2.561     0.86918       1.000
20 Disulfide dihedral angle restraints:       3       0      0  25.887  25.887      1.9748       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)  :    1316       0      0   0.288   0.288      18.707       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:     135      18     15  25.297  61.398      62.111       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     498       0      0   0.525   0.525      22.395       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: LYZ_aln.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:   14341.2100



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  2                           : Bond angle potential                    
List of the RVIOL violations larger than   :       4.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   2080  88D  88D N   CA    697  698  125.84  107.00   18.84    5.42  107.00   18.84    5.42

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

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   3810   1M   2Q C   N       7    9 -124.29 -121.10   20.60    0.92  -63.80  170.73   28.31
    1          2Q   2Q N   CA      9   10  160.05  139.70                  -40.30
    2   3812   3K   4L C   N      25   27  177.06 -108.50   74.64    3.49  -63.50 -144.67   26.52
    2          4L   4L N   CA     27   28  137.97  132.50                  -41.20
    3   3815   6I   7F C   N      49   51 -116.60 -124.20   19.24    0.69  -63.20  178.12   21.49
    3          7F   7F N   CA     51   52  125.63  143.30                  -44.30
    4   3816   7F   8A C   N      60   62 -156.34 -134.00   23.07    0.58  -62.50 -168.97   36.32
    4          8A   8A N   CA     62   63  152.72  147.00                  -40.90
    5   3817   8A   9L C   N      65   67 -115.14 -108.50    6.79    0.31  -63.50 -177.42   22.96
    5          9L   9L N   CA     67   68  133.92  132.50                  -41.20
    6   3823  14V  15G C   N     108  110  -73.94  -80.20   14.72    0.34   82.20 -141.90    6.92
    6         15G  15G N   CA    110  111  160.77  174.10                    8.50
    7   3824  15G  16S C   N     112  114  -79.46  -72.40   14.72    1.10  -64.10  175.16   11.86
    7         16S  16S N   CA    114  115  139.48  152.40                  -35.00
    8   3844  35F  36E C   N     274  276   55.29   54.60    9.29    0.66  -63.60  139.74   24.05
    8         36E  36E N   CA    276  277   33.13   42.40                  -40.30
    9   3859  50E  51S C   N     405  407 -143.53  -64.10   92.53    9.12  -64.10   92.53    9.12
    9         51S  51S N   CA    407  408   12.46  -35.00                  -35.00
   10   3860  51S  52S C   N     411  413   54.13   56.90    3.11    0.27  -64.10  138.85   18.21
   10         52S  52S N   CA    413  414   37.81   36.40                  -35.00
   11   3896  87K  88D C   N     695  697 -142.04  -63.30   85.62   14.59  -63.30   85.62   14.59
   11         88D  88D N   CA    697  698  -73.63  -40.00                  -40.00
   12   3920 111I 112Y C   N     872  874  -43.45  -98.40   55.55    2.39  -63.50  164.87   27.19
   12        112Y 112Y N   CA    874  875  120.24  128.40                  -43.40
   13   3923 114R 115H C   N     904  906  -99.77 -125.60   57.56    1.65  -63.20  134.72   14.93
   13        115H 115H N   CA    906  907   87.36  138.80                  -42.30
   14   3924 115H 116R C   N     914  916  -59.75  -63.00   27.07    3.45 -125.20  164.97    9.00
   14        116R 116R N   CA    916  917  -67.97  -41.10                  140.60
   15   3934 125N 126H C   N    1010 1012 -126.21  -63.20   78.52    9.41  -63.20   78.52    9.41
   15        126H 126H N   CA   1012 1013    4.55  -42.30                  -42.30
   16   3935 126H 127C C   N    1020 1022 -127.91  -63.00   68.14   10.04  -63.00   68.14   10.04
   16        127C 127C N   CA   1022 1023  -20.37  -41.10                  -41.10
   17   3936 127C 128Q C   N    1026 1028  -57.49  -63.80   21.02    2.80 -121.10  172.13    8.92
   17        128Q 128Q N   CA   1028 1029  -60.36  -40.30                  139.70
   18   3937 128Q 129G C   N    1035 1037  -74.53  -62.40   13.92    2.13   82.20  162.49   12.16
   18        129G 129G N   CA   1037 1038  -34.37  -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    6    7   52   66  104  103  126  148  180  169


<< end of ENERGY.

>> Summary of successfully produced models:
Filename                          molpdf
----------------------------------------
LYZ_aln.B99990001.pdb          896.47095
LYZ_aln.B99990002.pdb          895.66882

In [9]:
import nglview
import ipywidgets
w1 = nglview.show_structure_file('LYZ_aln.B99990002.pdb')
w1
In [13]:
res_l = []
for res in alignm[0].residues:
    res_l.append(res.code)
alignm.append_sequence("".join(res_l+[".", ".", "."]))
In [16]:
alignm[2].code = "LYZ_lig"
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 [17]:
s = alignm[2]
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()
LYZ_lig 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
----------------------------------------------
     88     1   73    76      D     C    8.895
END OF TABLE

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     +N
              atom indices         :  1094     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     CA    +N    O
              atom indices         :  1094  1091     0  1095
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:        3
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:    13094    12134
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                   :      140
Number of all, selected real atoms                :     1139    1139
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    12134   12134
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2541
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                                    :        1241.2863





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              :    1119       0      3   0.010   0.010      29.901       1.000
 2 Bond angle potential               :    1504       3     14   3.136   3.136      208.00       1.000
 3 Stereochemical cosine torsion poten:     713       0     32  48.572  48.572      268.24       1.000
 4 Stereochemical improper torsion pot:     461       0      0   1.442   1.442      19.958       1.000
 5 Soft-sphere overlap restraints     :    2541       1      2   0.008   0.008      17.624       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)      :    2215       0      5   0.287   0.287      100.31       1.000
10 Distance restraints 2 (N-O)        :    2371       1     17   0.381   0.381      197.69       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:     136       0      5   5.066   5.066      41.163       1.000
14 Sidechain Chi_1 dihedral restraints:     121       0      3  83.487  83.487      48.939       1.000
15 Sidechain Chi_2 dihedral restraints:      87       0      2  77.352  77.352      50.680       1.000
16 Sidechain Chi_3 dihedral restraints:      35       0      0  68.086  68.086      20.418       1.000
17 Sidechain Chi_4 dihedral restraints:      22       0      0  84.504  84.504      14.269       1.000
18 Disulfide distance restraints      :       3       0      0   0.034   0.034     0.59255       1.000
19 Disulfide angle restraints         :       6       0      0   5.180   5.180      3.5544       1.000
20 Disulfide dihedral angle restraints:       3       0      0  34.777  34.777      2.2323       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)  :    1316       0      0   0.391   0.391      33.369       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:     135      23     22  33.916  67.127      112.61       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     498       0      1   0.737   0.737      45.210       1.000
27 Distance restraints 5 (X-Y)        :    1389       0      2   0.049   0.049      26.522       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: LYZ_lig.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:   17225.9434



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  2                           : Bond angle potential                    
List of the RVIOL violations larger than   :       4.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   2080  88D  88D N   CA    697  698  126.70  107.00   19.70    5.67  107.00   19.70    5.67

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

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   7531  65S  85P N   O     513  683    8.93    6.49    2.44    4.63    6.49    2.44    4.63

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

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   3810   1M   2Q C   N       7    9  -82.10  -73.00   17.28    0.99  -63.80  165.33   25.28
    1          2Q   2Q N   CA      9   10  155.39  140.70                  -40.30
    2   3811   2Q   3K C   N      16   18  -61.89  -70.20    8.47    0.58  -62.90  179.57   23.37
    2          3K   3K N   CA     18   19  138.77  140.40                  -40.80
    3   3812   3K   4L C   N      25   27 -107.10 -108.50   12.75    0.70  -63.50  179.01   27.53
    3          4L   4L N   CA     27   28  145.17  132.50                  -41.20
    4   3815   6I   7F C   N      49   51 -147.17 -124.20   27.33    0.71  -63.20  178.56   30.15
    4          7F   7F N   CA     51   52  158.12  143.30                  -44.30
    5   3816   7F   8A C   N      60   62  -69.12  -68.20    4.93    0.43  -62.50  178.76   29.62
    5          8A   8A N   CA     62   63  140.46  145.30                  -40.90
    6   3817   8A   9L C   N      65   67 -105.49 -108.50   29.35    1.55  -63.50  150.48   18.94
    6          9L   9L N   CA     67   68  103.30  132.50                  -41.20
    7   3820  11V  12L C   N      87   89  -96.06 -108.50   18.61    0.85  -63.50  163.14   21.01
    7         12L  12L N   CA     89   90  118.66  132.50                  -41.20
    8   3823  14V  15G C   N     108  110 -177.43 -167.20   22.77    0.93   82.20  176.97   12.93
    8         15G  15G N   CA    110  111  154.26  174.60                    8.50
    9   3824  15G  16S C   N     112  114 -146.10 -136.60   10.07    0.49  -64.10 -164.80   20.00
    9         16S  16S N   CA    114  115  147.86  151.20                  -35.00
   10   3844  35F  36E C   N     274  276   52.19   54.60    5.83    0.64  -63.60  139.27   23.96
   10         36E  36E N   CA    276  277   37.08   42.40                  -40.30
   11   3859  50E  51S C   N     405  407 -134.19  -64.10   78.78    8.12  -64.10   78.78    8.12
   11         51S  51S N   CA    407  408    0.97  -35.00                  -35.00
   12   3860  51S  52S C   N     411  413   58.96   56.90    2.19    0.21  -64.10  141.91   18.71
   12         52S  52S N   CA    413  414   35.66   36.40                  -35.00
   13   3893  84S  85P C   N     675  677  -45.60  -58.70   60.84    4.07  -64.50  124.34   10.30
   13         85P  85P N   CA    677  678  -89.91  -30.50                  147.20
   14   3894  85P  86G C   N     682  684  -66.47  -62.40   16.35    2.66   82.20  162.48   12.55
   14         86G  86G N   CA    684  685  -57.04  -41.20                    8.50
   15   3895  86G  87K C   N     686  688   68.53  -70.20  138.81   10.24  -70.20  138.81   10.24
   15         87K  87K N   CA    688  689  144.97  140.40                  140.40
   16   3896  87K  88D C   N     695  697 -154.82  -63.30   97.62   16.57  -63.30   97.62   16.57
   16         88D  88D N   CA    697  698  -73.96  -40.00                  -40.00
   17   3898  89C  90N C   N     709  711  168.38  -63.20  128.54   19.71   55.90  141.59    9.77
   17         90N  90N N   CA    711  712  -46.51  -41.10                   39.50
   18   3920 111I 112Y C   N     872  874  -46.67  -98.40   53.80    2.69  -63.50  157.92   25.92
   18        112Y 112Y N   CA    874  875  113.62  128.40                  -43.40
   19   3922 113K 114R C   N     893  895  -80.15 -125.20   81.45    2.77  -63.00  115.12   14.47
   19        114R 114R N   CA    895  896   72.74  140.60                  -41.10
   20   3923 114R 115H C   N     904  906 -163.47  -63.20  100.30   15.80  -63.20  100.30   15.80
   20        115H 115H N   CA    906  907  -40.00  -42.30                  -42.30
   21   3935 126H 127C C   N    1020 1022 -129.90  -63.00   84.35   10.29  -63.00   84.35   10.29
   21        127C 127C N   CA   1022 1023   10.29  -41.10                  -41.10
   22   3936 127C 128Q C   N    1026 1028  -58.29  -63.80   23.03    3.12 -121.10  169.68    8.80
   22        128Q 128Q N   CA   1028 1029  -62.67  -40.30                  139.70
   23   3937 128Q 129G C   N    1035 1037  -76.74  -62.40   16.32    2.51   82.20  164.38   12.27
   23        129G 129G N   CA   1037 1038  -33.42  -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   14   18   67   85  133  123  140  171  190  197


<< 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.
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                   :      140
Number of all, selected real atoms                :     1139    1139
Number of all, selected pseudo atoms              :        0       0
Number of all static, selected restraints         :    12134   12134
COVALENT_CYS                                      :        F
NONBONDED_SEL_ATOMS                               :        1
Number of non-bonded pairs (excluding 1-2,1-3,1-4):     2336
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                                    :        1028.7402





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              :    1119       0      2   0.009   0.009      28.554       1.000
 2 Bond angle potential               :    1504       1      7   2.264   2.264      153.32       1.000
 3 Stereochemical cosine torsion poten:     713       0     28  48.589  48.589      267.64       1.000
 4 Stereochemical improper torsion pot:     461       0      0   1.330   1.330      18.136       1.000
 5 Soft-sphere overlap restraints     :    2336       1      2   0.008   0.008      16.635       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)      :    2215       0      5   0.297   0.297      103.20       1.000
10 Distance restraints 2 (N-O)        :    2371       0      9   0.326   0.326      137.48       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:     136       0      2   4.326   4.326      30.018       1.000
14 Sidechain Chi_1 dihedral restraints:     121       0      3  77.190  77.190      37.942       1.000
15 Sidechain Chi_2 dihedral restraints:      87       0      0  67.811  67.811      36.506       1.000
16 Sidechain Chi_3 dihedral restraints:      35       0      0  75.344  75.344      22.613       1.000
17 Sidechain Chi_4 dihedral restraints:      22       0      0  77.045  77.045      12.729       1.000
18 Disulfide distance restraints      :       3       0      0   0.025   0.025     0.32177       1.000
19 Disulfide angle restraints         :       6       0      0   2.340   2.340     0.72531       1.000
20 Disulfide dihedral angle restraints:       3       0      0  25.897  25.897      1.9982       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)  :    1316       0      0   0.370   0.370      30.929       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:     135      15     13  28.355  60.370      69.117       1.000
26 Distance restraints 4 (SDCH-SDCH)  :     498       0      1   0.614   0.614      29.548       1.000
27 Distance restraints 5 (X-Y)        :    1389       0      3   0.053   0.053      31.325       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: LYZ_lig.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:   15770.6992



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  2                           : Bond angle potential                    
List of the RVIOL violations larger than   :       4.5000

    #   ICSR  RESNO1/2 ATM1/2   INDATM1/2    FEAT   restr    viol   rviol   RESTR    VIOL   RVIOL
    1   2080  88D  88D N   CA    697  698  128.30  107.00   21.30    6.12  107.00   21.30    6.12

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

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   3810   1M   2Q C   N       7    9  -77.42  -73.00    9.65    0.56  -63.80  170.96   25.86
    1          2Q   2Q N   CA      9   10  149.28  140.70                  -40.30
    2   3811   2Q   3K C   N      16   18 -107.13 -118.00   15.48    0.55  -62.90  174.58   20.68
    2          3K   3K N   CA     18   19  128.08  139.10                  -40.80
    3   3812   3K   4L C   N      25   27  -99.54 -108.50   10.42    0.56  -63.50 -177.38   23.54
    3          4L   4L N   CA     27   28  137.83  132.50                  -41.20
    4   3815   6I   7F C   N      49   51 -107.53 -124.20   23.21    0.62  -63.20  177.09   21.82
    4          7F   7F N   CA     51   52  127.15  143.30                  -44.30
    5   3816   7F   8A C   N      60   62 -140.33 -134.00   15.62    0.69  -62.50  175.97   33.01
    5          8A   8A N   CA     62   63  161.27  147.00                  -40.90
    6   3817   8A   9L C   N      65   67 -107.05 -108.50   12.19    0.67  -63.50  179.56   27.60
    6          9L   9L N   CA     67   68  144.60  132.50                  -41.20
    7   3820  11V  12L C   N      87   89 -139.20 -108.50   41.43    1.85  -63.50  175.62   29.07
    7         12L  12L N   CA     89   90  160.33  132.50                  -41.20
    8   3823  14V  15G C   N     108  110   68.79   78.70   10.70    0.60   82.20  179.13    9.37
    8         15G  15G N   CA    110  111 -170.12 -166.10                    8.50
    9   3824  15G  16S C   N     112  114 -124.03 -136.60   15.42    0.47  -64.10 -172.87   11.53
    9         16S  16S N   CA    114  115  142.27  151.20                  -35.00
   10   3844  35F  36E C   N     274  276   53.24   54.60    7.69    0.70  -63.60  138.91   23.90
   10         36E  36E N   CA    276  277   34.83   42.40                  -40.30
   11   3860  51S  52S C   N     411  413   63.88   56.90   10.17    0.58  -64.10  143.10   19.01
   11         52S  52S N   CA    413  414   29.01   36.40                  -35.00
   12   3896  87K  88D C   N     695  697  174.37  -96.50   93.98    3.82  -63.30  174.48   19.64
   12         88D  88D N   CA    697  698   84.42  114.20                  -40.00
   13   3920 111I 112Y C   N     872  874  -47.28  -98.40   56.68    3.45  -63.50  148.21   24.35
   13        112Y 112Y N   CA    874  875  103.92  128.40                  -43.40
   14   3934 125N 126H C   N    1010 1012 -123.28  -63.20   78.90    9.17  -63.20   78.90    9.17
   14        126H 126H N   CA   1012 1013    8.83  -42.30                  -42.30
   15   3935 126H 127C C   N    1020 1022 -124.98  -63.00   62.75    9.90  -63.00   62.75    9.90
   15        127C 127C N   CA   1022 1023  -31.30  -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    7   15   53   88  104  105  123  154  183  179


<< end of ENERGY.

>> Summary of successfully produced models:
Filename                          molpdf
----------------------------------------
LYZ_lig.B99990001.pdb         1241.28625
LYZ_lig.B99990002.pdb         1028.74023

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

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

In [14]:
from IPython.display import Image
Image(filename='pr10.png')
Out[14]:

Далее была попытка перем естить лиганд в другое место, но ... ничего не вышло

In [12]:
class mymodel(modeller.automodel.automodel):
    def special_restraints(self, aln):
        rsr = self.restraints
        for ids in (('CB:137', 'O6:139'),
                    ('SG:137', 'O6:139'),
                    ('CA:137', 'C1:139')):
                    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 = s.code)
a.starting_model = 1
a.ending_model = 2
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
----------------------------------------------
     88     1   73    76      D     C    8.895
END OF TABLE

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     +N
              atom indices         :  1094     0

getf_______W> RTF restraint not found in the atoms list:
              residue type, indices:     2   137
              atom names           : C     CA    +N    O
              atom indices         :  1094  1091     0  1095
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:        3
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
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-12-a0ec74e2eb90> in <module>()
     11 a.starting_model = 1
     12 a.ending_model = 2
---> 13 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-12-a0ec74e2eb90> in special_restraints(self, aln)
      5                     ('SG:137', 'O6:139'),
      6                     ('CA:137', 'C1:139')):
----> 7                     atoms = [self.atoms[i] for i in ids]
      8 #                    rsr.add(forms.upper_bound(group=physical.upper_distance,
      9 #                    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)
    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)
    275             return newindx
    276         raise TypeError("Atom IDs must be numbers or strings")

KeyError: 'No such atom: O6:139'
In [33]:
import nglview
import ipywidgets
w1 = nglview.show_structure_file('LYZ_lig.B99990002.pdb')
w1