Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.2.0 Release #127

Merged
merged 37 commits into from
Feb 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b0763bb
Add openff 1.3.0
martimunicoy Dec 10, 2020
410c7c4
Add benzamidine example
martimunicoy Dec 10, 2020
010f735
Prepare main for mae charges
martimunicoy Dec 14, 2020
1011049
Add parser
laumalo Dec 15, 2020
e25260d
Add example and tests
laumalo Dec 15, 2020
2b98801
Fix warning
laumalo Dec 15, 2020
5839138
Fix warnings
laumalo Dec 15, 2020
dc7c85a
Add MAE parse main.py
laumalo Dec 16, 2020
6b36c09
Update docstrings
laumalo Dec 16, 2020
eefb9fb
Update releasehistory.rst
laumalo Dec 16, 2020
eb02cd7
Missing ligand file
laumalo Dec 16, 2020
d9c72be
Code linting and add test
laumalo Dec 21, 2020
549a6c3
Merge pull request #117 from martimunicoy/mae_charges
laumalo Dec 21, 2020
bada2c7
Add from_impact_template method
laumalo Dec 22, 2020
937953b
Add tests
laumalo Dec 23, 2020
544894d
Fix sorting error
laumalo Jan 8, 2021
f23f003
Fix tests errors
laumalo Jan 8, 2021
858e79c
Add missing test file
laumalo Jan 8, 2021
3ea8c35
Minor error fixed
laumalo Jan 8, 2021
bbffd11
Update releasehistory.rst
laumalo Jan 8, 2021
361ec22
Merge pull request #118 from martimunicoy/impact_parser
laumalo Jan 12, 2021
071225f
Add error message
laumalo Jan 13, 2021
ae01caf
Suport OpenFF 0.8.3
laumalo Jan 13, 2021
0e716c7
Update releasehistory.rst
laumalo Jan 13, 2021
c32b1bc
Minor fix
Jan 13, 2021
45bdcda
Merge pull request #121 from martimunicoy/impact_file_error
laumalo Jan 13, 2021
7c66d5c
Modify Solvent class
laumalo Jan 22, 2021
49a1200
Add tests for Solvent
laumalo Jan 22, 2021
6b7ce95
Fix bug PDB index
laumalo Jan 22, 2021
c99d82f
Update releasehistory.rst
laumalo Jan 22, 2021
0dcfff5
Merge pull request #125 from martimunicoy/bug_index
laumalo Jan 22, 2021
de743b2
Update releasehistory.rst
laumalo Jan 22, 2021
1df6caa
Add test_multiple_topologies_writer
laumalo Jan 28, 2021
da6c747
Solve Schrodinger dependency issue
laumalo Jan 28, 2021
666efe7
Merge pull request #126 from martimunicoy/solvent_params
laumalo Jan 29, 2021
9ed79fb
Update releasehistory.rst
martimunicoy Feb 1, 2021
e118be1
Update releasehistory.rst
martimunicoy Feb 1, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion devtools/conda/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ requirements:
- networkx
- rdkit
- ambertools
- openforcefield==0.8.0
- openforcefield==0.8.3

about:
home: https://github.com/martimunicoy/peleffy
Expand Down
2 changes: 1 addition & 1 deletion devtools/envs/standard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ dependencies:
- coverage < 5.0
- ambertools
- rdkit
- openforcefield ==0.8.0
- openforcefield ==0.8.3
2 changes: 2 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ are:

* The following force field from the `Open Force Field toolkit <https://github.com/openforcefield/openforcefield>`_:

* openff_unconstrained-1.3.0.offxml

* openff_unconstrained-1.2.1.offxml

* openff_unconstrained-1.2.0.offxml
Expand Down
26 changes: 25 additions & 1 deletion docs/releasehistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,32 @@ Releases follow the ``major.minor.micro`` scheme recommended by `PEP440 <https:/
* ``minor`` increments add features but do not break API compatibility
* ``micro`` increments represent bugfix releases or improvements in documentation

1.2.0 - New tools for parameters and templates
----------------------------------------------

1.1.0 - Improvements in parameterization API, OBC template for OPLS2005 and Molecule initializators
This is a minor release of peleffy that includes new useful tools to handle parameters and their templates more easily. It also supports the newest version of the OpenForceField toolkit, which is 0.8.3.

New features
""""""""""""
- `PR #117 <https://github.com/martimunicoy/peleffy/pull/117>`_: New method to assign external partial charges.
- `PR #118 <https://github.com/martimunicoy/peleffy/pull/118>`_: New method to load parameters from an Impact Template.
- `PR #119 <https://github.com/martimunicoy/peleffy/pull/119>`_: Adds explanatory error message when using an invalid Impact Template in the from_impact_template method.
- `PR #119 <https://github.com/martimunicoy/peleffy/pull/119>`_: Supports Openforcefield-0.8.3 .
- `PR #126 <https://github.com/martimunicoy/peleffy/pull/126>`_: Allows the Solvent class to be compatible with multiple topologies.

Bugfixes
""""""""
- `PR #125 <https://github.com/martimunicoy/peleffy/pull/125>`_: A bad index slicing in the molecule.Molecule._pdb_checkup() is now fixed.

Tests added
"""""""""""
- `PR #117 <https://github.com/martimunicoy/peleffy/pull/117>`_: Adds tests to validate the MAE parse for external partial charges.
- `PR #118 <https://github.com/martimunicoy/peleffy/pull/118>`_: Adds tests to validate the new method to load parameters from an Impact Template.
- `PR #119 <https://github.com/martimunicoy/peleffy/pull/119>`_: Adds tests for the new error message when using an invalid Impact Template in the from_impact_template method.
- `PR #126 <https://github.com/martimunicoy/peleffy/pull/126>`_: Adds tests for the new compatibility of the Solvent class with multiple topologies.


1.1.0 - Improvements in parameterization API, OBC template for OPLS2005 and Molecule initializators
---------------------------------------------------------------------------------------------------

This minor release introduces improvements to the parameterization API of peleffy. It also integrates the parameterization of OBC radii and scale factors required by the OPLS2005 implementation of PELE. It also improves the initialization of the Molecule class with a PDB checking and fixer and taking RDKit and OpenFF molecular representations as input. It also adds support for the new openff-1.3.0. Besides, it fixes a serious bug in the atom ordering of the Impact template that affected PELE's side chain prediction algorithm.
Expand Down
13 changes: 13 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ It sets the method to compute the partial charges.

$ python -m peleffy.main path/to/my_ligand.pdb -c gasteiger

Charge from file
----------------
It sets the method to load external partial charges.

- Flag: ``--charges_from_file PATH``
- Type: ``string``
- Default: ``None``
- Example: the code below will load the partial charges from a MAE file

.. code-block:: bash

$ python -m peleffy.main path/to/my_ligand.pdb --charges_from_file path/to/my_ligand.mae

Include terminal rotamers
-------------------------
It always includes terminal rotamers, even if they belong to a terminal methyl group whose rotation is trivial in PELE.
Expand Down
283 changes: 283 additions & 0 deletions examples/OFF_parameterization/parameterize.ipynb

Large diffs are not rendered by default.

145 changes: 145 additions & 0 deletions examples/molecular_representations/benzamidine_representation.ipynb
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
}
Loading