Практикум 9. Докинг низкомолекулярных лигандов в структуру белка

In [3]:
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 [8]:
import mdtraj as md
u = md.load('TRINI_L.B99990001.pdb')
pdb = u.topology
for i,r in enumerate(pdb.atoms):
    print(i,r, end=("\t" if i % 8 else "\n"))
    #посмотрим на атомы
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 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 VAL6-N	46 VAL6-CA	47 VAL6-CB	48 VAL6-CG1
49 VAL6-CG2	50 VAL6-C	51 VAL6-O	52 PHE7-N	53 PHE7-CA	54 PHE7-CB	55 PHE7-CG	56 PHE7-CD1
57 PHE7-CD2	58 PHE7-CE1	59 PHE7-CE2	60 PHE7-CZ	61 PHE7-C	62 PHE7-O	63 LEU8-N	64 LEU8-CA
65 LEU8-CB	66 LEU8-CG	67 LEU8-CD1	68 LEU8-CD2	69 LEU8-C	70 LEU8-O	71 LEU9-N	72 LEU9-CA
73 LEU9-CB	74 LEU9-CG	75 LEU9-CD1	76 LEU9-CD2	77 LEU9-C	78 LEU9-O	79 ALA10-N	80 ALA10-CA
81 ALA10-CB	82 ALA10-C	83 ALA10-O	84 LEU11-N	85 LEU11-CA	86 LEU11-CB	87 LEU11-CG	88 LEU11-CD1
89 LEU11-CD2	90 LEU11-C	91 LEU11-O	92 ALA12-N	93 ALA12-CA	94 ALA12-CB	95 ALA12-C	96 ALA12-O
97 ALA13-N	98 ALA13-CA	99 ALA13-CB	100 ALA13-C	101 ALA13-O	102 LEU14-N	103 LEU14-CA	104 LEU14-CB
105 LEU14-CG	106 LEU14-CD1	107 LEU14-CD2	108 LEU14-C	109 LEU14-O	110 CYS15-N	111 CYS15-CA	112 CYS15-CB
113 CYS15-SG	114 CYS15-C	115 CYS15-O	116 ILE16-N	117 ILE16-CA	118 ILE16-CB	119 ILE16-CG1	120 ILE16-CG2
121 ILE16-CD1	122 ILE16-C	123 ILE16-O	124 SER17-N	125 SER17-CA	126 SER17-CB	127 SER17-OG	128 SER17-C
129 SER17-O	130 CYS18-N	131 CYS18-CA	132 CYS18-CB	133 CYS18-SG	134 CYS18-C	135 CYS18-O	136 GLU19-N
137 GLU19-CA	138 GLU19-CB	139 GLU19-CG	140 GLU19-CD	141 GLU19-OE1	142 GLU19-OE2	143 GLU19-C	144 GLU19-O
145 ALA20-N	146 ALA20-CA	147 ALA20-CB	148 ALA20-C	149 ALA20-O	150 LYS21-N	151 LYS21-CA	152 LYS21-CB
153 LYS21-CG	154 LYS21-CD	155 LYS21-CE	156 LYS21-NZ	157 LYS21-C	158 LYS21-O	159 TYR22-N	160 TYR22-CA
161 TYR22-CB	162 TYR22-CG	163 TYR22-CD1	164 TYR22-CD2	165 TYR22-CE1	166 TYR22-CE2	167 TYR22-CZ	168 TYR22-OH
169 TYR22-C	170 TYR22-O	171 PHE23-N	172 PHE23-CA	173 PHE23-CB	174 PHE23-CG	175 PHE23-CD1	176 PHE23-CD2
177 PHE23-CE1	178 PHE23-CE2	179 PHE23-CZ	180 PHE23-C	181 PHE23-O	182 ALA24-N	183 ALA24-CA	184 ALA24-CB
185 ALA24-C	186 ALA24-O	187 THR25-N	188 THR25-CA	189 THR25-CB	190 THR25-OG1	191 THR25-CG2	192 THR25-C
193 THR25-O	194 ASN26-N	195 ASN26-CA	196 ASN26-CB	197 ASN26-CG	198 ASN26-OD1	199 ASN26-ND2	200 ASN26-C
201 ASN26-O	202 CYS27-N	203 CYS27-CA	204 CYS27-CB	205 CYS27-SG	206 CYS27-C	207 CYS27-O	208 GLU28-N
209 GLU28-CA	210 GLU28-CB	211 GLU28-CG	212 GLU28-CD	213 GLU28-OE1	214 GLU28-OE2	215 GLU28-C	216 GLU28-O
217 LEU29-N	218 LEU29-CA	219 LEU29-CB	220 LEU29-CG	221 LEU29-CD1	222 LEU29-CD2	223 LEU29-C	224 LEU29-O
225 VAL30-N	226 VAL30-CA	227 VAL30-CB	228 VAL30-CG1	229 VAL30-CG2	230 VAL30-C	231 VAL30-O	232 HIS31-N
233 HIS31-CA	234 HIS31-ND1	235 HIS31-CG	236 HIS31-CB	237 HIS31-NE2	238 HIS31-CD2	239 HIS31-CE1	240 HIS31-C
241 HIS31-O	242 GLU32-N	243 GLU32-CA	244 GLU32-CB	245 GLU32-CG	246 GLU32-CD	247 GLU32-OE1	248 GLU32-OE2
249 GLU32-C	250 GLU32-O	251 LEU33-N	252 LEU33-CA	253 LEU33-CB	254 LEU33-CG	255 LEU33-CD1	256 LEU33-CD2
257 LEU33-C	258 LEU33-O	259 ARG34-N	260 ARG34-CA	261 ARG34-CB	262 ARG34-CG	263 ARG34-CD	264 ARG34-NE
265 ARG34-CZ	266 ARG34-NH1	267 ARG34-NH2	268 ARG34-C	269 ARG34-O	270 ARG35-N	271 ARG35-CA	272 ARG35-CB
273 ARG35-CG	274 ARG35-CD	275 ARG35-NE	276 ARG35-CZ	277 ARG35-NH1	278 ARG35-NH2	279 ARG35-C	280 ARG35-O
281 GLN36-N	282 GLN36-CA	283 GLN36-CB	284 GLN36-CG	285 GLN36-CD	286 GLN36-OE1	287 GLN36-NE2	288 GLN36-C
289 GLN36-O	290 GLY37-N	291 GLY37-CA	292 GLY37-C	293 GLY37-O	294 PHE38-N	295 PHE38-CA	296 PHE38-CB
297 PHE38-CG	298 PHE38-CD1	299 PHE38-CD2	300 PHE38-CE1	301 PHE38-CE2	302 PHE38-CZ	303 PHE38-C	304 PHE38-O
305 PRO39-N	306 PRO39-CA	307 PRO39-CD	308 PRO39-CB	309 PRO39-CG	310 PRO39-C	311 PRO39-O	312 GLU40-N
313 GLU40-CA	314 GLU40-CB	315 GLU40-CG	316 GLU40-CD	317 GLU40-OE1	318 GLU40-OE2	319 GLU40-C	320 GLU40-O
321 ASP41-N	322 ASP41-CA	323 ASP41-CB	324 ASP41-CG	325 ASP41-OD1	326 ASP41-OD2	327 ASP41-C	328 ASP41-O
329 LYS42-N	330 LYS42-CA	331 LYS42-CB	332 LYS42-CG	333 LYS42-CD	334 LYS42-CE	335 LYS42-NZ	336 LYS42-C
337 LYS42-O	338 MET43-N	339 MET43-CA	340 MET43-CB	341 MET43-CG	342 MET43-SD	343 MET43-CE	344 MET43-C
345 MET43-O	346 ARG44-N	347 ARG44-CA	348 ARG44-CB	349 ARG44-CG	350 ARG44-CD	351 ARG44-NE	352 ARG44-CZ
353 ARG44-NH1	354 ARG44-NH2	355 ARG44-C	356 ARG44-O	357 ASP45-N	358 ASP45-CA	359 ASP45-CB	360 ASP45-CG
361 ASP45-OD1	362 ASP45-OD2	363 ASP45-C	364 ASP45-O	365 TRP46-N	366 TRP46-CA	367 TRP46-CB	368 TRP46-CG
369 TRP46-CD2	370 TRP46-CD1	371 TRP46-NE1	372 TRP46-CE2	373 TRP46-CE3	374 TRP46-CZ2	375 TRP46-CZ3	376 TRP46-CH2
377 TRP46-C	378 TRP46-O	379 VAL47-N	380 VAL47-CA	381 VAL47-CB	382 VAL47-CG1	383 VAL47-CG2	384 VAL47-C
385 VAL47-O	386 CYS48-N	387 CYS48-CA	388 CYS48-CB	389 CYS48-SG	390 CYS48-C	391 CYS48-O	392 LEU49-N
393 LEU49-CA	394 LEU49-CB	395 LEU49-CG	396 LEU49-CD1	397 LEU49-CD2	398 LEU49-C	399 LEU49-O	400 ILE50-N
401 ILE50-CA	402 ILE50-CB	403 ILE50-CG1	404 ILE50-CG2	405 ILE50-CD1	406 ILE50-C	407 ILE50-O	408 GLN51-N
409 GLN51-CA	410 GLN51-CB	411 GLN51-CG	412 GLN51-CD	413 GLN51-OE1	414 GLN51-NE2	415 GLN51-C	416 GLN51-O
417 ASN52-N	418 ASN52-CA	419 ASN52-CB	420 ASN52-CG	421 ASN52-OD1	422 ASN52-ND2	423 ASN52-C	424 ASN52-O
425 GLU53-N	426 GLU53-CA	427 GLU53-CB	428 GLU53-CG	429 GLU53-CD	430 GLU53-OE1	431 GLU53-OE2	432 GLU53-C
433 GLU53-O	434 SER54-N	435 SER54-CA	436 SER54-CB	437 SER54-OG	438 SER54-C	439 SER54-O	440 GLY55-N
441 GLY55-CA	442 GLY55-C	443 GLY55-O	444 ARG56-N	445 ARG56-CA	446 ARG56-CB	447 ARG56-CG	448 ARG56-CD
449 ARG56-NE	450 ARG56-CZ	451 ARG56-NH1	452 ARG56-NH2	453 ARG56-C	454 ARG56-O	455 ASN57-N	456 ASN57-CA
457 ASN57-CB	458 ASN57-CG	459 ASN57-OD1	460 ASN57-ND2	461 ASN57-C	462 ASN57-O	463 THR58-N	464 THR58-CA
465 THR58-CB	466 THR58-OG1	467 THR58-CG2	468 THR58-C	469 THR58-O	470 SER59-N	471 SER59-CA	472 SER59-CB
473 SER59-OG	474 SER59-C	475 SER59-O	476 LYS60-N	477 LYS60-CA	478 LYS60-CB	479 LYS60-CG	480 LYS60-CD
481 LYS60-CE	482 LYS60-NZ	483 LYS60-C	484 LYS60-O	485 MET61-N	486 MET61-CA	487 MET61-CB	488 MET61-CG
489 MET61-SD	490 MET61-CE	491 MET61-C	492 MET61-O	493 GLY62-N	494 GLY62-CA	495 GLY62-C	496 GLY62-O
497 THR63-N	498 THR63-CA	499 THR63-CB	500 THR63-OG1	501 THR63-CG2	502 THR63-C	503 THR63-O	504 ILE64-N
505 ILE64-CA	506 ILE64-CB	507 ILE64-CG1	508 ILE64-CG2	509 ILE64-CD1	510 ILE64-C	511 ILE64-O	512 ASN65-N
513 ASN65-CA	514 ASN65-CB	515 ASN65-CG	516 ASN65-OD1	517 ASN65-ND2	518 ASN65-C	519 ASN65-O	520 LYS66-N
521 LYS66-CA	522 LYS66-CB	523 LYS66-CG	524 LYS66-CD	525 LYS66-CE	526 LYS66-NZ	527 LYS66-C	528 LYS66-O
529 ASN67-N	530 ASN67-CA	531 ASN67-CB	532 ASN67-CG	533 ASN67-OD1	534 ASN67-ND2	535 ASN67-C	536 ASN67-O
537 GLY68-N	538 GLY68-CA	539 GLY68-C	540 GLY68-O	541 SER69-N	542 SER69-CA	543 SER69-CB	544 SER69-OG
545 SER69-C	546 SER69-O	547 ARG70-N	548 ARG70-CA	549 ARG70-CB	550 ARG70-CG	551 ARG70-CD	552 ARG70-NE
553 ARG70-CZ	554 ARG70-NH1	555 ARG70-NH2	556 ARG70-C	557 ARG70-O	558 ASP71-N	559 ASP71-CA	560 ASP71-CB
561 ASP71-CG	562 ASP71-OD1	563 ASP71-OD2	564 ASP71-C	565 ASP71-O	566 TYR72-N	567 TYR72-CA	568 TYR72-CB
569 TYR72-CG	570 TYR72-CD1	571 TYR72-CD2	572 TYR72-CE1	573 TYR72-CE2	574 TYR72-CZ	575 TYR72-OH	576 TYR72-C
577 TYR72-O	578 GLY73-N	579 GLY73-CA	580 GLY73-C	581 GLY73-O	582 LEU74-N	583 LEU74-CA	584 LEU74-CB
585 LEU74-CG	586 LEU74-CD1	587 LEU74-CD2	588 LEU74-C	589 LEU74-O	590 PHE75-N	591 PHE75-CA	592 PHE75-CB
593 PHE75-CG	594 PHE75-CD1	595 PHE75-CD2	596 PHE75-CE1	597 PHE75-CE2	598 PHE75-CZ	599 PHE75-C	600 PHE75-O
601 GLN76-N	602 GLN76-CA	603 GLN76-CB	604 GLN76-CG	605 GLN76-CD	606 GLN76-OE1	607 GLN76-NE2	608 GLN76-C
609 GLN76-O	610 ILE77-N	611 ILE77-CA	612 ILE77-CB	613 ILE77-CG1	614 ILE77-CG2	615 ILE77-CD1	616 ILE77-C
617 ILE77-O	618 ASN78-N	619 ASN78-CA	620 ASN78-CB	621 ASN78-CG	622 ASN78-OD1	623 ASN78-ND2	624 ASN78-C
625 ASN78-O	626 ASP79-N	627 ASP79-CA	628 ASP79-CB	629 ASP79-CG	630 ASP79-OD1	631 ASP79-OD2	632 ASP79-C
633 ASP79-O	634 LYS80-N	635 LYS80-CA	636 LYS80-CB	637 LYS80-CG	638 LYS80-CD	639 LYS80-CE	640 LYS80-NZ
641 LYS80-C	642 LYS80-O	643 TYR81-N	644 TYR81-CA	645 TYR81-CB	646 TYR81-CG	647 TYR81-CD1	648 TYR81-CD2
649 TYR81-CE1	650 TYR81-CE2	651 TYR81-CZ	652 TYR81-OH	653 TYR81-C	654 TYR81-O	655 TRP82-N	656 TRP82-CA
657 TRP82-CB	658 TRP82-CG	659 TRP82-CD2	660 TRP82-CD1	661 TRP82-NE1	662 TRP82-CE2	663 TRP82-CE3	664 TRP82-CZ2
665 TRP82-CZ3	666 TRP82-CH2	667 TRP82-C	668 TRP82-O	669 CYS83-N	670 CYS83-CA	671 CYS83-CB	672 CYS83-SG
673 CYS83-C	674 CYS83-O	675 SER84-N	676 SER84-CA	677 SER84-CB	678 SER84-OG	679 SER84-C	680 SER84-O
681 LYS85-N	682 LYS85-CA	683 LYS85-CB	684 LYS85-CG	685 LYS85-CD	686 LYS85-CE	687 LYS85-NZ	688 LYS85-C
689 LYS85-O	690 THR86-N	691 THR86-CA	692 THR86-CB	693 THR86-OG1	694 THR86-CG2	695 THR86-C	696 THR86-O
697 SER87-N	698 SER87-CA	699 SER87-CB	700 SER87-OG	701 SER87-C	702 SER87-O	703 THR88-N	704 THR88-CA
705 THR88-CB	706 THR88-OG1	707 THR88-CG2	708 THR88-C	709 THR88-O	710 PRO89-N	711 PRO89-CA	712 PRO89-CD
713 PRO89-CB	714 PRO89-CG	715 PRO89-C	716 PRO89-O	717 GLY90-N	718 GLY90-CA	719 GLY90-C	720 GLY90-O
721 LYS91-N	722 LYS91-CA	723 LYS91-CB	724 LYS91-CG	725 LYS91-CD	726 LYS91-CE	727 LYS91-NZ	728 LYS91-C
729 LYS91-O	730 ASP92-N	731 ASP92-CA	732 ASP92-CB	733 ASP92-CG	734 ASP92-OD1	735 ASP92-OD2	736 ASP92-C
737 ASP92-O	738 CYS93-N	739 CYS93-CA	740 CYS93-CB	741 CYS93-SG	742 CYS93-C	743 CYS93-O	744 ASN94-N
745 ASN94-CA	746 ASN94-CB	747 ASN94-CG	748 ASN94-OD1	749 ASN94-ND2	750 ASN94-C	751 ASN94-O	752 VAL95-N
753 VAL95-CA	754 VAL95-CB	755 VAL95-CG1	756 VAL95-CG2	757 VAL95-C	758 VAL95-O	759 THR96-N	760 THR96-CA
761 THR96-CB	762 THR96-OG1	763 THR96-CG2	764 THR96-C	765 THR96-O	766 CYS97-N	767 CYS97-CA	768 CYS97-CB
769 CYS97-SG	770 CYS97-C	771 CYS97-O	772 ALA98-N	773 ALA98-CA	774 ALA98-CB	775 ALA98-C	776 ALA98-O
777 GLU99-N	778 GLU99-CA	779 GLU99-CB	780 GLU99-CG	781 GLU99-CD	782 GLU99-OE1	783 GLU99-OE2	784 GLU99-C
785 GLU99-O	786 MET100-N	787 MET100-CA	788 MET100-CB	789 MET100-CG	790 MET100-SD	791 MET100-CE	792 MET100-C
793 MET100-O	794 LEU101-N	795 LEU101-CA	796 LEU101-CB	797 LEU101-CG	798 LEU101-CD1	799 LEU101-CD2	800 LEU101-C
801 LEU101-O	802 LEU102-N	803 LEU102-CA	804 LEU102-CB	805 LEU102-CG	806 LEU102-CD1	807 LEU102-CD2	808 LEU102-C
809 LEU102-O	810 ASP103-N	811 ASP103-CA	812 ASP103-CB	813 ASP103-CG	814 ASP103-OD1	815 ASP103-OD2	816 ASP103-C
817 ASP103-O	818 ASP104-N	819 ASP104-CA	820 ASP104-CB	821 ASP104-CG	822 ASP104-OD1	823 ASP104-OD2	824 ASP104-C
825 ASP104-O	826 ILE105-N	827 ILE105-CA	828 ILE105-CB	829 ILE105-CG1	830 ILE105-CG2	831 ILE105-CD1	832 ILE105-C
833 ILE105-O	834 THR106-N	835 THR106-CA	836 THR106-CB	837 THR106-OG1	838 THR106-CG2	839 THR106-C	840 THR106-O
841 LYS107-N	842 LYS107-CA	843 LYS107-CB	844 LYS107-CG	845 LYS107-CD	846 LYS107-CE	847 LYS107-NZ	848 LYS107-C
849 LYS107-O	850 ALA108-N	851 ALA108-CA	852 ALA108-CB	853 ALA108-C	854 ALA108-O	855 SER109-N	856 SER109-CA
857 SER109-CB	858 SER109-OG	859 SER109-C	860 SER109-O	861 LYS110-N	862 LYS110-CA	863 LYS110-CB	864 LYS110-CG
865 LYS110-CD	866 LYS110-CE	867 LYS110-NZ	868 LYS110-C	869 LYS110-O	870 CYS111-N	871 CYS111-CA	872 CYS111-CB
873 CYS111-SG	874 CYS111-C	875 CYS111-O	876 ALA112-N	877 ALA112-CA	878 ALA112-CB	879 ALA112-C	880 ALA112-O
881 LYS113-N	882 LYS113-CA	883 LYS113-CB	884 LYS113-CG	885 LYS113-CD	886 LYS113-CE	887 LYS113-NZ	888 LYS113-C
889 LYS113-O	890 LYS114-N	891 LYS114-CA	892 LYS114-CB	893 LYS114-CG	894 LYS114-CD	895 LYS114-CE	896 LYS114-NZ
897 LYS114-C	898 LYS114-O	899 ILE115-N	900 ILE115-CA	901 ILE115-CB	902 ILE115-CG1	903 ILE115-CG2	904 ILE115-CD1
905 ILE115-C	906 ILE115-O	907 TYR116-N	908 TYR116-CA	909 TYR116-CB	910 TYR116-CG	911 TYR116-CD1	912 TYR116-CD2
913 TYR116-CE1	914 TYR116-CE2	915 TYR116-CZ	916 TYR116-OH	917 TYR116-C	918 TYR116-O	919 LYS117-N	920 LYS117-CA
921 LYS117-CB	922 LYS117-CG	923 LYS117-CD	924 LYS117-CE	925 LYS117-NZ	926 LYS117-C	927 LYS117-O	928 ARG118-N
929 ARG118-CA	930 ARG118-CB	931 ARG118-CG	932 ARG118-CD	933 ARG118-NE	934 ARG118-CZ	935 ARG118-NH1	936 ARG118-NH2
937 ARG118-C	938 ARG118-O	939 HIS119-N	940 HIS119-CA	941 HIS119-ND1	942 HIS119-CG	943 HIS119-CB	944 HIS119-NE2
945 HIS119-CD2	946 HIS119-CE1	947 HIS119-C	948 HIS119-O	949 LYS120-N	950 LYS120-CA	951 LYS120-CB	952 LYS120-CG
953 LYS120-CD	954 LYS120-CE	955 LYS120-NZ	956 LYS120-C	957 LYS120-O	958 PHE121-N	959 PHE121-CA	960 PHE121-CB
961 PHE121-CG	962 PHE121-CD1	963 PHE121-CD2	964 PHE121-CE1	965 PHE121-CE2	966 PHE121-CZ	967 PHE121-C	968 PHE121-O
969 GLN122-N	970 GLN122-CA	971 GLN122-CB	972 GLN122-CG	973 GLN122-CD	974 GLN122-OE1	975 GLN122-NE2	976 GLN122-C
977 GLN122-O	978 ALA123-N	979 ALA123-CA	980 ALA123-CB	981 ALA123-C	982 ALA123-O	983 TRP124-N	984 TRP124-CA
985 TRP124-CB	986 TRP124-CG	987 TRP124-CD2	988 TRP124-CD1	989 TRP124-NE1	990 TRP124-CE2	991 TRP124-CE3	992 TRP124-CZ2
993 TRP124-CZ3	994 TRP124-CH2	995 TRP124-C	996 TRP124-O	997 TYR125-N	998 TYR125-CA	999 TYR125-CB	1000 TYR125-CG
1001 TYR125-CD1	1002 TYR125-CD2	1003 TYR125-CE1	1004 TYR125-CE2	1005 TYR125-CZ	1006 TYR125-OH	1007 TYR125-C	1008 TYR125-O
1009 GLY126-N	1010 GLY126-CA	1011 GLY126-C	1012 GLY126-O	1013 TRP127-N	1014 TRP127-CA	1015 TRP127-CB	1016 TRP127-CG
1017 TRP127-CD2	1018 TRP127-CD1	1019 TRP127-NE1	1020 TRP127-CE2	1021 TRP127-CE3	1022 TRP127-CZ2	1023 TRP127-CZ3	1024 TRP127-CH2
1025 TRP127-C	1026 TRP127-O	1027 ARG128-N	1028 ARG128-CA	1029 ARG128-CB	1030 ARG128-CG	1031 ARG128-CD	1032 ARG128-NE
1033 ARG128-CZ	1034 ARG128-NH1	1035 ARG128-NH2	1036 ARG128-C	1037 ARG128-O	1038 ASN129-N	1039 ASN129-CA	1040 ASN129-CB
1041 ASN129-CG	1042 ASN129-OD1	1043 ASN129-ND2	1044 ASN129-C	1045 ASN129-O	1046 HIS130-N	1047 HIS130-CA	1048 HIS130-ND1
1049 HIS130-CG	1050 HIS130-CB	1051 HIS130-NE2	1052 HIS130-CD2	1053 HIS130-CE1	1054 HIS130-C	1055 HIS130-O	1056 CYS131-N
1057 CYS131-CA	1058 CYS131-CB	1059 CYS131-SG	1060 CYS131-C	1061 CYS131-O	1062 GLN132-N	1063 GLN132-CA	1064 GLN132-CB
1065 GLN132-CG	1066 GLN132-CD	1067 GLN132-OE1	1068 GLN132-NE2	1069 GLN132-C	1070 GLN132-O	1071 GLY133-N	1072 GLY133-CA
1073 GLY133-C	1074 GLY133-O	1075 THR134-N	1076 THR134-CA	1077 THR134-CB	1078 THR134-OG1	1079 THR134-CG2	1080 THR134-C
1081 THR134-O	1082 LEU135-N	1083 LEU135-CA	1084 LEU135-CB	1085 LEU135-CG	1086 LEU135-CD1	1087 LEU135-CD2	1088 LEU135-C
1089 LEU135-O	1090 PRO136-N	1091 PRO136-CA	1092 PRO136-CD	1093 PRO136-CB	1094 PRO136-CG	1095 PRO136-C	1096 PRO136-O
1097 ASP137-N	1098 ASP137-CA	1099 ASP137-CB	1100 ASP137-CG	1101 ASP137-OD1	1102 ASP137-OD2	1103 ASP137-C	1104 ASP137-O
1105 ILE138-N	1106 ILE138-CA	1107 ILE138-CB	1108 ILE138-CG1	1109 ILE138-CG2	1110 ILE138-CD1	1111 ILE138-C	1112 ILE138-O
1113 SER139-N	1114 SER139-CA	1115 SER139-CB	1116 SER139-OG	1117 SER139-C	1118 SER139-O	1119 LYS140-N	1120 LYS140-CA
1121 LYS140-CB	1122 LYS140-CG	1123 LYS140-CD	1124 LYS140-CE	1125 LYS140-NZ	1126 LYS140-C	1127 LYS140-O	1128 CYS141-N
1129 CYS141-CA	1130 CYS141-CB	1131 CYS141-SG	1132 CYS141-C	1133 CYS141-O	1134 CYS141-OXT	1135 NAG142-C1	1136 NAG142-C2
1137 NAG142-C3	1138 NAG142-C4	1139 NAG142-C5	1140 NAG142-C6	1141 NAG142-C7	1142 NAG142-C8	1143 NAG142-N2	1144 NAG142-O3
1145 NAG142-O4	1146 NAG142-O5	1147 NAG142-O6	1148 NAG142-O7	1149 NAG143-C1	1150 NAG143-C2	1151 NAG143-C3	1152 NAG143-C4
1153 NAG143-C5	1154 NAG143-C6	1155 NAG143-C7	1156 NAG143-C8	1157 NAG143-N2	1158 NAG143-O3	1159 NAG143-O4	1160 NAG143-O5
1161 NAG143-O6	1162 NAG143-O7	1163 NDG144-C1	1164 NDG144-C2	1165 NDG144-C3	1166 NDG144-C4	1167 NDG144-C5	1168 NDG144-C6
1169 NDG144-C7	1170 NDG144-C8	1171 NDG144-O	1172 NDG144-O3	1173 NDG144-O4	1174 NDG144-O6	1175 NDG144-O7	1176 NDG144-N2
1177 NDG144-O1L	

