In [18]:
import numpy as np
import copy

# Отображение структур
import IPython.display
import ipywidgets
from IPython.display import display,display_svg,SVG,Image

# Open Drug Discovery Toolkit
import oddt
import oddt.docking
import oddt.interactions

# Органик
from rdkit.Chem import Draw
from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem import MolFromSmiles
from rdkit.Chem.Draw import IPythonConsole

import pandas as pd
In [3]:
from os import system
def chemdraw(smiles):
    mol = MolFromSmiles(smiles)
    AllChem.Compute2DCoords(mol)
    display(mol)
In [4]:
import mdtraj as md
u = md.load('homolog.pdb')
pdb = u.topology
for i,r in enumerate(pdb.atoms):
    print(i,r)
    #посмотрим на атомы
0 MET1-N
1 MET1-CA
2 MET1-CB
3 MET1-CG
4 MET1-SD
5 MET1-CE
6 MET1-C
7 MET1-O
8 GLN2-N
9 GLN2-CA
10 GLN2-CB
11 GLN2-CG
12 GLN2-CD
13 GLN2-OE1
14 GLN2-NE2
15 GLN2-C
16 GLN2-O
17 LYS3-N
18 LYS3-CA
19 LYS3-CB
20 LYS3-CG
21 LYS3-CD
22 LYS3-CE
23 LYS3-NZ
24 LYS3-C
25 LYS3-O
26 LEU4-N
27 LEU4-CA
28 LEU4-CB
29 LEU4-CG
30 LEU4-CD1
31 LEU4-CD2
32 LEU4-C
33 LEU4-O
34 ILE5-N
35 ILE5-CA
36 ILE5-CB
37 ILE5-CG1
38 ILE5-CG2
39 ILE5-CD1
40 ILE5-C
41 ILE5-O
42 ILE6-N
43 ILE6-CA
44 ILE6-CB
45 ILE6-CG1
46 ILE6-CG2
47 ILE6-CD1
48 ILE6-C
49 ILE6-O
50 PHE7-N
51 PHE7-CA
52 PHE7-CB
53 PHE7-CG
54 PHE7-CD1
55 PHE7-CD2
56 PHE7-CE1
57 PHE7-CE2
58 PHE7-CZ
59 PHE7-C
60 PHE7-O
61 ALA8-N
62 ALA8-CA
63 ALA8-CB
64 ALA8-C
65 ALA8-O
66 LEU9-N
67 LEU9-CA
68 LEU9-CB
69 LEU9-CG
70 LEU9-CD1
71 LEU9-CD2
72 LEU9-C
73 LEU9-O
74 VAL10-N
75 VAL10-CA
76 VAL10-CB
77 VAL10-CG1
78 VAL10-CG2
79 VAL10-C
80 VAL10-O
81 VAL11-N
82 VAL11-CA
83 VAL11-CB
84 VAL11-CG1
85 VAL11-CG2
86 VAL11-C
87 VAL11-O
88 LEU12-N
89 LEU12-CA
90 LEU12-CB
91 LEU12-CG
92 LEU12-CD1
93 LEU12-CD2
94 LEU12-C
95 LEU12-O
96 CYS13-N
97 CYS13-CA
98 CYS13-CB
99 CYS13-SG
100 CYS13-C
101 CYS13-O
102 VAL14-N
103 VAL14-CA
104 VAL14-CB
105 VAL14-CG1
106 VAL14-CG2
107 VAL14-C
108 VAL14-O
109 GLY15-N
110 GLY15-CA
111 GLY15-C
112 GLY15-O
113 SER16-N
114 SER16-CA
115 SER16-CB
116 SER16-OG
117 SER16-C
118 SER16-O
119 GLU17-N
120 GLU17-CA
121 GLU17-CB
122 GLU17-CG
123 GLU17-CD
124 GLU17-OE1
125 GLU17-OE2
126 GLU17-C
127 GLU17-O
128 ALA18-N
129 ALA18-CA
130 ALA18-CB
131 ALA18-C
132 ALA18-O
133 LYS19-N
134 LYS19-CA
135 LYS19-CB
136 LYS19-CG
137 LYS19-CD
138 LYS19-CE
139 LYS19-NZ
140 LYS19-C
141 LYS19-O
142 THR20-N
143 THR20-CA
144 THR20-CB
145 THR20-OG1
146 THR20-CG2
147 THR20-C
148 THR20-O
149 PHE21-N
150 PHE21-CA
151 PHE21-CB
152 PHE21-CG
153 PHE21-CD1
154 PHE21-CD2
155 PHE21-CE1
156 PHE21-CE2
157 PHE21-CZ
158 PHE21-C
159 PHE21-O
160 THR22-N
161 THR22-CA
162 THR22-CB
163 THR22-OG1
164 THR22-CG2
165 THR22-C
166 THR22-O
167 ARG23-N
168 ARG23-CA
169 ARG23-CB
170 ARG23-CG
171 ARG23-CD
172 ARG23-NE
173 ARG23-CZ
174 ARG23-NH1
175 ARG23-NH2
176 ARG23-C
177 ARG23-O
178 CYS24-N
179 CYS24-CA
180 CYS24-CB
181 CYS24-SG
182 CYS24-C
183 CYS24-O
184 GLY25-N
185 GLY25-CA
186 GLY25-C
187 GLY25-O
188 LEU26-N
189 LEU26-CA
190 LEU26-CB
191 LEU26-CG
192 LEU26-CD1
193 LEU26-CD2
194 LEU26-C
195 LEU26-O
196 VAL27-N
197 VAL27-CA
198 VAL27-CB
199 VAL27-CG1
200 VAL27-CG2
201 VAL27-C
202 VAL27-O
203 HIS28-N
204 HIS28-CA
205 HIS28-ND1
206 HIS28-CG
207 HIS28-CB
208 HIS28-NE2
209 HIS28-CD2
210 HIS28-CE1
211 HIS28-C
212 HIS28-O
213 GLU29-N
214 GLU29-CA
215 GLU29-CB
216 GLU29-CG
217 GLU29-CD
218 GLU29-OE1
219 GLU29-OE2
220 GLU29-C
221 GLU29-O
222 LEU30-N
223 LEU30-CA
224 LEU30-CB
225 LEU30-CG
226 LEU30-CD1
227 LEU30-CD2
228 LEU30-C
229 LEU30-O
230 ARG31-N
231 ARG31-CA
232 ARG31-CB
233 ARG31-CG
234 ARG31-CD
235 ARG31-NE
236 ARG31-CZ
237 ARG31-NH1
238 ARG31-NH2
239 ARG31-C
240 ARG31-O
241 LYS32-N
242 LYS32-CA
243 LYS32-CB
244 LYS32-CG
245 LYS32-CD
246 LYS32-CE
247 LYS32-NZ
248 LYS32-C
249 LYS32-O
250 HIS33-N
251 HIS33-CA
252 HIS33-ND1
253 HIS33-CG
254 HIS33-CB
255 HIS33-NE2
256 HIS33-CD2
257 HIS33-CE1
258 HIS33-C
259 HIS33-O
260 GLY34-N
261 GLY34-CA
262 GLY34-C
263 GLY34-O
264 PHE35-N
265 PHE35-CA
266 PHE35-CB
267 PHE35-CG
268 PHE35-CD1
269 PHE35-CD2
270 PHE35-CE1
271 PHE35-CE2
272 PHE35-CZ
273 PHE35-C
274 PHE35-O
275 GLU36-N
276 GLU36-CA
277 GLU36-CB
278 GLU36-CG
279 GLU36-CD
280 GLU36-OE1
281 GLU36-OE2
282 GLU36-C
283 GLU36-O
284 GLU37-N
285 GLU37-CA
286 GLU37-CB
287 GLU37-CG
288 GLU37-CD
289 GLU37-OE1
290 GLU37-OE2
291 GLU37-C
292 GLU37-O
293 ASN38-N
294 ASN38-CA
295 ASN38-CB
296 ASN38-CG
297 ASN38-OD1
298 ASN38-ND2
299 ASN38-C
300 ASN38-O
301 LEU39-N
302 LEU39-CA
303 LEU39-CB
304 LEU39-CG
305 LEU39-CD1
306 LEU39-CD2
307 LEU39-C
308 LEU39-O
309 MET40-N
310 MET40-CA
311 MET40-CB
312 MET40-CG
313 MET40-SD
314 MET40-CE
315 MET40-C
316 MET40-O
317 ARG41-N
318 ARG41-CA
319 ARG41-CB
320 ARG41-CG
321 ARG41-CD
322 ARG41-NE
323 ARG41-CZ
324 ARG41-NH1
325 ARG41-NH2
326 ARG41-C
327 ARG41-O
328 ASN42-N
329 ASN42-CA
330 ASN42-CB
331 ASN42-CG
332 ASN42-OD1
333 ASN42-ND2
334 ASN42-C
335 ASN42-O
336 TRP43-N
337 TRP43-CA
338 TRP43-CB
339 TRP43-CG
340 TRP43-CD2
341 TRP43-CD1
342 TRP43-NE1
343 TRP43-CE2
344 TRP43-CE3
345 TRP43-CZ2
346 TRP43-CZ3
347 TRP43-CH2
348 TRP43-C
349 TRP43-O
350 VAL44-N
351 VAL44-CA
352 VAL44-CB
353 VAL44-CG1
354 VAL44-CG2
355 VAL44-C
356 VAL44-O
357 CYS45-N
358 CYS45-CA
359 CYS45-CB
360 CYS45-SG
361 CYS45-C
362 CYS45-O
363 LEU46-N
364 LEU46-CA
365 LEU46-CB
366 LEU46-CG
367 LEU46-CD1
368 LEU46-CD2
369 LEU46-C
370 LEU46-O
371 VAL47-N
372 VAL47-CA
373 VAL47-CB
374 VAL47-CG1
375 VAL47-CG2
376 VAL47-C
377 VAL47-O
378 GLU48-N
379 GLU48-CA
380 GLU48-CB
381 GLU48-CG
382 GLU48-CD
383 GLU48-OE1
384 GLU48-OE2
385 GLU48-C
386 GLU48-O
387 HIS49-N
388 HIS49-CA
389 HIS49-ND1
390 HIS49-CG
391 HIS49-CB
392 HIS49-NE2
393 HIS49-CD2
394 HIS49-CE1
395 HIS49-C
396 HIS49-O
397 GLU50-N
398 GLU50-CA
399 GLU50-CB
400 GLU50-CG
401 GLU50-CD
402 GLU50-OE1
403 GLU50-OE2
404 GLU50-C
405 GLU50-O
406 SER51-N
407 SER51-CA
408 SER51-CB
409 SER51-OG
410 SER51-C
411 SER51-O
412 SER52-N
413 SER52-CA
414 SER52-CB
415 SER52-OG
416 SER52-C
417 SER52-O
418 ARG53-N
419 ARG53-CA
420 ARG53-CB
421 ARG53-CG
422 ARG53-CD
423 ARG53-NE
424 ARG53-CZ
425 ARG53-NH1
426 ARG53-NH2
427 ARG53-C
428 ARG53-O
429 ASP54-N
430 ASP54-CA
431 ASP54-CB
432 ASP54-CG
433 ASP54-OD1
434 ASP54-OD2
435 ASP54-C
436 ASP54-O
437 THR55-N
438 THR55-CA
439 THR55-CB
440 THR55-OG1
441 THR55-CG2
442 THR55-C
443 THR55-O
444 SER56-N
445 SER56-CA
446 SER56-CB
447 SER56-OG
448 SER56-C
449 SER56-O
450 LYS57-N
451 LYS57-CA
452 LYS57-CB
453 LYS57-CG
454 LYS57-CD
455 LYS57-CE
456 LYS57-NZ
457 LYS57-C
458 LYS57-O
459 THR58-N
460 THR58-CA
461 THR58-CB
462 THR58-OG1
463 THR58-CG2
464 THR58-C
465 THR58-O
466 ASN59-N
467 ASN59-CA
468 ASN59-CB
469 ASN59-CG
470 ASN59-OD1
471 ASN59-ND2
472 ASN59-C
473 ASN59-O
474 THR60-N
475 THR60-CA
476 THR60-CB
477 THR60-OG1
478 THR60-CG2
479 THR60-C
480 THR60-O
481 ASN61-N
482 ASN61-CA
483 ASN61-CB
484 ASN61-CG
485 ASN61-OD1
486 ASN61-ND2
487 ASN61-C
488 ASN61-O
489 ARG62-N
490 ARG62-CA
491 ARG62-CB
492 ARG62-CG
493 ARG62-CD
494 ARG62-NE
495 ARG62-CZ
496 ARG62-NH1
497 ARG62-NH2
498 ARG62-C
499 ARG62-O
500 ASN63-N
501 ASN63-CA
502 ASN63-CB
503 ASN63-CG
504 ASN63-OD1
505 ASN63-ND2
506 ASN63-C
507 ASN63-O
508 GLY64-N
509 GLY64-CA
510 GLY64-C
511 GLY64-O
512 SER65-N
513 SER65-CA
514 SER65-CB
515 SER65-OG
516 SER65-C
517 SER65-O
518 LYS66-N
519 LYS66-CA
520 LYS66-CB
521 LYS66-CG
522 LYS66-CD
523 LYS66-CE
524 LYS66-NZ
525 LYS66-C
526 LYS66-O
527 ASP67-N
528 ASP67-CA
529 ASP67-CB
530 ASP67-CG
531 ASP67-OD1
532 ASP67-OD2
533 ASP67-C
534 ASP67-O
535 TYR68-N
536 TYR68-CA
537 TYR68-CB
538 TYR68-CG
539 TYR68-CD1
540 TYR68-CD2
541 TYR68-CE1
542 TYR68-CE2
543 TYR68-CZ
544 TYR68-OH
545 TYR68-C
546 TYR68-O
547 GLY69-N
548 GLY69-CA
549 GLY69-C
550 GLY69-O
551 LEU70-N
552 LEU70-CA
553 LEU70-CB
554 LEU70-CG
555 LEU70-CD1
556 LEU70-CD2
557 LEU70-C
558 LEU70-O
559 PHE71-N
560 PHE71-CA
561 PHE71-CB
562 PHE71-CG
563 PHE71-CD1
564 PHE71-CD2
565 PHE71-CE1
566 PHE71-CE2
567 PHE71-CZ
568 PHE71-C
569 PHE71-O
570 GLN72-N
571 GLN72-CA
572 GLN72-CB
573 GLN72-CG
574 GLN72-CD
575 GLN72-OE1
576 GLN72-NE2
577 GLN72-C
578 GLN72-O
579 ILE73-N
580 ILE73-CA
581 ILE73-CB
582 ILE73-CG1
583 ILE73-CG2
584 ILE73-CD1
585 ILE73-C
586 ILE73-O
587 ASN74-N
588 ASN74-CA
589 ASN74-CB
590 ASN74-CG
591 ASN74-OD1
592 ASN74-ND2
593 ASN74-C
594 ASN74-O
595 ASP75-N
596 ASP75-CA
597 ASP75-CB
598 ASP75-CG
599 ASP75-OD1
600 ASP75-OD2
601 ASP75-C
602 ASP75-O
603 ARG76-N
604 ARG76-CA
605 ARG76-CB
606 ARG76-CG
607 ARG76-CD
608 ARG76-NE
609 ARG76-CZ
610 ARG76-NH1
611 ARG76-NH2
612 ARG76-C
613 ARG76-O
614 TYR77-N
615 TYR77-CA
616 TYR77-CB
617 TYR77-CG
618 TYR77-CD1
619 TYR77-CD2
620 TYR77-CE1
621 TYR77-CE2
622 TYR77-CZ
623 TYR77-OH
624 TYR77-C
625 TYR77-O
626 TRP78-N
627 TRP78-CA
628 TRP78-CB
629 TRP78-CG
630 TRP78-CD2
631 TRP78-CD1
632 TRP78-NE1
633 TRP78-CE2
634 TRP78-CE3
635 TRP78-CZ2
636 TRP78-CZ3
637 TRP78-CH2
638 TRP78-C
639 TRP78-O
640 CYS79-N
641 CYS79-CA
642 CYS79-CB
643 CYS79-SG
644 CYS79-C
645 CYS79-O
646 SER80-N
647 SER80-CA
648 SER80-CB
649 SER80-OG
650 SER80-C
651 SER80-O
652 LYS81-N
653 LYS81-CA
654 LYS81-CB
655 LYS81-CG
656 LYS81-CD
657 LYS81-CE
658 LYS81-NZ
659 LYS81-C
660 LYS81-O
661 GLY82-N
662 GLY82-CA
663 GLY82-C
664 GLY82-O
665 ALA83-N
666 ALA83-CA
667 ALA83-CB
668 ALA83-C
669 ALA83-O
670 SER84-N
671 SER84-CA
672 SER84-CB
673 SER84-OG
674 SER84-C
675 SER84-O
676 PRO85-N
677 PRO85-CA
678 PRO85-CD
679 PRO85-CB
680 PRO85-CG
681 PRO85-C
682 PRO85-O
683 GLY86-N
684 GLY86-CA
685 GLY86-C
686 GLY86-O
687 LYS87-N
688 LYS87-CA
689 LYS87-CB
690 LYS87-CG
691 LYS87-CD
692 LYS87-CE
693 LYS87-NZ
694 LYS87-C
695 LYS87-O
696 ASP88-N
697 ASP88-CA
698 ASP88-CB
699 ASP88-CG
700 ASP88-OD1
701 ASP88-OD2
702 ASP88-C
703 ASP88-O
704 CYS89-N
705 CYS89-CA
706 CYS89-CB
707 CYS89-SG
708 CYS89-C
709 CYS89-O
710 ASN90-N
711 ASN90-CA
712 ASN90-CB
713 ASN90-CG
714 ASN90-OD1
715 ASN90-ND2
716 ASN90-C
717 ASN90-O
718 VAL91-N
719 VAL91-CA
720 VAL91-CB
721 VAL91-CG1
722 VAL91-CG2
723 VAL91-C
724 VAL91-O
725 LYS92-N
726 LYS92-CA
727 LYS92-CB
728 LYS92-CG
729 LYS92-CD
730 LYS92-CE
731 LYS92-NZ
732 LYS92-C
733 LYS92-O
734 CYS93-N
735 CYS93-CA
736 CYS93-CB
737 CYS93-SG
738 CYS93-C
739 CYS93-O
740 SER94-N
741 SER94-CA
742 SER94-CB
743 SER94-OG
744 SER94-C
745 SER94-O
746 ASP95-N
747 ASP95-CA
748 ASP95-CB
749 ASP95-CG
750 ASP95-OD1
751 ASP95-OD2
752 ASP95-C
753 ASP95-O
754 LEU96-N
755 LEU96-CA
756 LEU96-CB
757 LEU96-CG
758 LEU96-CD1
759 LEU96-CD2
760 LEU96-C
761 LEU96-O
762 LEU97-N
763 LEU97-CA
764 LEU97-CB
765 LEU97-CG
766 LEU97-CD1
767 LEU97-CD2
768 LEU97-C
769 LEU97-O
770 THR98-N
771 THR98-CA
772 THR98-CB
773 THR98-OG1
774 THR98-CG2
775 THR98-C
776 THR98-O
777 ASP99-N
778 ASP99-CA
779 ASP99-CB
780 ASP99-CG
781 ASP99-OD1
782 ASP99-OD2
783 ASP99-C
784 ASP99-O
785 ASP100-N
786 ASP100-CA
787 ASP100-CB
788 ASP100-CG
789 ASP100-OD1
790 ASP100-OD2
791 ASP100-C
792 ASP100-O
793 ILE101-N
794 ILE101-CA
795 ILE101-CB
796 ILE101-CG1
797 ILE101-CG2
798 ILE101-CD1
799 ILE101-C
800 ILE101-O
801 THR102-N
802 THR102-CA
803 THR102-CB
804 THR102-OG1
805 THR102-CG2
806 THR102-C
807 THR102-O
808 LYS103-N
809 LYS103-CA
810 LYS103-CB
811 LYS103-CG
812 LYS103-CD
813 LYS103-CE
814 LYS103-NZ
815 LYS103-C
816 LYS103-O
817 ALA104-N
818 ALA104-CA
819 ALA104-CB
820 ALA104-C
821 ALA104-O
822 ALA105-N
823 ALA105-CA
824 ALA105-CB
825 ALA105-C
826 ALA105-O
827 LYS106-N
828 LYS106-CA
829 LYS106-CB
830 LYS106-CG
831 LYS106-CD
832 LYS106-CE
833 LYS106-NZ
834 LYS106-C
835 LYS106-O
836 CYS107-N
837 CYS107-CA
838 CYS107-CB
839 CYS107-SG
840 CYS107-C
841 CYS107-O
842 ALA108-N
843 ALA108-CA
844 ALA108-CB
845 ALA108-C
846 ALA108-O
847 LYS109-N
848 LYS109-CA
849 LYS109-CB
850 LYS109-CG
851 LYS109-CD
852 LYS109-CE
853 LYS109-NZ
854 LYS109-C
855 LYS109-O
856 LYS110-N
857 LYS110-CA
858 LYS110-CB
859 LYS110-CG
860 LYS110-CD
861 LYS110-CE
862 LYS110-NZ
863 LYS110-C
864 LYS110-O
865 ILE111-N
866 ILE111-CA
867 ILE111-CB
868 ILE111-CG1
869 ILE111-CG2
870 ILE111-CD1
871 ILE111-C
872 ILE111-O
873 TYR112-N
874 TYR112-CA
875 TYR112-CB
876 TYR112-CG
877 TYR112-CD1
878 TYR112-CD2
879 TYR112-CE1
880 TYR112-CE2
881 TYR112-CZ
882 TYR112-OH
883 TYR112-C
884 TYR112-O
885 LYS113-N
886 LYS113-CA
887 LYS113-CB
888 LYS113-CG
889 LYS113-CD
890 LYS113-CE
891 LYS113-NZ
892 LYS113-C
893 LYS113-O
894 ARG114-N
895 ARG114-CA
896 ARG114-CB
897 ARG114-CG
898 ARG114-CD
899 ARG114-NE
900 ARG114-CZ
901 ARG114-NH1
902 ARG114-NH2
903 ARG114-C
904 ARG114-O
905 HIS115-N
906 HIS115-CA
907 HIS115-ND1
908 HIS115-CG
909 HIS115-CB
910 HIS115-NE2
911 HIS115-CD2
912 HIS115-CE1
913 HIS115-C
914 HIS115-O
915 ARG116-N
916 ARG116-CA
917 ARG116-CB
918 ARG116-CG
919 ARG116-CD
920 ARG116-NE
921 ARG116-CZ
922 ARG116-NH1
923 ARG116-NH2
924 ARG116-C
925 ARG116-O
926 PHE117-N
927 PHE117-CA
928 PHE117-CB
929 PHE117-CG
930 PHE117-CD1
931 PHE117-CD2
932 PHE117-CE1
933 PHE117-CE2
934 PHE117-CZ
935 PHE117-C
936 PHE117-O
937 ASP118-N
938 ASP118-CA
939 ASP118-CB
940 ASP118-CG
941 ASP118-OD1
942 ASP118-OD2
943 ASP118-C
944 ASP118-O
945 ALA119-N
946 ALA119-CA
947 ALA119-CB
948 ALA119-C
949 ALA119-O
950 TRP120-N
951 TRP120-CA
952 TRP120-CB
953 TRP120-CG
954 TRP120-CD2
955 TRP120-CD1
956 TRP120-NE1
957 TRP120-CE2
958 TRP120-CE3
959 TRP120-CZ2
960 TRP120-CZ3
961 TRP120-CH2
962 TRP120-C
963 TRP120-O
964 TYR121-N
965 TYR121-CA
966 TYR121-CB
967 TYR121-CG
968 TYR121-CD1
969 TYR121-CD2
970 TYR121-CE1
971 TYR121-CE2
972 TYR121-CZ
973 TYR121-OH
974 TYR121-C
975 TYR121-O
976 GLY122-N
977 GLY122-CA
978 GLY122-C
979 GLY122-O
980 TRP123-N
981 TRP123-CA
982 TRP123-CB
983 TRP123-CG
984 TRP123-CD2
985 TRP123-CD1
986 TRP123-NE1
987 TRP123-CE2
988 TRP123-CE3
989 TRP123-CZ2
990 TRP123-CZ3
991 TRP123-CH2
992 TRP123-C
993 TRP123-O
994 LYS124-N
995 LYS124-CA
996 LYS124-CB
997 LYS124-CG
998 LYS124-CD
999 LYS124-CE
1000 LYS124-NZ
1001 LYS124-C
1002 LYS124-O
1003 ASN125-N
1004 ASN125-CA
1005 ASN125-CB
1006 ASN125-CG
1007 ASN125-OD1
1008 ASN125-ND2
1009 ASN125-C
1010 ASN125-O
1011 HIS126-N
1012 HIS126-CA
1013 HIS126-ND1
1014 HIS126-CG
1015 HIS126-CB
1016 HIS126-NE2
1017 HIS126-CD2
1018 HIS126-CE1
1019 HIS126-C
1020 HIS126-O
1021 CYS127-N
1022 CYS127-CA
1023 CYS127-CB
1024 CYS127-SG
1025 CYS127-C
1026 CYS127-O
1027 GLN128-N
1028 GLN128-CA
1029 GLN128-CB
1030 GLN128-CG
1031 GLN128-CD
1032 GLN128-OE1
1033 GLN128-NE2
1034 GLN128-C
1035 GLN128-O
1036 GLY129-N
1037 GLY129-CA
1038 GLY129-C
1039 GLY129-O
1040 SER130-N
1041 SER130-CA
1042 SER130-CB
1043 SER130-OG
1044 SER130-C
1045 SER130-O
1046 LEU131-N
1047 LEU131-CA
1048 LEU131-CB
1049 LEU131-CG
1050 LEU131-CD1
1051 LEU131-CD2
1052 LEU131-C
1053 LEU131-O
1054 PRO132-N
1055 PRO132-CA
1056 PRO132-CD
1057 PRO132-CB
1058 PRO132-CG
1059 PRO132-C
1060 PRO132-O
1061 ASP133-N
1062 ASP133-CA
1063 ASP133-CB
1064 ASP133-CG
1065 ASP133-OD1
1066 ASP133-OD2
1067 ASP133-C
1068 ASP133-O
1069 ILE134-N
1070 ILE134-CA
1071 ILE134-CB
1072 ILE134-CG1
1073 ILE134-CG2
1074 ILE134-CD1
1075 ILE134-C
1076 ILE134-O
1077 SER135-N
1078 SER135-CA
1079 SER135-CB
1080 SER135-OG
1081 SER135-C
1082 SER135-O
1083 SER136-N
1084 SER136-CA
1085 SER136-CB
1086 SER136-OG
1087 SER136-C
1088 SER136-O
1089 CYS137-N
1090 CYS137-CA
1091 CYS137-CB
1092 CYS137-SG
1093 CYS137-C
1094 CYS137-O
1095 CYS137-OXT
1096 NAG138-C1
1097 NAG138-C2
1098 NAG138-C3
1099 NAG138-C4
1100 NAG138-C5
1101 NAG138-C6
1102 NAG138-C7
1103 NAG138-C8
1104 NAG138-N2
1105 NAG138-O3
1106 NAG138-O4
1107 NAG138-O5
1108 NAG138-O6
1109 NAG138-O7
1110 NAG139-C1
1111 NAG139-C2
1112 NAG139-C3
1113 NAG139-C4
1114 NAG139-C5
1115 NAG139-C6
1116 NAG139-C7
1117 NAG139-C8
1118 NAG139-N2
1119 NAG139-O3
1120 NAG139-O4
1121 NAG139-O5
1122 NAG139-O6
1123 NAG139-O7
1124 NDG140-C1
1125 NDG140-C2
1126 NDG140-C3
1127 NDG140-C4
1128 NDG140-C5
1129 NDG140-C6
1130 NDG140-C7
1131 NDG140-C8
1132 NDG140-O
1133 NDG140-O3
1134 NDG140-O4
1135 NDG140-O6
1136 NDG140-O7
1137 NDG140-N2
1138 NDG140-O1L
In [5]:
# сохраним pdb без лиганда
u2 = u.atom_slice(range(1096))
u2.save_pdb('1lmp-clean.pdb', force_overwrite=True)
In [6]:
lig = u.atom_slice(range(1096,1124))
#lig= lig.topology
for v in lig.xyz:
    lig_center = np.mean(v, axis=0)
