In [9]:
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.Draw import IPythonConsole
In [12]:
# Надо убрать старый лигнад из белка
import mdtraj as md
u = md.load('with_lig.B99990001.pdb')
pdb = u.topology
for i,r in enumerate(pdb.atoms):
    print(i,r)
    #посмотрим на атомы
0 LYS1-N
1 LYS1-CA
2 LYS1-CB
3 LYS1-CG
4 LYS1-CD
5 LYS1-CE
6 LYS1-NZ
7 LYS1-C
8 LYS1-O
9 THR2-N
10 THR2-CA
11 THR2-CB
12 THR2-OG1
13 THR2-CG2
14 THR2-C
15 THR2-O
16 PHE3-N
17 PHE3-CA
18 PHE3-CB
19 PHE3-CG
20 PHE3-CD1
21 PHE3-CD2
22 PHE3-CE1
23 PHE3-CE2
24 PHE3-CZ
25 PHE3-C
26 PHE3-O
27 THR4-N
28 THR4-CA
29 THR4-CB
30 THR4-OG1
31 THR4-CG2
32 THR4-C
33 THR4-O
34 ARG5-N
35 ARG5-CA
36 ARG5-CB
37 ARG5-CG
38 ARG5-CD
39 ARG5-NE
40 ARG5-CZ
41 ARG5-NH1
42 ARG5-NH2
43 ARG5-C
44 ARG5-O
45 CYS6-N
46 CYS6-CA
47 CYS6-CB
48 CYS6-SG
49 CYS6-C
50 CYS6-O
51 GLU7-N
52 GLU7-CA
53 GLU7-CB
54 GLU7-CG
55 GLU7-CD
56 GLU7-OE1
57 GLU7-OE2
58 GLU7-C
59 GLU7-O
60 LEU8-N
61 LEU8-CA
62 LEU8-CB
63 LEU8-CG
64 LEU8-CD1
65 LEU8-CD2
66 LEU8-C
67 LEU8-O
68 VAL9-N
69 VAL9-CA
70 VAL9-CB
71 VAL9-CG1
72 VAL9-CG2
73 VAL9-C
74 VAL9-O
75 GLN10-N
76 GLN10-CA
77 GLN10-CB
78 GLN10-CG
79 GLN10-CD
80 GLN10-OE1
81 GLN10-NE2
82 GLN10-C
83 GLN10-O
84 ALA11-N
85 ALA11-CA
86 ALA11-CB
87 ALA11-C
88 ALA11-O
89 LEU12-N
90 LEU12-CA
91 LEU12-CB
92 LEU12-CG
93 LEU12-CD1
94 LEU12-CD2
95 LEU12-C
96 LEU12-O
97 ARG13-N
98 ARG13-CA
99 ARG13-CB
100 ARG13-CG
101 ARG13-CD
102 ARG13-NE
103 ARG13-CZ
104 ARG13-NH1
105 ARG13-NH2
106 ARG13-C
107 ARG13-O
108 ARG14-N
109 ARG14-CA
110 ARG14-CB
111 ARG14-CG
112 ARG14-CD
113 ARG14-NE
114 ARG14-CZ
115 ARG14-NH1
116 ARG14-NH2
117 ARG14-C
118 ARG14-O
119 GLN15-N
120 GLN15-CA
121 GLN15-CB
122 GLN15-CG
123 GLN15-CD
124 GLN15-OE1
125 GLN15-NE2
126 GLN15-C
127 GLN15-O
128 GLY16-N
129 GLY16-CA
130 GLY16-C
131 GLY16-O
132 PHE17-N
133 PHE17-CA
134 PHE17-CB
135 PHE17-CG
136 PHE17-CD1
137 PHE17-CD2
138 PHE17-CE1
139 PHE17-CE2
140 PHE17-CZ
141 PHE17-C
142 PHE17-O
143 ASP18-N
144 ASP18-CA
145 ASP18-CB
146 ASP18-CG
147 ASP18-OD1
148 ASP18-OD2
149 ASP18-C
150 ASP18-O
151 GLU19-N
152 GLU19-CA
153 GLU19-CB
154 GLU19-CG
155 GLU19-CD
156 GLU19-OE1
157 GLU19-OE2
158 GLU19-C
159 GLU19-O
160 ALA20-N
161 ALA20-CA
162 ALA20-CB
163 ALA20-C
164 ALA20-O
165 LYS21-N
166 LYS21-CA
167 LYS21-CB
168 LYS21-CG
169 LYS21-CD
170 LYS21-CE
171 LYS21-NZ
172 LYS21-C
173 LYS21-O
174 LEU22-N
175 LEU22-CA
176 LEU22-CB
177 LEU22-CG
178 LEU22-CD1
179 LEU22-CD2
180 LEU22-C
181 LEU22-O
182 ARG23-N
183 ARG23-CA
184 ARG23-CB
185 ARG23-CG
186 ARG23-CD
187 ARG23-NE
188 ARG23-CZ
189 ARG23-NH1
190 ARG23-NH2
191 ARG23-C
192 ARG23-O
193 ASP24-N
194 ASP24-CA
195 ASP24-CB
196 ASP24-CG
197 ASP24-OD1
198 ASP24-OD2
199 ASP24-C
200 ASP24-O
201 TRP25-N
202 TRP25-CA
203 TRP25-CB
204 TRP25-CG
205 TRP25-CD2
206 TRP25-CD1
207 TRP25-NE1
208 TRP25-CE2
209 TRP25-CE3
210 TRP25-CZ2
211 TRP25-CZ3
212 TRP25-CH2
213 TRP25-C
214 TRP25-O
215 VAL26-N
216 VAL26-CA
217 VAL26-CB
218 VAL26-CG1
219 VAL26-CG2
220 VAL26-C
221 VAL26-O
222 CYS27-N
223 CYS27-CA
224 CYS27-CB
225 CYS27-SG
226 CYS27-C
227 CYS27-O
228 LEU28-N
229 LEU28-CA
230 LEU28-CB
231 LEU28-CG
232 LEU28-CD1
233 LEU28-CD2
234 LEU28-C
235 LEU28-O
236 VAL29-N
237 VAL29-CA
238 VAL29-CB
239 VAL29-CG1
240 VAL29-CG2
241 VAL29-C
242 VAL29-O
243 GLU30-N
244 GLU30-CA
245 GLU30-CB
246 GLU30-CG
247 GLU30-CD
248 GLU30-OE1
249 GLU30-OE2
250 GLU30-C
251 GLU30-O
252 ASN31-N
253 ASN31-CA
254 ASN31-CB
255 ASN31-CG
256 ASN31-OD1
257 ASN31-ND2
258 ASN31-C
259 ASN31-O
260 GLU32-N
261 GLU32-CA
262 GLU32-CB
263 GLU32-CG
264 GLU32-CD
265 GLU32-OE1
266 GLU32-OE2
267 GLU32-C
268 GLU32-O
269 SER33-N
270 SER33-CA
271 SER33-CB
272 SER33-OG
273 SER33-C
274 SER33-O
275 ARG34-N
276 ARG34-CA
277 ARG34-CB
278 ARG34-CG
279 ARG34-CD
280 ARG34-NE
281 ARG34-CZ
282 ARG34-NH1
283 ARG34-NH2
284 ARG34-C
285 ARG34-O
286 GLY35-N
287 GLY35-CA
288 GLY35-C
289 GLY35-O
290 ARG36-N
291 ARG36-CA
292 ARG36-CB
293 ARG36-CG
294 ARG36-CD
295 ARG36-NE
296 ARG36-CZ
297 ARG36-NH1
298 ARG36-NH2
299 ARG36-C
300 ARG36-O
301 THR37-N
302 THR37-CA
303 THR37-CB
304 THR37-OG1
305 THR37-CG2
306 THR37-C
307 THR37-O
308 ASP38-N
309 ASP38-CA
310 ASP38-CB
311 ASP38-CG
312 ASP38-OD1
313 ASP38-OD2
314 ASP38-C
315 ASP38-O
316 ILE39-N
317 ILE39-CA
318 ILE39-CB
319 ILE39-CG1
320 ILE39-CG2
321 ILE39-CD1
322 ILE39-C
323 ILE39-O
324 VAL40-N
325 VAL40-CA
326 VAL40-CB
327 VAL40-CG1
328 VAL40-CG2
329 VAL40-C
330 VAL40-O
331 GLY41-N
332 GLY41-CA
333 GLY41-C
334 GLY41-O
335 LYS42-N
336 LYS42-CA
337 LYS42-CB
338 LYS42-CG
339 LYS42-CD
340 LYS42-CE
341 LYS42-NZ
342 LYS42-C
343 LYS42-O
344 PRO43-N
345 PRO43-CA
346 PRO43-CD
347 PRO43-CB
348 PRO43-CG
349 PRO43-C
350 PRO43-O
351 ASN44-N
352 ASN44-CA
353 ASN44-CB
354 ASN44-CG
355 ASN44-OD1
356 ASN44-ND2
357 ASN44-C
358 ASN44-O
359 LYS45-N
360 LYS45-CA
361 LYS45-CB
362 LYS45-CG
363 LYS45-CD
364 LYS45-CE
365 LYS45-NZ
366 LYS45-C
367 LYS45-O
368 ASN46-N
369 ASN46-CA
370 ASN46-CB
371 ASN46-CG
372 ASN46-OD1
373 ASN46-ND2
374 ASN46-C
375 ASN46-O
376 GLY47-N
377 GLY47-CA
378 GLY47-C
379 GLY47-O
380 SER48-N
381 SER48-CA
382 SER48-CB
383 SER48-OG
384 SER48-C
385 SER48-O
386 ARG49-N
387 ARG49-CA
388 ARG49-CB
389 ARG49-CG
390 ARG49-CD
391 ARG49-NE
392 ARG49-CZ
393 ARG49-NH1
394 ARG49-NH2
395 ARG49-C
396 ARG49-O
397 ASP50-N
398 ASP50-CA
399 ASP50-CB
400 ASP50-CG
401 ASP50-OD1
402 ASP50-OD2
403 ASP50-C
404 ASP50-O
405 TYR51-N
406 TYR51-CA
407 TYR51-CB
408 TYR51-CG
409 TYR51-CD1
410 TYR51-CD2
411 TYR51-CE1
412 TYR51-CE2
413 TYR51-CZ
414 TYR51-OH
415 TYR51-C
416 TYR51-O
417 GLY52-N
418 GLY52-CA
419 GLY52-C
420 GLY52-O
421 LEU53-N
422 LEU53-CA
423 LEU53-CB
424 LEU53-CG
425 LEU53-CD1
426 LEU53-CD2
427 LEU53-C
428 LEU53-O
429 PHE54-N
430 PHE54-CA
431 PHE54-CB
432 PHE54-CG
433 PHE54-CD1
434 PHE54-CD2
435 PHE54-CE1
436 PHE54-CE2
437 PHE54-CZ
438 PHE54-C
439 PHE54-O
440 GLN55-N
441 GLN55-CA
442 GLN55-CB
443 GLN55-CG
444 GLN55-CD
445 GLN55-OE1
446 GLN55-NE2
447 GLN55-C
448 GLN55-O
449 ILE56-N
450 ILE56-CA
451 ILE56-CB
452 ILE56-CG1
453 ILE56-CG2
454 ILE56-CD1
455 ILE56-C
456 ILE56-O
457 ASN57-N
458 ASN57-CA
459 ASN57-CB
460 ASN57-CG
461 ASN57-OD1
462 ASN57-ND2
463 ASN57-C
464 ASN57-O
465 ASP58-N
466 ASP58-CA
467 ASP58-CB
468 ASP58-CG
469 ASP58-OD1
470 ASP58-OD2
471 ASP58-C
472 ASP58-O
473 LYS59-N
474 LYS59-CA
475 LYS59-CB
476 LYS59-CG
477 LYS59-CD
478 LYS59-CE
479 LYS59-NZ
480 LYS59-C
481 LYS59-O
482 TYR60-N
483 TYR60-CA
484 TYR60-CB
485 TYR60-CG
486 TYR60-CD1
487 TYR60-CD2
488 TYR60-CE1
489 TYR60-CE2
490 TYR60-CZ
491 TYR60-OH
492 TYR60-C
493 TYR60-O
494 TRP61-N
495 TRP61-CA
496 TRP61-CB
497 TRP61-CG
498 TRP61-CD2
499 TRP61-CD1
500 TRP61-NE1
501 TRP61-CE2
502 TRP61-CE3
503 TRP61-CZ2
504 TRP61-CZ3
505 TRP61-CH2
506 TRP61-C
507 TRP61-O
508 CYS62-N
509 CYS62-CA
510 CYS62-CB
511 CYS62-SG
512 CYS62-C
513 CYS62-O
514 SER63-N
515 SER63-CA
516 SER63-CB
517 SER63-OG
518 SER63-C
519 SER63-O
520 ASN64-N
521 ASN64-CA
522 ASN64-CB
523 ASN64-CG
524 ASN64-OD1
525 ASN64-ND2
526 ASN64-C
527 ASN64-O
528 THR65-N
529 THR65-CA
530 THR65-CB
531 THR65-OG1
532 THR65-CG2
533 THR65-C
534 THR65-O
535 SER66-N
536 SER66-CA
537 SER66-CB
538 SER66-OG
539 SER66-C
540 SER66-O
541 LYS67-N
542 LYS67-CA
543 LYS67-CB
544 LYS67-CG
545 LYS67-CD
546 LYS67-CE
547 LYS67-NZ
548 LYS67-C
549 LYS67-O
550 ALA68-N
551 ALA68-CA
552 ALA68-CB
553 ALA68-C
554 ALA68-O
555 GLY69-N
556 GLY69-CA
557 GLY69-C
558 GLY69-O
559 LYS70-N
560 LYS70-CA
561 LYS70-CB
562 LYS70-CG
563 LYS70-CD
564 LYS70-CE
565 LYS70-NZ
566 LYS70-C
567 LYS70-O
568 ASP71-N
569 ASP71-CA
570 ASP71-CB
571 ASP71-CG
572 ASP71-OD1
573 ASP71-OD2
574 ASP71-C
575 ASP71-O
576 CYS72-N
577 CYS72-CA
578 CYS72-CB
579 CYS72-SG
580 CYS72-C
581 CYS72-O
582 ASN73-N
583 ASN73-CA
584 ASN73-CB
585 ASN73-CG
586 ASN73-OD1
587 ASN73-ND2
588 ASN73-C
589 ASN73-O
590 ILE74-N
591 ILE74-CA
592 ILE74-CB
593 ILE74-CG1
594 ILE74-CG2
595 ILE74-CD1
596 ILE74-C
597 ILE74-O
598 THR75-N
599 THR75-CA
600 THR75-CB
601 THR75-OG1
602 THR75-CG2
603 THR75-C
604 THR75-O
605 CYS76-N
606 CYS76-CA
607 CYS76-CB
608 CYS76-SG
609 CYS76-C
610 CYS76-O
611 SER77-N
612 SER77-CA
613 SER77-CB
614 SER77-OG
615 SER77-C
616 SER77-O
617 GLN78-N
618 GLN78-CA
619 GLN78-CB
620 GLN78-CG
621 GLN78-CD
622 GLN78-OE1
623 GLN78-NE2
624 GLN78-C
625 GLN78-O
626 LEU79-N
627 LEU79-CA
628 LEU79-CB
629 LEU79-CG
630 LEU79-CD1
631 LEU79-CD2
632 LEU79-C
633 LEU79-O
634 LEU80-N
635 LEU80-CA
636 LEU80-CB
637 LEU80-CG
638 LEU80-CD1
639 LEU80-CD2
640 LEU80-C
641 LEU80-O
642 THR81-N
643 THR81-CA
644 THR81-CB
645 THR81-OG1
646 THR81-CG2
647 THR81-C
648 THR81-O
649 ASP82-N
650 ASP82-CA
651 ASP82-CB
652 ASP82-CG
653 ASP82-OD1
654 ASP82-OD2
655 ASP82-C
656 ASP82-O
657 ASP83-N
658 ASP83-CA
659 ASP83-CB
660 ASP83-CG
661 ASP83-OD1
662 ASP83-OD2
663 ASP83-C
664 ASP83-O
665 ILE84-N
666 ILE84-CA
667 ILE84-CB
668 ILE84-CG1
669 ILE84-CG2
670 ILE84-CD1
671 ILE84-C
672 ILE84-O
673 THR85-N
674 THR85-CA
675 THR85-CB
676 THR85-OG1
677 THR85-CG2
678 THR85-C
679 THR85-O
680 VAL86-N
681 VAL86-CA
682 VAL86-CB
683 VAL86-CG1
684 VAL86-CG2
685 VAL86-C
686 VAL86-O
687 ALA87-N
688 ALA87-CA
689 ALA87-CB
690 ALA87-C
691 ALA87-O
692 SER88-N
693 SER88-CA
694 SER88-CB
695 SER88-OG
696 SER88-C
697 SER88-O
698 LYS89-N
699 LYS89-CA
700 LYS89-CB
701 LYS89-CG
702 LYS89-CD
703 LYS89-CE
704 LYS89-NZ
705 LYS89-C
706 LYS89-O
707 CYS90-N
708 CYS90-CA
709 CYS90-CB
710 CYS90-SG
711 CYS90-C
712 CYS90-O
713 ALA91-N
714 ALA91-CA
715 ALA91-CB
716 ALA91-C
717 ALA91-O
718 LYS92-N
719 LYS92-CA
720 LYS92-CB
721 LYS92-CG
722 LYS92-CD
723 LYS92-CE
724 LYS92-NZ
725 LYS92-C
726 LYS92-O
727 LYS93-N
728 LYS93-CA
729 LYS93-CB
730 LYS93-CG
731 LYS93-CD
732 LYS93-CE
733 LYS93-NZ
734 LYS93-C
735 LYS93-O
736 VAL94-N
737 VAL94-CA
738 VAL94-CB
739 VAL94-CG1
740 VAL94-CG2
741 VAL94-C
742 VAL94-O
743 TYR95-N
744 TYR95-CA
745 TYR95-CB
746 TYR95-CG
747 TYR95-CD1
748 TYR95-CD2
749 TYR95-CE1
750 TYR95-CE2
751 TYR95-CZ
752 TYR95-OH
753 TYR95-C
754 TYR95-O
755 LYS96-N
756 LYS96-CA
757 LYS96-CB
758 LYS96-CG
759 LYS96-CD
760 LYS96-CE
761 LYS96-NZ
762 LYS96-C
763 LYS96-O
764 ARG97-N
765 ARG97-CA
766 ARG97-CB
767 ARG97-CG
768 ARG97-CD
769 ARG97-NE
770 ARG97-CZ
771 ARG97-NH1
772 ARG97-NH2
773 ARG97-C
774 ARG97-O
775 HIS98-N
776 HIS98-CA
777 HIS98-ND1
778 HIS98-CG
779 HIS98-CB
780 HIS98-NE2
781 HIS98-CD2
782 HIS98-CE1
783 HIS98-C
784 HIS98-O
785 ASN99-N
786 ASN99-CA
787 ASN99-CB
788 ASN99-CG
789 ASN99-OD1
790 ASN99-ND2
791 ASN99-C
792 ASN99-O
793 PHE100-N
794 PHE100-CA
795 PHE100-CB
796 PHE100-CG
797 PHE100-CD1
798 PHE100-CD2
799 PHE100-CE1
800 PHE100-CE2
801 PHE100-CZ
802 PHE100-C
803 PHE100-O
804 MET101-N
805 MET101-CA
806 MET101-CB
807 MET101-CG
808 MET101-SD
809 MET101-CE
810 MET101-C
811 MET101-O
812 ALA102-N
813 ALA102-CA
814 ALA102-CB
815 ALA102-C
816 ALA102-O
817 TRP103-N
818 TRP103-CA
819 TRP103-CB
820 TRP103-CG
821 TRP103-CD2
822 TRP103-CD1
823 TRP103-NE1
824 TRP103-CE2
825 TRP103-CE3
826 TRP103-CZ2
827 TRP103-CZ3
828 TRP103-CH2
829 TRP103-C
830 TRP103-O
831 TYR104-N
832 TYR104-CA
833 TYR104-CB
834 TYR104-CG
835 TYR104-CD1
836 TYR104-CD2
837 TYR104-CE1
838 TYR104-CE2
839 TYR104-CZ
840 TYR104-OH
841 TYR104-C
842 TYR104-O
843 GLY105-N
844 GLY105-CA
845 GLY105-C
846 GLY105-O
847 TRP106-N
848 TRP106-CA
849 TRP106-CB
850 TRP106-CG
851 TRP106-CD2
852 TRP106-CD1
853 TRP106-NE1
854 TRP106-CE2
855 TRP106-CE3
856 TRP106-CZ2
857 TRP106-CZ3
858 TRP106-CH2
859 TRP106-C
860 TRP106-O
861 ARG107-N
862 ARG107-CA
863 ARG107-CB
864 ARG107-CG
865 ARG107-CD
866 ARG107-NE
867 ARG107-CZ
868 ARG107-NH1
869 ARG107-NH2
870 ARG107-C
871 ARG107-O
872 ASN108-N
873 ASN108-CA
874 ASN108-CB
875 ASN108-CG
876 ASN108-OD1
877 ASN108-ND2
878 ASN108-C
879 ASN108-O
880 HIS109-N
881 HIS109-CA
882 HIS109-ND1
883 HIS109-CG
884 HIS109-CB
885 HIS109-NE2
886 HIS109-CD2
887 HIS109-CE1
888 HIS109-C
889 HIS109-O
890 CYS110-N
891 CYS110-CA
892 CYS110-CB
893 CYS110-SG
894 CYS110-C
895 CYS110-O
896 GLN111-N
897 GLN111-CA
898 GLN111-CB
899 GLN111-CG
900 GLN111-CD
901 GLN111-OE1
902 GLN111-NE2
903 GLN111-C
904 GLN111-O
905 ASN112-N
906 ASN112-CA
907 ASN112-CB
908 ASN112-CG
909 ASN112-OD1
910 ASN112-ND2
911 ASN112-C
912 ASN112-O
913 LYS113-N
914 LYS113-CA
915 LYS113-CB
916 LYS113-CG
917 LYS113-CD
918 LYS113-CE
919 LYS113-NZ
920 LYS113-C
921 LYS113-O
922 PRO114-N
923 PRO114-CA
924 PRO114-CD
925 PRO114-CB
926 PRO114-CG
927 PRO114-C
928 PRO114-O
929 LEU115-N
930 LEU115-CA
931 LEU115-CB
932 LEU115-CG
933 LEU115-CD1
934 LEU115-CD2
935 LEU115-C
936 LEU115-O
937 PRO116-N
938 PRO116-CA
939 PRO116-CD
940 PRO116-CB
941 PRO116-CG
942 PRO116-C
943 PRO116-O
944 ASP117-N
945 ASP117-CA
946 ASP117-CB
947 ASP117-CG
948 ASP117-OD1
949 ASP117-OD2
950 ASP117-C
951 ASP117-O
952 ILE118-N
953 ILE118-CA
954 ILE118-CB
955 ILE118-CG1
956 ILE118-CG2
957 ILE118-CD1
958 ILE118-C
959 ILE118-O
960 SER119-N
961 SER119-CA
962 SER119-CB
963 SER119-OG
964 SER119-C
965 SER119-O
966 LYS120-N
967 LYS120-CA
968 LYS120-CB
969 LYS120-CG
970 LYS120-CD
971 LYS120-CE
972 LYS120-NZ
973 LYS120-C
974 LYS120-O
975 CYS121-N
976 CYS121-CA
977 CYS121-CB
978 CYS121-SG
979 CYS121-C
980 CYS121-O
981 CYS121-OXT
982 NDG122-C1
983 NDG122-C2
984 NDG122-C3
985 NDG122-C4
986 NDG122-C5
987 NDG122-C6
988 NDG122-C7
989 NDG122-C8
990 NDG122-O
991 NDG122-O3
992 NDG122-O4
993 NDG122-O6
994 NDG122-O7
995 NDG122-N2
996 NDG122-O1L
In [15]:
# сохраним pdb без лиганда
u2 = u.atom_slice(range(982))
u2.save_pdb('glam.pdb', force_overwrite=True)
In [16]:
lig = u.atom_slice(range(982,997))
gcenter = [lig.xyz[:,:,0].mean()*10,lig.xyz[:,:,1].mean()*10,lig.xyz[:,:,2].mean()*10]
gcenter
Out[16]:
[39.70479726791382, 43.16333293914795, 26.883130073547363]

