Skip to content

Commit

Permalink
added OC1 and OC2 to default list of hydrogen bond acceptors
Browse files Browse the repository at this point in the history
- added C-terminus  OC1 and OC2 (Amber FF) to default list of acceptors in HydrogenBondAnalysis
- closes #1342 
- updated docs
- updated CHANGELOG
  • Loading branch information
xiki-tempula authored and orbeckst committed May 16, 2017
1 parent f189758 commit c9f5cd0
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 2 additions & 0 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ Fixes
* Fixed AnalysisBase class provides numerical start,stop,step values (PR #1340)
* Fixed PSFParser not creating multiple residues for identical resids in
different segments. (Issue #1347, PR #1348)
* Add the OC1 and OC2 from amber99sb-ildn to hydrogen bond acceptors (issue #1342)


Changes
* Enable various pylint warnings to increase python 3 compatibility
Expand Down
7 changes: 5 additions & 2 deletions package/MDAnalysis/analysis/hbonds/hbond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@
=========== ============== =========== ====================================
group donor acceptor comments
=========== ============== =========== ====================================
main chain N O
main chain N O, OC1, OC2 OC1, OC2 from amber99sb-ildn
(Gromacs)
water OH2, OW OH2, OW SPC, TIP3P, TIP4P (CHARMM27,Gromacs)
ARG NE, NH1, NH2
Expand Down Expand Up @@ -386,6 +387,8 @@ class HydrogenBondAnalysis(object):
GLU OE1/OE2, HIS ND1/NE2, MET SD, SER OG, THR OG1, TYR OH
*GLYCAM06*
N,NT,O,O2,OH,OS,OW,OY,P,S,SM
*amber99sb-ildn(Gromacs)*
OC1, OC2 of the main chain
See Also
--------
Expand Down Expand Up @@ -415,7 +418,7 @@ class HydrogenBondAnalysis(object):
#: use the keyword `acceptors` to add a list of additional acceptor names.
DEFAULT_ACCEPTORS = {
'CHARMM27': tuple(set([
'O', 'OH2', 'OW', 'OD1', 'OD2', 'SG', 'OE1', 'OE1', 'OE2', 'ND1', 'NE2', 'SD', 'OG', 'OG1', 'OH'])),
'O', 'OC1', 'OC2', 'OH2', 'OW', 'OD1', 'OD2', 'SG', 'OE1', 'OE1', 'OE2', 'ND1', 'NE2', 'SD', 'OG', 'OG1', 'OH'])),
'GLYCAM06': tuple(set(['N', 'NT', 'O', 'O2', 'OH', 'OS', 'OW', 'OY', 'SM'])),
'other': tuple(set([]))}

Expand Down
14 changes: 14 additions & 0 deletions testsuite/MDAnalysisTests/analysis/test_hbonds.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,20 @@ def test_atoms_too_far():
h.run(verbose=False)
assert_equal(h.timeseries, [[]])

@staticmethod
def test_acceptor_OC1_OC2():
gro = '''test
3
1ALA OC1 1 0.000 0.000 0.000
2ALA N 2 0.300 0.000 0.000
2ALA H1 3 0.200 0.000 0.000
7.29748 7.66094 9.82962'''

u = MDAnalysis.Universe(StringIO(gro), format="gro")
h = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(u)
h.run(verbose=False)
assert_equal(h.timeseries[0][0][4], 'ALA2:H1')

@staticmethod
def test_true_traj():
u = MDAnalysis.Universe(GRO, XTC)
Expand Down

0 comments on commit c9f5cd0

Please sign in to comment.