lig_center
Out[6]:
array([5.488893 , 4.346129 , 2.7558858], dtype=float32)
In [7]:
prot = next(oddt.toolkit.readfile('pdb','1lmp-clean.pdb'))
### В новой версии oddt  всё сделает за вас
#prot.OBMol.AddPolarHydrogens()
#prot.OBMol.AutomaticPartialCharge()

print('is it the first mol in 1lmp is protein?',prot.protein,':) and MW of this mol is:', prot.molwt )
is it the first mol in 1lmp is protein? False :) and MW of this mol is: 15662.003999999964
In [ ]:
 
In [8]:
smiles = ['O=C(NC1C(O)C(O)C(OC1O)CO)O', 'O=C(NC1C(O)C(O)C(OC1O)CO)[NH3+]',
          'O=C(NC1C(O)C(O)C(OC1O)CO)', 'O=C(NC1C(O)C(O)C(OC1O)CO)(c1ccccc1)',
          'O=C(NC1C(O)C(O)C(OC1O)CO)C(=O)O']
mols= []
images =[]

for s in smiles:
    m = oddt.toolkit.readstring('smi', s)
    if not m.Mol.HasProp('3D'): 
        m.make3D(forcefield='mmff94', steps=150)
      
    
    mols.append(m)
    ###with print m.OBMol.Has3D() was found that:
    ### deep copy needed to keep 3D , write svg make mols flat
    images.append((SVG(copy.deepcopy(m).write('svg'))))
    
