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

Fixed missing mdtraj.utils.six error #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions bgmol/tpl/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,8 @@
from mdtraj import version
from mdtraj.core.topology import _topology_from_subset, Topology
from mdtraj.utils import unitcell
from mdtraj.utils.six import PY3
if PY3:
basestring = str
import mdtraj.core.element as elem
from mdtraj.utils import in_units_of, ensure_type, import_, cast_indices
from mdtraj.utils.six import string_types
from ..util.importing import import_openmm

try:
Expand Down Expand Up @@ -94,7 +90,7 @@ def load_hdf5(filename, stride=None, atom_indices=None, frame=None):
--------
mdtraj.HDF5TrajectoryFile : Low level interface to HDF5 files
"""
if not isinstance(filename, string_types):
if not isinstance(filename, str):
raise TypeError('filename must be of type string for load_lh5. '
'you supplied %s' % type(filename))

Expand Down Expand Up @@ -1027,7 +1023,7 @@ def __init__(self, file, reportInterval, coordinates=True, time=True,
temperature=True, velocities=False, forces=False, atomSubset=None):
"""Create a HDF5Reporter.
"""
if isinstance(file, basestring):
if isinstance(file, str):
self._traj_file = self.backend(file, 'w')
elif isinstance(file, self.backend):
self._traj_file = file
Expand Down