Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to return Permissive PDB Reader and Parser for all PDBs #812

Closed
wants to merge 10 commits into from
9 changes: 7 additions & 2 deletions package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ Enhancements
* Added read-only property giving Universe init kwargs (Issue #292)

Fixes

* rmsd now returns proper value when given array of weights (Issue #814)
* change_release now finds number and dev (Issue #776)
* test_shear_from_matrix doesn't fail for MKL builds anymore (Issue #757)
Expand All @@ -45,11 +46,15 @@ Fixes
* GRO files with an incomplete set of velocities can now be read (Issue #820)

Changes


* Removed sloppy structure builder and all of MDAnalysis.coordinates.pdb
(Issue #777)
* PDB parsers/readers/writers replaced by primitive counterparts (Issue #777)
* Generalized contact analysis class added. (Issue #702)

Deprecations (Issue #599)

* Use of PrimitivePDBReader/Writer/Parser deprecated in favor of PDBReader/
Writer/Parser (Issue #777)
* Deprecated all `get_*` and `set_*` methods of Groups.
* Deprecation warnings for accessing atom attributes from Residue,
ResidueGroup, Segment, SegmentGroup. Will not be present or will
Expand Down
16 changes: 8 additions & 8 deletions package/MDAnalysis/analysis/density.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
:members:
:inherited-members:

.. deprecated:: 0.15.0
The "permissive" flag is not used anymore (and effectively
defaults to True); it will be completely removed in 0.16.0.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please can you say that it is deprecated. That way we can grep for deprecated before a release to know what to remove.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll change it. Thanks.


"""
from __future__ import print_function
from six.moves import range
Expand Down Expand Up @@ -501,7 +505,7 @@ def current_coordinates():
pm = ProgressMeter(u.trajectory.n_frames, interval=interval, quiet=quiet,
format="Histogramming %(n_atoms)6d atoms in frame "
"%(step)5d/%(numsteps)d [%(percentage)5.1f%%]\r")
start, stop, step = u.trajectory.check_slice_indices(start, stop, step)
start, stop, step = u.trajectory.check_slice_indices(start, stop, step)
for ts in u.trajectory[start:stop:step]:
if update_selection:
group = u.select_atoms(atomselection)
Expand All @@ -515,8 +519,8 @@ def current_coordinates():

h[:], edges[:] = np.histogramdd(coord, bins=bins, range=arange, normed=False)
grid += h # accumulate average histogram


n_frames = len(range(start, stop, step))
grid /= float(n_frames)

Expand Down Expand Up @@ -727,11 +731,7 @@ def __init__(self, pdb, delta=1.0, atomselection='resname HOH and name O',
:Arguments:

pdb
PDB file or :class:`MDAnalysis.Universe`; a PDB is read with the
simpl PDB reader. If the Bio.PDB reader is required, either set
the *permissive_pdb_reader* flag to ``False`` in
:data:`MDAnalysis.core.flags` or supply a Universe
that was created with the `permissive` = ``False`` keyword.
PDB file or :class:`MDAnalysis.Universe`;
atomselection
selection string (MDAnalysis syntax) for the species to be analyzed
delta
Expand Down
2 changes: 1 addition & 1 deletion package/MDAnalysis/analysis/hbonds/hbond_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ class HydrogenBondAnalysis_OtherFF(HydrogenBondAnalysis):

import MDAnalysis.analysis.hbonds

u = MDAnalysis.Universe(PSF, PDB, permissive=True)
u = MDAnalysis.Universe(PSF, PDB)
h = MDAnalysis.analysis.hbonds.HydrogenBondAnalysis(u, 'protein', 'resname TIP3', distance=3.0, angle=120.0)
h.run()

Expand Down
4 changes: 2 additions & 2 deletions package/MDAnalysis/analysis/helanal.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ def stats(some_list):
return [list_mean, list_sd, list_abdev]


def helanal_main(pdbfile, selection="name CA", start=None, end=None, ref_axis=None, permissive=False):
def helanal_main(pdbfile, selection="name CA", start=None, end=None, ref_axis=None):
"""Simple HELANAL run on a single frame PDB/GRO.

Computed data are returned as a dict and also logged at level INFO to the
Expand Down Expand Up @@ -503,7 +503,7 @@ def helanal_main(pdbfile, selection="name CA", start=None, end=None, ref_axis=No
*MDAnalysis.analysis.helanal* instead of being printed to stdout.
"""

universe = MDAnalysis.Universe(pdbfile, permissive=permissive)
universe = MDAnalysis.Universe(pdbfile)
if not (start is None and end is None):
if start is None:
start = universe.atoms[0].resid
Expand Down
Loading