Skip to content

Commit

Permalink
Towards #2468 (RDKit interoperability GSOC project)
Browse files Browse the repository at this point in the history
* Overview of work done in PR

  This PR adds the `RDKitConverter` class which converts MDAnalysis
  `Universe`/`Atomgroup` objects to `RDKit rdchem.Mol` objects.

* Limitations
  - Bonds and elements must be present (the former will be inferred if not
    present).
  - This converter mainly aims at supporting cases where explicit hydrogens
    are present.

* Extra implementation details
  - Bond order and formal charges are inferred via atomic valencies & the
    number of unpaired electrons (see `_infer_bo_and_charges`).
  - In part due to the influence of atom read order on inferring, bond
    conjugation and functional groups are standardized using SMARTS
    reactions (see `_standardize_patterns`).

*  Other changes

   Also includes some PEP8 changes and some cleaning up of the tests for the
   `RDKITReader`.

* References
  For more information on the development process for this PR, see:
  1) https://cbouy.github.io/blog/2020/07/01/rdkit-converter
  2) https://cbouy.github.io/blog/2020/07/22/rdkit-converter-part2
  • Loading branch information
Cédric Bouysset authored and orbeckst committed Aug 22, 2020
1 parent 2f0381e commit 9ebc1b2
Show file tree
Hide file tree
Showing 8 changed files with 1,229 additions and 47 deletions.
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ Enhancements
* Added new kwargs `select_remove` and `select_protein` to
analysis.dihedrals.Janin analysis to give user more fine grained control
over selections (PR #2899)
* Added an RDKit converter that works for any input with all hydrogens
explicit in the topology (Issue #2468, PR #2775)

Changes
* deprecated NumPy type aliases have been replaced with their actual types
Expand Down
769 changes: 751 additions & 18 deletions package/MDAnalysis/coordinates/RDKit.py

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package/doc/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,4 +346,5 @@
'https://gsd.readthedocs.io/en/stable/': None,
'https://parmed.github.io/ParmEd/html/': None,
'https://docs.h5py.org/en/stable': None,
'https://www.rdkit.org/docs/': None,
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ you will have to specify a package name (case-insensitive). ::
:maxdepth: 1

converters/ParmEdParser
converters/RDKitParser

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.. automodule:: MDAnalysis.topology.RDKitParser

.. automodule:: MDAnalysis.coordinates.RDKit

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ topology file format in the *topology_format* keyword argument to
topology/PDBQTParser
topology/PQRParser
topology/PSFParser
topology/RDKitParser
topology/TOPParser
topology/TPRParser
topology/TXYZParser
Expand Down
Loading

0 comments on commit 9ebc1b2

Please sign in to comment.