Подготовка белка для докинга

In [17]:
prot = next(oddt.toolkit.readfile('pdb','glam.pdb'))

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: 14021.05399999997
In [20]:
smiles = ['O=C(NC1C(O)C(O)C(OC1O)CO)C', '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)C1=CC=CC=C1','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)
    images.append((SVG(copy.deepcopy(m).write('svg'))))
    
display_svg(*images)
O N H HO OH O OH OH
O N H HO OH O OH OH OH
O N H HO OH O OH OH H3N+
O N H HO OH O OH OH
O N H OH OH O HO OH
O N H HO OH O OH OH O- O

Докинг

In [31]:
#create docking object
dock_obj= oddt.docking.AutodockVina.autodock_vina(
    protein=prot,size=(20,20,20),center=gcenter,
    executable='bin/vina',autocleanup=True, num_modes=9)

print(dock_obj.tmp_dir)
print(" ".join(dock_obj.params))
/tmp/autodock_vina_temtxgld
--center_x 39.70479726791382 --center_y 43.16333293914795 --center_z 26.883130073547363 --size_x 20 --size_y 20 --size_z 20 --exhaustiveness 8 --num_modes 9 --energy_range 3

Сначала - координаты геометрического центра, затем - объем, в котором могут перемещаться атомы лигандов при докинге, время поиска минимума энергии, количество моделей, разница в энергиях лучшей и худшей модели.

In [33]:
res = dock_obj.dock(mols,prot)

Результаты докинга

In [35]:
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  C8H15NO6    -5.6   0.000     UNL
   1  C8H15NO6    -5.1   5.143     UNL
   2  C8H15NO6    -4.8   5.077     UNL
   3  C8H15NO6    -4.8   2.819     UNL
   4  C8H15NO6    -4.8   4.302     UNL
   5  C8H15NO6    -4.8   2.998     UNL
   6  C8H15NO6    -4.7   3.938     UNL
   7  C8H15NO6    -4.7   3.546     UNL
   8  C8H15NO6    -4.6   4.889     UNL
   9  C7H13NO7    -5.1   0.000     UNL
  10  C7H13NO7    -4.8   3.447     UNL
  11  C7H13NO7    -4.8   2.208     UNL
  12  C7H13NO7    -4.8   3.488     UNL
  13  C7H13NO7    -4.7   3.058     UNL
  14  C7H13NO7    -4.7   4.671     UNL
  15  C7H13NO7    -4.5   4.658     UNL
  16  C7H13NO7    -4.5   5.305     UNL
  17  C7H13NO7    -4.4   4.108     UNL
  18C7H15N2O6+    -5.2   0.000     UNL
  19C7H15N2O6+    -4.9   2.736     UNL
  20C7H15N2O6+    -4.8   3.792     UNL
  21C7H15N2O6+    -4.8   3.909     UNL
  22C7H15N2O6+    -4.7   2.517     UNL
  23C7H15N2O6+    -4.7   4.383     UNL
  24C7H15N2O6+    -4.6   4.992     UNL
  25C7H15N2O6+    -4.6   5.101     UNL
  26C7H15N2O6+    -4.6   2.004     UNL
  27  C7H13NO6    -4.8   0.000     UNL
  28  C7H13NO6    -4.7   3.355     UNL
  29  C7H13NO6    -4.6   3.552     UNL
  30  C7H13NO6    -4.5   3.176     UNL
  31  C7H13NO6    -4.4   4.848     UNL
  32  C7H13NO6    -4.3   4.073     UNL
  33  C7H13NO6    -4.2   4.695     UNL
  34  C7H13NO6    -4.1   3.051     UNL
  35  C7H13NO6    -4.1   4.546     UNL
  36 C13H17NO6    -6.1   0.000     UNL
  37 C13H17NO6    -5.9   4.099     UNL
  38 C13H17NO6    -5.8   5.233     UNL
  39 C13H17NO6    -5.7   6.810     UNL
  40 C13H17NO6    -5.5   5.726     UNL
  41 C13H17NO6    -5.4   4.689     UNL
  42 C13H17NO6    -5.4   6.528     UNL
  43 C13H17NO6    -5.4   8.129     UNL
  44 C13H17NO6    -5.4   6.267     UNL
  45 C8H12NO8-    -5.1   0.000     UNL
  46 C8H12NO8-    -5.0   4.367     UNL
  47 C8H12NO8-    -4.9   3.976     UNL
  48 C8H12NO8-    -4.8   6.392     UNL
  49 C8H12NO8-    -4.8   4.765     UNL
  50 C8H12NO8-    -4.8   5.773     UNL
  51 C8H12NO8-    -4.7   6.098     UNL
  52 C8H12NO8-    -4.7   5.399     UNL
  53 C8H12NO8-    -4.7   6.573     UNL
In [36]:
import pandas as pd
In [40]:
results_df = pd.DataFrame([[Chem.rdMolDescriptors.CalcMolFormula(r.Mol), r.data['vina_affinity'],  r.data['vina_rmsd_ub'], r.residues[0].name] for r in res],
                          columns=['formula', 'affinity', 'rmsd', 'name'])
results_df.sort_values(by=['affinity'], ascending=False)
Out[40]:
formula affinity rmsd name
36 C13H17NO6 -6.1 0.000 UNL
37 C13H17NO6 -5.9 4.099 UNL
38 C13H17NO6 -5.8 5.233 UNL
39 C13H17NO6 -5.7 6.810 UNL
0 C8H15NO6 -5.6 0.000 UNL
40 C13H17NO6 -5.5 5.726 UNL
42 C13H17NO6 -5.4 6.528 UNL
41 C13H17NO6 -5.4 4.689 UNL
43 C13H17NO6 -5.4 8.129 UNL
44 C13H17NO6 -5.4 6.267 UNL
18 C7H15N2O6+ -5.2 0.000 UNL
9 C7H13NO7 -5.1 0.000 UNL
45 C8H12NO8- -5.1 0.000 UNL
1 C8H15NO6 -5.1 5.143 UNL
46 C8H12NO8- -5.0 4.367 UNL
47 C8H12NO8- -4.9 3.976 UNL
19 C7H15N2O6+ -4.9 2.736 UNL
21 C7H15N2O6+ -4.8 3.909 UNL
48 C8H12NO8- -4.8 6.392 UNL
49 C8H12NO8- -4.8 4.765 UNL
50 C8H12NO8- -4.8 5.773 UNL
27 C7H13NO6 -4.8 0.000 UNL
2 C8H15NO6 -4.8 5.077 UNL
20 C7H15N2O6+ -4.8 3.792 UNL
3 C8H15NO6 -4.8 2.819 UNL
4 C8H15NO6 -4.8 4.302 UNL
5 C8H15NO6 -4.8 2.998 UNL
10 C7H13NO7 -4.8 3.447 UNL
11 C7H13NO7 -4.8 2.208 UNL
12 C7H13NO7 -4.8 3.488 UNL
22 C7H15N2O6+ -4.7 2.517 UNL
23 C7H15N2O6+ -4.7 4.383 UNL
52 C8H12NO8- -4.7 5.399 UNL
51 C8H12NO8- -4.7 6.098 UNL
6 C8H15NO6 -4.7 3.938 UNL
7 C8H15NO6 -4.7 3.546 UNL
13 C7H13NO7 -4.7 3.058 UNL
14 C7H13NO7 -4.7 4.671 UNL
53 C8H12NO8- -4.7 6.573 UNL
28 C7H13NO6 -4.7 3.355 UNL
8 C8H15NO6 -4.6 4.889 UNL
29 C7H13NO6 -4.6 3.552 UNL
26 C7H15N2O6+ -4.6 2.004 UNL
25 C7H15N2O6+ -4.6 5.101 UNL
24 C7H15N2O6+ -4.6 4.992 UNL
16 C7H13NO7 -4.5 5.305 UNL
30 C7H13NO6 -4.5 3.176 UNL
15 C7H13NO7 -4.5 4.658 UNL
17 C7H13NO7 -4.4 4.108 UNL
31 C7H13NO6 -4.4 4.848 UNL
32 C7H13NO6 -4.3 4.073 UNL
33 C7H13NO6 -4.2 4.695 UNL
35 C7H13NO6 -4.1 4.546 UNL
34 C7H13NO6 -4.1 3.051 UNL
In [44]:
analyze = [0, 8, 16, 22, 30, 34, 46,52]

print("i\tformula\thbonds_num\thbonds_strict\tstack_num\tstack_par\tstack_per\thydroph_num")

for i,r in enumerate(res):
    if i not in analyze:
        continue
    
    formula = Chem.rdMolDescriptors.CalcMolFormula(r.Mol)
    
    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)
    
    print(i,"\t",formula,"\t",hbonds_num,"\t","\t",hbonds_strict,"\t","\t",stack_num,"\t","\t",stack_par,"\t","\t",stack_per,"\t","\t",hydroph_num)