display_svg(*images)
O NH HO OH O OH OH OH
O NH HO OH O OH OH H3N+
O NH HO OH O OH OH
O NH OH OH O HO OH
O NH HO OH O OH OH O OH
In [9]:
dock_obj= oddt.docking.AutodockVina.autodock_vina(
    protein=prot,size=(20,20,20),center=[54.88893 , 43.46129 , 27.558858],
    executable='/usr/bin/vina',autocleanup=True, num_modes=9)

print(dock_obj.tmp_dir)
print(" ".join(dock_obj.params)) # 
/tmp/autodock_vina_wqkh0tuk
--center_x 54.88893 --center_y 43.46129 --center_z 27.558858 --size_x 20 --size_y 20 --size_z 20 --exhaustiveness 8 --num_modes 9 --energy_range 3

Первые 3 параметра - координаты центра, далее 3 параметра - размер ячейки, exhaustiveness - насколько долго мы ищем минимум ( ищется эвристически), num_modes - число моделей которое должно быть в выдаче, energy_range - масимальная разница энергий (в ккал/моль) между лучшей и худшей моделью для выдачи

In [11]:
res = dock_obj.dock(mols,prot)
In [12]:
for i,r in enumerate(res): 
    formula = Chem.rdMolDescriptors.CalcMolFormula(r.Mol)
    print("%4d%10s%8s%8s%8s" %(i, formula, r.data['vina_affinity'],  r.data['vina_rmsd_ub'], r.residues[0].name))
   0  C7H13NO7    -5.1   0.000     UNL
   1  C7H13NO7    -5.0   5.441     UNL
   2  C7H13NO7    -4.9   2.517     UNL
   3  C7H13NO7    -4.8   5.424     UNL
   4  C7H13NO7    -4.7   2.869     UNL
   5  C7H13NO7    -4.7   3.795     UNL
   6  C7H13NO7    -4.7   4.098     UNL
   7  C7H13NO7    -4.6   2.815     UNL
   8  C7H13NO7    -4.6   5.110     UNL
   9C7H15N2O6+    -4.8   0.000     UNL
  10C7H15N2O6+    -4.7   3.076     UNL
  11C7H15N2O6+    -4.5   4.845     UNL
  12C7H15N2O6+    -4.5   2.951     UNL
  13C7H15N2O6+    -4.4   4.585     UNL
  14C7H15N2O6+    -4.3   2.332     UNL
  15C7H15N2O6+    -4.2   3.877     UNL
  16C7H15N2O6+    -4.2   5.363     UNL
  17C7H15N2O6+    -4.1   4.043     UNL
  18  C7H13NO6    -4.6   0.000     UNL
  19  C7H13NO6    -4.5   4.081     UNL
  20  C7H13NO6    -4.3   5.281     UNL
  21  C7H13NO6    -4.3   3.025     UNL
  22  C7H13NO6    -4.3   4.718     UNL
  23  C7H13NO6    -4.2   2.965     UNL
  24  C7H13NO6    -4.2   3.828     UNL
  25  C7H13NO6    -4.0   5.033     UNL
  26  C7H13NO6    -4.0   3.401     UNL
  27 C13H17NO6    -6.3   0.000     UNL
  28 C13H17NO6    -6.3   4.833     UNL
  29 C13H17NO6    -6.2  10.113     UNL
  30 C13H17NO6    -6.1   2.569     UNL
  31 C13H17NO6    -6.0   3.237     UNL
  32 C13H17NO6    -5.9   7.757     UNL
  33 C13H17NO6    -5.8   4.003     UNL
  34 C13H17NO6    -5.7   4.414     UNL
  35 C13H17NO6    -5.5   8.367     UNL
  36  C8H13NO8    -5.5   0.000     UNL
  37  C8H13NO8    -5.5   3.034     UNL
  38  C8H13NO8    -5.3   3.598     UNL
  39  C8H13NO8    -5.2   5.363     UNL
  40  C8H13NO8    -5.2   5.701     UNL
  41  C8H13NO8    -5.1   4.854     UNL
  42  C8H13NO8    -5.0   4.157     UNL
  43  C8H13NO8    -5.0   6.208     UNL
  44  C8H13NO8    -4.9   6.975     UNL