Последний атом белка #1134.

Последний атом лиганда #1177.

In [9]:
# сохраним pdb без лиганда
u2 = u.atom_slice(range(1134 + 1))
u2.save_pdb('TRINI_L.noligand.pdb')

Дальше найдем геометрический центр лиганда.

In [11]:
ligand = u.atom_slice(range(1134 + 1, 1177 + 1))
center = np.mean(ligand.xyz, axis=1) * 10  # To angstroms
center = center.reshape(3,)
In [12]:
center
Out[12]:
array([48.082882, 31.276901, 25.860998], dtype=float32)
In [21]:
prot = next(oddt.toolkits.rdk.readfile('pdb', 'TRINI_L.noligand.pdb'))
prot.protein, prot.molwt
Out[21]:
(False, 16266.952999999963)
In [25]:
smiles = ["CC(=O)NC1C(O)OC(CO)C(O)C1O",  # NAG
          "OC(=O)NC1C(O)OC(CO)C(O)C1O",  # -OH
          "[NH3+]C(=O)NC1C(O)OC(CO)C(O)C1O",  # -NH3+
          "C(=O)NC1C(O)OC(CO)C(O)C1O",  # -H
          "C=1(C=CC=CC1)C(=O)NC1C(O)OC(CO)C(O)C1O",  # -Ph
          "C(C([O-])=O)(=O)NC1C(O)OC(CO)C(O)C1O"  # -COO-
         ]

