Skip to content

Commit

Permalink
Merge pull request #99 from martimunicoy/devel
Browse files Browse the repository at this point in the history
peleffy 1.1.0 release
  • Loading branch information
martimunicoy committed Dec 1, 2020
2 parents d938104 + 6bef442 commit ed480da
Show file tree
Hide file tree
Showing 99 changed files with 18,234 additions and 4,023 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
activate-environment: standard
environment-file: devtools/envs/standard.yaml
auto-activate-base: false

- name: Install dependencies
shell: bash -l {0}
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
activate-environment: standard
environment-file: devtools/envs/standard.yaml
auto-activate-base: false

- name: Environment Information
shell: bash -l {0}
run: |
Expand Down
59 changes: 59 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,68 @@
| **Installation** | [![Conda](https://img.shields.io/conda/v/martimunicoy/peleffy.svg)](https://anaconda.org/martimunicoy/peleffy) [![PyPI](https://img.shields.io/pypi/v/peleffy)](https://pypi.org/project/peleffy/) |

# PELE Force Field Yielder

<p align="left">
<img src="docs/figures/logo.png" width="350" title="peleffy logo", alt="peleffy logo">
</p>

The `peleffy` (PELE Force Field Yielder) is a Python package that builds [PELE](https://pele.bsc.es/pele.wt)-compatible force field templates. The current supported force fields are:
- Any force field from the [Open Force Field toolkit](https://github.com/openforcefield/openforcefield).
- OPLS2005.
- A combination of them.

## Documentation
The documentation for the `peleffy` package is available at [GitHub Pages](https://martimunicoy.github.io/peleffy).

## Main features

### Small molecules parameterization
It can take a molecular structure from a PDB file or a SMILES tag and parameterize it with any of the supported force fields. The resulting parameters are stored in a dictionary-like object that can be easily manipulated.

```python
from peleffy.topology import Molecule
from peleffy.forcefield import OpenForceField

molecule = Molecule('path_to_pdb_file.pdb')
openff = OpenForceField('openff_unconstrained-1.3.0.offxml')

parameters = openff.parameterize(molecule)
```

### Template generation
A peleffy's molecular representation can be employed, along with its parameters, to build a Topology file. A Topology file is a wrapper of topological elements that can be written as an Impact template file, compatible with PELE.

```python
from peleffy.topology import Topology
from peleffy.template import Impact

topology = Topology(molecule, parameters)

impact_template = Impact(topology)
impact_template.to_file('ligand_parameters.txt')
```

A template with the OBC parameters for the implicit solvent of PELE can also be generated.
```python
from peleffy.solvent import OBC2

obc2_solvent = OBC2(topology)
obc2_solvent.to_file('ligand_obc.txt')
```

It can also generate the rotamer library file for the side chain exploration of PELE.
```python
from peleffy.topology import RotamerLibrary

rotamer_library = RotamerLibrary(molecule)
rotamer_library.to_file('ligand_rotamers.txt')
```

### User-friendly CLI
All the commands above can be run with a single CLI directive.
```bash
python -m peleffy.main path_to_pdb_file.pdb -f 'openff_unconstrained-1.3.0.offxml' --with_solvent
```

## Contributors
For a full list of contributors, see the [GitHub Contributors page](https://github.com/martimunicoy/peleffy/graphs/contributors).
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.7.1
- openforcefield==0.8.0

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.7.1
- openforcefield ==0.8.0
21 changes: 0 additions & 21 deletions docs/charge.rst

This file was deleted.

Binary file added docs/figures/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 20 additions & 1 deletion docs/forcefield.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Forcefield methods
==============

This module defines the different force fields that are available
to parameterize molecules for PELE.
in `peleffy` to parameterize molecules for PELE.

.. currentmodule:: peleffy.forcefield

Expand All @@ -19,3 +19,22 @@ Primary objects
OpenForceField
OPLS2005ForceField
OpenFFOPLS2005ForceField
selectors.ForceFieldSelector

Secondary objects
-----------------

.. autosummary::
:nosignatures:
:toctree: api/autogenerated
:template: class.rst

calculators.Am1bccCalculator
calculators.GasteigerCalculator
calculators.OPLSChargeCalculator
calculators.DummyChargeCalculator
selectors.ChargeCalculatorSelector
parameters.BaseParameterWrapper
parameters.OpenForceFieldParameterWrapper
parameters.OPLS2005ParameterWrapper
parameters.OpenFFOPLS2005ParameterWrapper
24 changes: 20 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,25 @@ PELE Force Field Yielder
The `peleffy` (PELE Force Field Yielder) is a Python package that builds
PELE-compatible force field templates. The current supported force fields
are:
- Any force field from the [Open Force Field toolkit](https://github.com/openforcefield/openforcefield).
- OPLS2005.

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

* openff_unconstrained-1.2.1.offxml

* openff_unconstrained-1.2.0.offxml

* openff_unconstrained-1.1.1.offxml

* openff_unconstrained-1.1.0.offxml

* openff_unconstrained-1.0.1.offxml

* openff_unconstrained-1.0.0.offxml

* OPLS2005

It also generates other files required by PELE such as rotamer libraries or
solvent templates.


User guide
Expand All @@ -27,7 +44,6 @@ API documentation
:maxdepth: 1

topology
forcefield
template
solvent
charge
forcefield
40 changes: 40 additions & 0 deletions docs/releasehistory.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,46 @@ Releases follow the ``major.minor.micro`` scheme recommended by `PEP440 <https:/
* ``micro`` increments represent bugfix releases or improvements in documentation


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.

New features
""""""""""""
- `PR #86 <https://github.com/martimunicoy/peleffy/pull/86>`_: New method to check the input PDB prior building the molecule.
- `PR #88 <https://github.com/martimunicoy/peleffy/pull/88>`_: New method to retrieve atom degrees with RDKit.
- `PR #90 <https://github.com/martimunicoy/peleffy/pull/90>`_: Add support for openff-1.3.0.
- `PR #92 <https://github.com/martimunicoy/peleffy/pull/92>`_: New parameter to skip the stereochemistry assignment (and the checking from the OpenFF toolkit).
- `PR #94 <https://github.com/martimunicoy/peleffy/pull/94>`_: New method for the OPLS OBC parameters.
- `PR #100 <https://github.com/martimunicoy/peleffy/pull/100>`_: New writer for the OPLS OBC parameters.
- `PR #106 <https://github.com/martimunicoy/peleffy/pull/106>`_: New method to initialize a Molecule object directly from an RDKit and OpenFF molecular representations.
- `PR #112 <https://github.com/martimunicoy/peleffy/pull/112>`_: New method to fix an input PDB file with no atomic element identifiers.

Bugfixes
""""""""
- `PR #107 <https://github.com/martimunicoy/peleffy/pull/107>`_: A bad ordering of the atoms in the Impact template generated by peleffy is now fixed.
- `PR #115 <https://github.com/martimunicoy/peleffy/pull/115>`_: The rotamer library writer now writes molecule's tag not its name, as expected.

API-breaking changes
""""""""""""""""""""
- `PR #94 <https://github.com/martimunicoy/peleffy/pull/94>`_: Methods to write to a file are given a unique standard name, to_file(), to simplify the API.
- `PR #97 <https://github.com/martimunicoy/peleffy/pull/97>`_: The parameterization API changes and a new Topology class is used as a container for all the topological elements.
- `PR #103 <https://github.com/martimunicoy/peleffy/pull/103>`_: The OpenFF output of PELE changes from DataLocal/Templates/OFF/Parsley/HeteroAtoms/ to DataLocal/Templates/OpenFF/Parsley/.

Tests added
"""""""""""
- `PR #88 <https://github.com/martimunicoy/peleffy/pull/88>`_: Adds tests to validate the atom degrees getter.
- `PR #86 <https://github.com/martimunicoy/peleffy/pull/86>`_: Adds tests to validate the PDB check up.
- `PR #90 <https://github.com/martimunicoy/peleffy/pull/90>`_: General validation of supported force fields.
- `PR #92 <https://github.com/martimunicoy/peleffy/pull/92>`_: New test to check the behaviour of the allow_undefined_stereo parameter.
- `PR #94 <https://github.com/martimunicoy/peleffy/pull/94>`_: Adds tests to validate the OPLS OBC parameters generator.
- `PR #97 <https://github.com/martimunicoy/peleffy/pull/97>`_: Includes tests for the new Topology container class.
- `PR #100 <https://github.com/martimunicoy/peleffy/pull/100>`_: Adds tests to validate the solvent template writers.
- `PR #106 <https://github.com/martimunicoy/peleffy/pull/106>`_: Adds tests to check the RDKit and OpenFF molecular initializers.
- `PR #112 <https://github.com/martimunicoy/peleffy/pull/112>`_: Adds one test to check the new PDB fixer method.


1.0.0 - Full compatibility for OPLS2005 and OpenFF dihedrals and rotamer library improvements
---------------------------------------------------------------------------------------------

Expand Down
13 changes: 12 additions & 1 deletion docs/solvent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,16 @@ Primary objects
:toctree: api/autogenerated
:template: class.rst

OBC1
OBC2
OPLSOBC


Secondary objects
-----------------

.. autosummary::
:nosignatures:
:toctree: api/autogenerated
:template: class.rst

OBC1
9 changes: 5 additions & 4 deletions docs/topology.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Primary objects
:template: class.rst

Molecule
Topology


Secondary objects
Expand All @@ -34,10 +35,10 @@ Secondary objects
Dihedral
Proper
Improper
molecule.DummyAtom
topology.OFFDihedral
topology.OFFProper
topology.OFFImproper
elements.DummyAtom
elements.OFFDihedral
elements.OFFProper
elements.OFFImproper
ZMatrix
rotamer.Rotamer
rotamer.RotamerLibrary
Expand Down
34 changes: 24 additions & 10 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,27 +33,41 @@ The more straightforward way to install `peleffy` along with the required depend
.. code-block::
------------------------------------------------------------
Open Force Field parameterizer for PELE v0.3.0
Open Force Field parameterizer for PELE 1.1.0
------------------------------------------------------------
- General:
- Input PDB: my_ligand.pdb
- Input PDB: my_ligand
- Output path: None
- Write solvent parameters: False
- DataLocal-like output: False
- Parameterization:
- Force field: openff_unconstrained-1.2.0.offxml
- Charges method: am1bcc
- Use OPLS nonbonding parameters: False
- Use OPLS bonds and angles: False
- Force field: openff_unconstrained-1.3.0.offxml
- Charge method: am1bcc
- Rotamer library:
- Resolution: 30
- Exclude terminal rotamers: True
------------------------------------------------------------
- Loading molecule from RDKit
- Initializing molecule from PDB
- Loading molecule from RDKit
- Assigning stereochemistry from 3D coordinates
- Setting molecule name to 'ligand'
- Setting molecule tag to 'LIG'
- Representing molecule with the Open Force Field Toolkit
- Generating rotamer library
- Loading forcefield
- Computing partial charges with am1bcc
- All files were generated successfully
- Core set to the center of the molecule
- Loading 'openff_unconstrained-1.3.0.offxml'
- Parameterizing molecule
- Parameters were built successfully:
- 12 atoms
- 12 bonds
- 18 torsions
- 24 propers
- 6 impropers
- Generating solvent parameters
- All files were generated successfully:
- /Users/martimunicoy/repos/BSC/peleffy/LIG.rot.assign
- /Users/martimunicoy/repos/BSC/peleffy/ligz
- /Users/martimunicoy/repos/BSC/peleffy/ligandParams.txt
------------------------------------------------------------
Command-line arguments
Expand Down
Loading

0 comments on commit ed480da

Please sign in to comment.