Посмотрим на резульаты докинга!ligs.png

In [60]:
for i,r in enumerate(res):
    r.write(filename='r%s.pdb' % i, format='pdb',overwrite=True)
In [13]:
best = np.zeros((len(res),3),dtype=object)
for i,r in enumerate(res):    
    formula = Chem.rdMolDescriptors.CalcMolFormula(r.Mol)
    best[i] = [i, formula, float(r.data['vina_affinity'])]
In [31]:
top = sorted(best, key=lambda x: x[2])[:2] #посмотрим например на 28 позу
top
Out[31]:
[array([27, 'C13H17NO6', -6.3], dtype=object),
 array([28, 'C13H17NO6', -6.3], dtype=object)]

Лучшая поза докингаsurf.png

surf1.png

In [15]:
top = sorted(best, key=lambda x: x[2])[:3]
top 
Out[15]:
[array([27, 'C13H17NO6', -6.3], dtype=object),
 array([28, 'C13H17NO6', -6.3], dtype=object),
 array([29, 'C13H17NO6', -6.2], dtype=object)]

Топ 3 лучших позы пришлись на лиганд с фенилом. Данный радикал среди остальных наиболее похож на моносахаридное кольцо, а также формирует пи-пи стекинг.

In [32]:
hb_total = []
hb_strict = []
phob_all = []
pi_par=[]
pi_perp=[]
pi=[]

for i,r in enumerate(res):
    # mol2 - акцептор водородной связи, mol2 - донор, 'strict' связь (прошла все отсечки)
    mol1, mol2, strict = oddt.interactions.hbonds(prot,r) 
    hbonds_num = len(mol1)
    hbonds_strict = strict.sum()
    
    r1, r2, strict_par, strict_per = oddt.interactions.pi_stacking(prot,r)
    stack_num = len(r1)
    stack_par = strict_par.sum()# параллельный стекинг
    stack_per = strict_per.sum()# перпендикулярный
    
    mol1, mol2 = oddt.interactions.hydrophobic_contacts(prot,r)
    hydroph_num = len(mol1)
    
    hb_total.append(hbonds_num)
    hb_strict.append(hbonds_strict)
    phob_all.append(hydroph_num)
    pi_par.append(stack_par)
    pi_perp.append(stack_per)
    pi.append(stack_num)

    
sort_table = pd.DataFrame({
                    'Formula':[Chem.rdMolDescriptors.CalcMolFormula(r.Mol) for r in res],
                    'Affinity (kcal/mol)':[r.data['vina_affinity'] for r in res],
                    'Total number of h-bonds':hbtotal, 
                    'Strict number of h-bonds':hb_strict,
                    'Pi-stacking':pi,
                    'Pi-stacking (parallel)':pi_par,
                    'Pi-stacking(perp)':pi_perp,
                    'Hydrophobic':phob_all, 
                    })