i	formula	hbonds_num	hbonds_strict	stack_num	stack_par	stack_per	hydroph_num
0 	 C8H15NO6 	 5 	 	 3 	 	 0 	 	 0 	 	 0 	 	 3
8 	 C8H15NO6 	 7 	 	 5 	 	 0 	 	 0 	 	 0 	 	 2
16 	 C7H13NO7 	 8 	 	 7 	 	 0 	 	 0 	 	 0 	 	 0
22 	 C7H15N2O6+ 	 5 	 	 3 	 	 0 	 	 0 	 	 0 	 	 0
30 	 C7H13NO6 	 3 	 	 3 	 	 0 	 	 0 	 	 0 	 	 0
34 	 C7H13NO6 	 7 	 	 6 	 	 0 	 	 0 	 	 0 	 	 0
46 	 C8H12NO8- 	 3 	 	 3 	 	 0 	 	 0 	 	 0 	 	 0
52 	 C8H12NO8- 	 4 	 	 4 	 	 0 	 	 0 	 	 0 	 	 0

Визуализация

In [45]:
for i,r in enumerate(res):
    r.write(filename='r%s.pdb' % i, format='pdb')
In [46]:
from IPython.display import Image
In [48]:
display(Image('r0.png'))
In [50]:
display(Image('r10.png'))
In [ ]: