diff --git a/package/CHANGELOG b/package/CHANGELOG index b099e11006a..666933d515f 100644 --- a/package/CHANGELOG +++ b/package/CHANGELOG @@ -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 diff --git a/package/MDAnalysis/analysis/hbonds/hbond_analysis.py b/package/MDAnalysis/analysis/hbonds/hbond_analysis.py index 7aa82072ea3..4b47afc6b95 100644 --- a/package/MDAnalysis/analysis/hbonds/hbond_analysis.py +++ b/package/MDAnalysis/analysis/hbonds/hbond_analysis.py @@ -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 @@ -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 -------- @@ -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([]))} diff --git a/testsuite/MDAnalysisTests/analysis/test_hbonds.py b/testsuite/MDAnalysisTests/analysis/test_hbonds.py index 2e8d1082d46..da256aaf914 100644 --- a/testsuite/MDAnalysisTests/analysis/test_hbonds.py +++ b/testsuite/MDAnalysisTests/analysis/test_hbonds.py @@ -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)