Skip to content

Commit

Permalink
Merge PR #2916 (originally PR #2775): RDKitConverter (Issue #2468)
Browse files Browse the repository at this point in the history
Towards #2468 (RDKit interoperability GSOC project)

PR #2916 -> Originally PR #2775

##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:
https://cbouy.github.io/blog/2020/07/01/rdkit-converter
https://cbouy.github.io/blog/2020/07/22/rdkit-converter-part2
  • Loading branch information
IAlibay authored Aug 23, 2020
2 parents 2f0381e + 9ebc1b2 commit ca2cbe4
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 ca2cbe4

Please sign in to comment.