mols= []
images =[]

for s in smiles:
    m = oddt.toolkits.rdk.readstring('smi', s)
    m.make3D(forcefield='mmff94', steps=150)

    mols.append(m)
    print(Chem.rdMolDescriptors.CalcMolFormula(m.Mol))
    images.append((SVG(copy.deepcopy(m).write('svg'))))
    
display(*images)
C8H15NO6
C7H13NO7
C7H15N2O6+
C7H13NO6
C13H17NO6
C8H12NO8-
O N H HO O OH OH OH
HO O N H HO O OH OH OH
H3N+ O N H HO O OH OH OH
O N H HO O OH OH OH
O N H OH O HO OH OH
O- O O N H HO O OH OH OH

Подготовили для докинга лиганды и белок. Отлично! Теперь... дочим!

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

print(dock_obj.tmp_dir)
print(" ".join(dock_obj.params))
./autodock_vina_z_b5weat
--center_x 48.082882 --center_y 31.276901 --center_z 25.860998 --size_x 20 --size_y 20 --size_z 20 --exhaustiveness 8 --num_modes 9 --energy_range 3
In [27]:
# do it! *do it* do it. do-it-do-it-do-it-do-it!
res = dock_obj.dock(mols, prot)

И смотрим на результат:

In [29]:
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.3   0.000     UNL
   1  C8H15NO6    -5.0   5.345     UNL
   2  C8H15NO6    -5.0   4.665     UNL
   3  C8H15NO6    -4.9   3.521     UNL
   4  C8H15NO6    -4.8   5.048     UNL
   5  C8H15NO6    -4.7   4.068     UNL
   6  C8H15NO6    -4.7   4.613     UNL
   7  C8H15NO6    -4.7   4.271     UNL
   8  C8H15NO6    -4.6   2.511     UNL
   9  C7H13NO7    -5.5   0.000     UNL
  10  C7H13NO7    -5.4   5.255     UNL
  11  C7H13NO7    -5.1   4.349     UNL
  12  C7H13NO7    -4.9   5.226     UNL
  13  C7H13NO7    -4.8   4.819     UNL
  14  C7H13NO7    -4.7   6.244     UNL
  15  C7H13NO7    -4.7   5.353     UNL
  16  C7H13NO7    -4.7   3.829     UNL
  17  C7H13NO7    -4.6   3.878     UNL
  18C7H15N2O6+    -5.2   0.000     UNL
  19C7H15N2O6+    -5.1   5.179     UNL
  20C7H15N2O6+    -4.9   1.184     UNL
  21C7H15N2O6+    -4.8   5.018     UNL
  22C7H15N2O6+    -4.8   5.461     UNL
  23C7H15N2O6+    -4.7   3.004     UNL
  24C7H15N2O6+    -4.7   3.058     UNL
  25C7H15N2O6+    -4.6   4.825     UNL
  26C7H15N2O6+    -4.5   4.972     UNL
  27  C7H13NO6    -4.6   0.000     UNL
  28  C7H13NO6    -4.5   3.127     UNL
  29  C7H13NO6    -4.5   5.571     UNL
  30  C7H13NO6    -4.5   5.308     UNL
  31  C7H13NO6    -4.4   1.564     UNL
  32  C7H13NO6    -4.3   7.096     UNL
  33  C7H13NO6    -4.2   3.498     UNL
  34  C7H13NO6    -4.2   4.475     UNL
  35  C7H13NO6    -4.2   3.706     UNL
  36 C13H17NO6    -7.1   0.000     UNL
  37 C13H17NO6    -6.5   7.004     UNL
  38 C13H17NO6    -6.4   7.102     UNL
  39 C13H17NO6    -6.3   3.729     UNL
  40 C13H17NO6    -6.3   2.364     UNL
  41 C13H17NO6    -6.2   2.837     UNL
  42 C13H17NO6    -6.1   6.323     UNL
  43 C13H17NO6    -6.1   4.791     UNL
  44 C13H17NO6    -6.0   8.012     UNL
  45 C8H12NO8-    -5.2   0.000     UNL
  46 C8H12NO8-    -5.2   3.442     UNL
  47 C8H12NO8-    -5.2   6.301     UNL
  48 C8H12NO8-    -5.1   3.386     UNL
  49 C8H12NO8-    -4.9   3.289     UNL
  50 C8H12NO8-    -4.8   7.190     UNL
  51 C8H12NO8-    -4.8   5.285     UNL
  52 C8H12NO8-    -4.6   5.152     UNL
  53 C8H12NO8-    -4.5   3.799     UNL
In [30]:
import pandas as pd
In [39]:
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=['brutto', 'affinity', 'ub', 'name'])
results_df.sort_values(by=['affinity'], ascending=False)
Out[39]:
brutto affinity ub name
36 C13H17NO6 -7.1 0.000 UNL
37 C13H17NO6 -6.5 7.004 UNL
38 C13H17NO6 -6.4 7.102 UNL
39 C13H17NO6 -6.3 3.729 UNL
40 C13H17NO6 -6.3 2.364 UNL
41 C13H17NO6 -6.2 2.837 UNL
42 C13H17NO6 -6.1 6.323 UNL
43 C13H17NO6 -6.1 4.791 UNL
44 C13H17NO6 -6.0 8.012 UNL
9 C7H13NO7 -5.5 0.000 UNL
10 C7H13NO7 -5.4 5.255 UNL
0 C8H15NO6 -5.3 0.000 UNL
45 C8H12NO8- -5.2 0.000 UNL
46 C8H12NO8- -5.2 3.442 UNL
18 C7H15N2O6+ -5.2 0.000 UNL
47 C8H12NO8- -5.2 6.301 UNL
19 C7H15N2O6+ -5.1 5.179 UNL
11 C7H13NO7 -5.1 4.349 UNL
48 C8H12NO8- -5.1 3.386 UNL
1 C8H15NO6 -5.0 5.345 UNL
2 C8H15NO6 -5.0 4.665 UNL
12 C7H13NO7 -4.9 5.226 UNL
3 C8H15NO6 -4.9 3.521 UNL
49 C8H12NO8- -4.9 3.289 UNL
20 C7H15N2O6+ -4.9 1.184 UNL
50 C8H12NO8- -4.8 7.190 UNL
13 C7H13NO7 -4.8 4.819 UNL
22 C7H15N2O6+ -4.8 5.461 UNL
21 C7H15N2O6+ -4.8 5.018 UNL
51 C8H12NO8- -4.8 5.285 UNL
4 C8H15NO6 -4.8 5.048 UNL
24 C7H15N2O6+ -4.7 3.058 UNL
23 C7H15N2O6+ -4.7 3.004 UNL
16 C7H13NO7 -4.7 3.829 UNL
7 C8H15NO6 -4.7 4.271 UNL
6 C8H15NO6 -4.7 4.613 UNL
5 C8H15NO6 -4.7 4.068 UNL
15 C7H13NO7 -4.7 5.353 UNL
14 C7H13NO7 -4.7 6.244 UNL
52 C8H12NO8- -4.6 5.152 UNL
27 C7H13NO6 -4.6 0.000 UNL
25 C7H15N2O6+ -4.6 4.825 UNL
17 C7H13NO7 -4.6 3.878 UNL
8 C8H15NO6 -4.6 2.511 UNL
30 C7H13NO6 -4.5 5.308 UNL
29 C7H13NO6 -4.5 5.571 UNL
28 C7H13NO6 -4.5 3.127 UNL
26 C7H15N2O6+ -4.5 4.972 UNL
53 C8H12NO8- -4.5 3.799 UNL
31 C7H13NO6 -4.4 1.564 UNL
32 C7H13NO6 -4.3 7.096 UNL
35 C7H13NO6 -4.2 3.706 UNL
34 C7H13NO6 -4.2 4.475 UNL
33 C7H13NO6 -4.2 3.498 UNL

Ну и, наконец, смоделируем несколько лигандов!

In [47]:
indices = [36, 37, 38, 9, 0]
for i,r in [(i, res[i]) for i in indices]:
    r.write(filename='r%s.pdb' % i, format='pdb')
In [48]:
import __main__
__main__.pymol_argv = [ 'pymol', '-x' ]

import pymol
pymol.finish_launching()
from pymol import cmd
In [62]:
cmd.reinitialize()
In [63]:
cmd.bg_color('white')
cmd.set('ray_trace_mode', 1)
In [64]:
cmd.load('TRINI_L.noligand.pdb', 'protein')
cmd.load('ligand.pdb', 'lig_x')
In [65]:
cmd.h_add('protein')
cmd.h_add('lig_x')
In [66]:
cmd.show('surface', 'protein')
In [67]:
for i in indices:
    cmd.load(f'r{i}.pdb', f'r_{i}')
In [68]:
cmd.zoom('lig_x')
In [73]:
cmd.do('ray; png lig_x.png')

(Исходный лиганд)

In [74]:
Image('lig_x.png')
Out[74]:
In [82]:
cmd.center('r_36')
cmd.do('ray; png r36.png')
In [81]:
Image('r36.png')
Out[81]:
In [84]:
cmd.center('r_37')
cmd.do('ray; png r37.png')
In [85]:
Image('r37.png')
Out[85]:
In [89]:
cmd.center('r_38')
cmd.do('ray; png r38.png')
In [91]:
Image('r38.png')
Out[91]:
In [92]:
find_hbonds('r_0', 'protein')
Out[92]:
1
In [93]:
cmd.center('r_0')
cmd.do('ray; png r0.png')
In [94]:
Image('r0.png')
Out[94]:
In [96]:
cmd.center('r_9')
cmd.do('ray; png r9.png')
In [97]:
Image('r9.png')
Out[97]:

Судя по всему, рассмотренные нами лиганды не очень хорошо подходят к этому белку: водородных связей немного (но я не рассмотрел гидрофобные взаимодействия), поэтому, скорее всего, в реальности взаимодействия происходить не будет.