-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from martimunicoy/devel
1.2.0 Release
- Loading branch information
Showing
32 changed files
with
3,238 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,4 @@ dependencies: | |
- coverage < 5.0 | ||
- ambertools | ||
- rdkit | ||
- openforcefield ==0.8.0 | ||
- openforcefield ==0.8.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
145 changes: 145 additions & 0 deletions
145
examples/molecular_representations/benzamidine_representation.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"# Benzamidine representation\n", | ||
"This notebook checks that the molecular representation of benzamidine (problematic compound according to one RDKit's [issue](https://github.com/rdkit/rdkit/issues/1031)) is of correct type." | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 1, | ||
"metadata": {}, | ||
"outputs": [], | ||
"source": [ | ||
"from peleffy.topology import Molecule\n", | ||
"from peleffy.utils import get_data_file_path" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": 2, | ||
"metadata": {}, | ||
"outputs": [ | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
" - Initializing molecule from PDB\n", | ||
" - Loading molecule from RDKit\n", | ||
" - Assigning stereochemistry from 3D coordinates\n", | ||
" - Setting molecule name to 'benzamidine'\n", | ||
" - Setting molecule tag to 'BEN'\n", | ||
" - Representing molecule with the Open Force Field Toolkit\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"application/vnd.jupyter.widget-view+json": { | ||
"model_id": "f962e6415594449fbfad0b728d1b3cb8", | ||
"version_major": 2, | ||
"version_minor": 0 | ||
}, | ||
"text/plain": [] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
}, | ||
{ | ||
"name": "stderr", | ||
"output_type": "stream", | ||
"text": [ | ||
" - Generating rotamer library\n", | ||
" - Core set to the center of the molecule\n" | ||
] | ||
}, | ||
{ | ||
"data": { | ||
"image/svg+xml": [ | ||
"<svg baseProfile=\"full\" height=\"500px\" version=\"1.1\" viewBox=\"0 0 500 500\" width=\"500px\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:rdkit=\"http://www.rdkit.org/xml\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n", | ||
"<!-- END OF HEADER -->\n", | ||
"<rect height=\"500\" style=\"opacity:1.0;fill:#FFFFFF;stroke:none\" width=\"500\" x=\"0\" y=\"0\"> </rect>\n", | ||
"<path class=\"bond-0\" d=\"M 233.3,256.708 L 266.7,185.443\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-0\" d=\"M 252.563,252.698 L 275.943,202.812\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-1\" d=\"M 233.3,256.708 L 278.318,321.265\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-2\" d=\"M 233.3,256.708 L 154.883,263.416\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-3\" d=\"M 266.7,185.443 L 345.117,178.735\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-4\" d=\"M 266.7,185.443 L 230.825,133.997\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-5\" d=\"M 345.117,178.735 L 390.135,243.292\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-5\" d=\"M 338.958,197.422 L 370.471,242.612\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-6\" d=\"M 345.117,178.735 L 372.371,120.581\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-7\" d=\"M 390.135,243.292 L 356.736,314.557\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-8\" d=\"M 390.135,243.292 L 457.864,237.498\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-9\" d=\"M 356.736,314.557 L 278.318,321.265\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-9\" d=\"M 343.631,299.88 L 288.739,304.576\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-10\" d=\"M 356.736,314.557 L 392.61,366.003\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-11\" d=\"M 278.318,321.265 L 251.064,379.419\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-12\" d=\"M 154.883,263.416 L 136.946,237.693\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-12\" d=\"M 136.946,237.693 L 119.008,211.97\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-13\" d=\"M 154.883,263.416 L 141.256,292.492\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-13\" d=\"M 141.256,292.492 L 127.629,321.569\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-13\" d=\"M 165.048,278.819 L 155.509,299.172\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-13\" d=\"M 155.509,299.172 L 145.97,319.526\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-14\" d=\"M 99.4446,199.75 L 70.6594,202.212\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-14\" d=\"M 70.6594,202.212 L 41.8742,204.674\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-15\" d=\"M 116.01,185.746 L 126.65,163.045\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-15\" d=\"M 126.65,163.045 L 137.289,140.343\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-16\" d=\"M 111.063,335.573 L 82.2778,338.035\" style=\"fill:none;fill-rule:evenodd;stroke:#0000FF;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"bond-16\" d=\"M 82.2778,338.035 L 53.4926,340.497\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:4.0px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n", | ||
"<path class=\"atom-7\" d=\"M 104.938 187.714 L 112.242 199.519 Q 112.966 200.684, 114.131 202.794 Q 115.296 204.903, 115.359 205.029 L 115.359 187.714 L 118.318 187.714 L 118.318 210.003 L 115.264 210.003 L 107.425 197.095 Q 106.512 195.584, 105.536 193.853 Q 104.592 192.121, 104.309 191.586 L 104.309 210.003 L 101.412 210.003 L 101.412 187.714 L 104.938 187.714 \" fill=\"#0000FF\"/>\n", | ||
"<path class=\"atom-8\" d=\"M 116.557 323.537 L 123.86 335.342 Q 124.584 336.507, 125.749 338.616 Q 126.914 340.726, 126.977 340.852 L 126.977 323.537 L 129.936 323.537 L 129.936 345.826 L 126.883 345.826 L 119.044 332.918 Q 118.131 331.407, 117.155 329.676 Q 116.21 327.944, 115.927 327.409 L 115.927 345.826 L 113.031 345.826 L 113.031 323.537 L 116.557 323.537 \" fill=\"#0000FF\"/>\n", | ||
"<path class=\"atom-9\" d=\"M 212.961 109.741 L 215.984 109.741 L 215.984 119.217 L 227.38 119.217 L 227.38 109.741 L 230.402 109.741 L 230.402 132.03 L 227.38 132.03 L 227.38 121.735 L 215.984 121.735 L 215.984 132.03 L 212.961 132.03 L 212.961 109.741 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-10\" d=\"M 369.796 96.3248 L 372.818 96.3248 L 372.818 105.801 L 384.215 105.801 L 384.215 96.3248 L 387.237 96.3248 L 387.237 118.614 L 384.215 118.614 L 384.215 108.319 L 372.818 108.319 L 372.818 118.614 L 369.796 118.614 L 369.796 96.3248 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-11\" d=\"M 459.832 225.44 L 462.854 225.44 L 462.854 234.916 L 474.251 234.916 L 474.251 225.44 L 477.273 225.44 L 477.273 247.729 L 474.251 247.729 L 474.251 237.434 L 462.854 237.434 L 462.854 247.729 L 459.832 247.729 L 459.832 225.44 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-12\" d=\"M 393.033 367.97 L 396.055 367.97 L 396.055 377.446 L 407.452 377.446 L 407.452 367.97 L 410.474 367.97 L 410.474 390.259 L 407.452 390.259 L 407.452 379.965 L 396.055 379.965 L 396.055 390.259 L 393.033 390.259 L 393.033 367.97 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-13\" d=\"M 236.198 381.386 L 239.221 381.386 L 239.221 390.862 L 250.617 390.862 L 250.617 381.386 L 253.639 381.386 L 253.639 403.675 L 250.617 403.675 L 250.617 393.381 L 239.221 393.381 L 239.221 403.675 L 236.198 403.675 L 236.198 381.386 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-14\" d=\"M 22.7273 194.422 L 25.7495 194.422 L 25.7495 203.898 L 37.1458 203.898 L 37.1458 194.422 L 40.168 194.422 L 40.168 216.711 L 37.1458 216.711 L 37.1458 206.416 L 25.7495 206.416 L 25.7495 216.711 L 22.7273 216.711 L 22.7273 194.422 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-15\" d=\"M 134.544 116.449 L 137.566 116.449 L 137.566 125.924 L 148.963 125.924 L 148.963 116.449 L 151.985 116.449 L 151.985 138.737 L 148.963 138.737 L 148.963 128.443 L 137.566 128.443 L 137.566 138.737 L 134.544 138.737 L 134.544 116.449 \" fill=\"#000000\"/>\n", | ||
"<path class=\"atom-16\" d=\"M 34.3457 330.245 L 37.3679 330.245 L 37.3679 339.721 L 48.7642 339.721 L 48.7642 330.245 L 51.7865 330.245 L 51.7865 352.534 L 48.7642 352.534 L 48.7642 342.239 L 37.3679 342.239 L 37.3679 352.534 L 34.3457 352.534 L 34.3457 330.245 \" fill=\"#000000\"/>\n", | ||
"</svg>" | ||
], | ||
"text/plain": [ | ||
"<IPython.core.display.SVG object>" | ||
] | ||
}, | ||
"metadata": {}, | ||
"output_type": "display_data" | ||
} | ||
], | ||
"source": [ | ||
"m = Molecule(get_data_file_path('ligands/benzamidine.pdb'))\n", | ||
"display(m)" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"As long as the input PDB file has the connectivity properly assigned, the molecular representation obtained by RDKit in peleffy is valid." | ||
] | ||
} | ||
], | ||
"metadata": { | ||
"kernelspec": { | ||
"display_name": "Python 3", | ||
"language": "python", | ||
"name": "python3" | ||
}, | ||
"language_info": { | ||
"codemirror_mode": { | ||
"name": "ipython", | ||
"version": 3 | ||
}, | ||
"file_extension": ".py", | ||
"mimetype": "text/x-python", | ||
"name": "python", | ||
"nbconvert_exporter": "python", | ||
"pygments_lexer": "ipython3", | ||
"version": "3.7.8" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 4 | ||
} |
Oops, something went wrong.