Skip to content

Commit

Permalink
Simple RDKitConverter (#2775)
Browse files Browse the repository at this point in the history
* simple converter

* add PDB residue info and guessers

* fix 2 letter atom names and fix bond order

* test mol2 topology and pdb info

* autopep8

* fix code review

* store other attributes in each atom

* more tests on topology + pep8

* fix other props type

* bond order and charges

* fix indentation and bonds with atoms outside of atomgroup

* fix test

* fix test minimal build

* add icodes to MonomerInfo

* better attributes conversion

* test mda to rdkit MonomerInfo conversion

* test mda to rdkit MonomerInfo conversion

* docs

* fix minimal deps test

* fix for minimal deps tests 🙏

* use util functions

* move min deps test up

* capitalize elements by default

* store index in MDA object

* fetch singular from _TOPOLOGY_ATTRS

* updated changelog

* use ag intersection for bonds instead of try except

* more tests + pep8

* fix test for numpy 1.13.3

* docs + pep8

* fix too long atom names in PDB output

* table of supported attributes for the converter

* changelog convention

* catch no bonds

* use match in pytest.raises and pytest.warns

* remove bondtype attribute

* fix bond attributes

* simplified the code for infering

* include negative charges

* skip failing test for now

* new test

* update doc

* standardize groups

* fix tests

* add previously failing tests

* simpler pattern standardization

* more tests on inferring and patterns

* test atom properties and reaction mapping

* fix docs

* fix minimal build tests

* pep8

* bfactors as TempFactor

* Update CHANGELOG

* pep8

* pep8

* no hydrogen warning

* quickfix for polycyclic conjugated systems

* save any atom property instead of just the ones tagged with "_MDAnalysis"

* general solution

* back to old method for conjugated systems

* added "RDKit" in changelog

* fix when first atom is charged

* working general solution to conjugated systems

* pep8

* for loop instead of while

* bugfix for conjugated system with N at one edge

* fix typos

* fix test for min deps

* use indirect parametrization

* add coordinates + tests + fix index property

* cache the molecule and only update conformers when iterating trajectory

* update docs

* add kwargs to the cache key

* use fstrings

* cache kwarg + fix cache tests

* fix code review + improve docs

* improve doc

* add test nan in coordinates

* warn nan coordinates

* end of code review

* corrections to smarts patterns for reactions

* sort atoms by NUE + more standardization tests

* pdb atom names formating

* test RDKit->MDA->RDKit->MDA equal

* tackle conjugated systems ending with O-

* docs + pep8

* tests

* add max_iter kwarg

* reorder docstring standardize_patterns

* fix doc build

Co-authored-by: Oliver Beckstein <[email protected]>
  • Loading branch information
IAlibay and orbeckst authored Aug 21, 2020
2 parents 2f0381e + 4e49616 commit 6440873
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 6440873

Please sign in to comment.