sort_aff = sort_table.sort_values(by=['Affinity (kcal/mol)'],ascending=False) #отсортируем по афинности
In [33]:
sort_aff
Out[33]:
Formula Affinity (kcal/mol) Total number of h-bonds Strict number of h-bonds Pi-stacking Pi-stacking (parallel) Pi-stacking(perp) Hydrophobic
27 C13H17NO6 -6.3 2 1 1 0 0 13
28 C13H17NO6 -6.3 3 3 1 1 0 7
29 C13H17NO6 -6.2 3 3 1 1 0 8
30 C13H17NO6 -6.1 3 1 1 1 0 8
31 C13H17NO6 -6.0 1 0 1 0 0 9
32 C13H17NO6 -5.9 4 2 0 0 0 6
33 C13H17NO6 -5.8 0 0 1 1 0 4
34 C13H17NO6 -5.7 3 3 1 1 0 4
35 C13H17NO6 -5.5 3 2 0 0 0 2
36 C8H13NO8 -5.5 3 2 0 0 0 0
37 C8H13NO8 -5.5 8 8 0 0 0 0
38 C8H13NO8 -5.3 8 7 0 0 0 0
39 C8H13NO8 -5.2 7 5 0 0 0 0
40 C8H13NO8 -5.2 7 6 0 0 0 0
41 C8H13NO8 -5.1 1 1 0 0 0 0
0 C7H13NO7 -5.1 4 3 0 0 0 0
1 C7H13NO7 -5.0 3 2 0 0 0 0
42 C8H13NO8 -5.0 4 3 0 0 0 0
43 C8H13NO8 -5.0 3 3 0 0 0 0
44 C8H13NO8 -4.9 3 2 0 0 0 0
2 C7H13NO7 -4.9 8 8 0 0 0 0
3 C7H13NO7 -4.8 3 2 0 0 0 0
9 C7H15N2O6+ -4.8 8 8 0 0 0 0
4 C7H13NO7 -4.7 6 6 0 0 0 0
5 C7H13NO7 -4.7 8 7 0 0 0 0
6 C7H13NO7 -4.7 5 4 0 0 0 0
10 C7H15N2O6+ -4.7 3 1 0 0 0 0
18 C7H13NO6 -4.6 5 5 0 0 0 0
7 C7H13NO7 -4.6 0 0 0 0 0 0
8 C7H13NO7 -4.6 6 5 0 0 0 0
11 C7H15N2O6+ -4.5 3 2 0 0 0 0
19 C7H13NO6 -4.5 5 4 0 0 0 0
12 C7H15N2O6+ -4.5 4 4 0 0 0 0
13 C7H15N2O6+ -4.4 5 4 0 0 0 0
20 C7H13NO6 -4.3 11 10 0 0 0 0
21 C7H13NO6 -4.3 4 4 0 0 0 0
14 C7H15N2O6+ -4.3 5 4 0 0 0 0
22 C7H13NO6 -4.3 2 2 0 0 0 0
15 C7H15N2O6+ -4.2 5 4 0 0 0 0
16 C7H15N2O6+ -4.2 3 3 0 0 0 0
24 C7H13NO6 -4.2 4 3 0 0 0 0
23 C7H13NO6 -4.2 2 2 0 0 0 0
17 C7H15N2O6+ -4.1 2 2 0 0 0 0
26 C7H13NO6 -4.0 4 4 0 0 0 0
25 C7H13NO6 -4.0 6 3 0 0 0 0

Посмотрим также на лучшие позы для других заместителей

C8H13NO8 По данным в таблице - 2 водородные связи, которые удовлетворяют всем условиям. Посмотрев, на окружение 3.5 ангстрема и потенциальные связи, данные связи были обнаружены.

36.png

C7H13NO7. Для данного заместителя было найдено 3 связи, удовлеворяющие критериям, всего 4. Все связи были найдены.

0.png

C7H15N2O6+ Тут в принципе 4 водородных связей и правда есть. Но вот еще 4 - непонятно. Ну и сам лиганд явно сильно закрутило.

9.png

C7H13NO6 А в данном случае все 5 водородных связей есть!

18.png

In [ ]: