Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ environment:
global:
CONDA_CHANNELS: conda-forge
CONDA_DEPENDENCIES: pip setuptools wheel cython mock six biopython networkx joblib matplotlib scipy vs2015_runtime pytest mmtf-python GridDataFormats hypothesis pytest-cov codecov
PIP_DEPENDENCIES: gsd==1.5.2 duecredit
PIP_DEPENDENCIES: gsd==1.9.3 duecredit
DEBUG: "False"
MINGW_64: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin
OPENBLAS_64: https://3f23b170c54c2533c070-1c8a9b3114517dc5fe17b7c3f8c63a43.ssl.cf2.rackcdn.com/openblas-5f998ef_gcc7_1_0_win64.zip
Expand Down
3 changes: 2 additions & 1 deletion package/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The rules for this file:
* release numbers follow "Semantic Versioning" http://semver.org

------------------------------------------------------------------------------
mm/dd/yy richardjgowers, kain88-de, lilyminium, p-j-smith
mm/dd/yy richardjgowers, kain88-de, lilyminium, p-j-smith, bdice

* 0.21.0

Expand All @@ -30,6 +30,7 @@ Enhancements
* New analysis.hydrogenbonds.HydrogenBondAnalysis class for the analysis of
hydrogen bonds. Simpler interface, more extensible and better performance
than analysis.hbonds.HydrogenBondAnalysis (PR #2237)
* GSD reader is now supported on Windows (Issue #1923, PR #2384)

Deprecations
* analysis.hbonds.HydrogenBondAnalysis will be deprecated in 1.0
Expand Down
6 changes: 1 addition & 5 deletions package/MDAnalysis/coordinates/GSD.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@

import numpy as np
import os
if os.name != 'nt':
import gsd.hoomd
import gsd.hoomd

from . import base

Expand All @@ -73,9 +72,6 @@ def __init__(self, filename, **kwargs):

.. versionadded:: 0.17.0
"""
if os.name == 'nt':
raise NotImplementedError("GSD format not supported on Windows")

super(GSDReader, self).__init__(filename, **kwargs)
self.filename = filename
self.open_trajectory()
Expand Down
9 changes: 2 additions & 7 deletions package/MDAnalysis/topology/GSDParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
the :class:`~MDAnalysis.coordinates.GSD.GSDReader` class.

.. _HOOMD: http://codeblue.umich.edu/hoomd-blue/index.html
.. _HOOMD GSD: https://bitbucket.org/glotzer/gsd
.. _HOOMD GSD: https://github.com/glotzerlab/gsd


To load a GSD HOOMD file::
Expand All @@ -54,9 +54,7 @@
from __future__ import absolute_import

import os
if os.name != 'nt':
# not supported on windows
import gsd.hoomd
import gsd.hoomd
import numpy as np

from . import guessers
Expand Down Expand Up @@ -110,9 +108,6 @@ def parse(self, **kwargs):

.. versionadded:: 0.17.0
"""
if os.name == 'nt':
raise NotImplementedError("GSD format not supported on Windows")

attrs = {}

with gsd.hoomd.open(self.filename,mode='rb') as t :
Expand Down
2 changes: 2 additions & 0 deletions package/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,8 @@ def dynamic_author_list():
]
if not os.name == 'nt':
install_requires.append('gsd>=1.4.0')
else:
install_requires.append('gsd>=1.9.3')

setup(name='MDAnalysis',
version=RELEASE,
Expand Down
8 changes: 0 additions & 8 deletions testsuite/MDAnalysisTests/coordinates/test_gsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@
def GSD_U():
return mda.Universe(GSD)

@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")
def test_gsd_positions(GSD_U):
# first frame first particle
ts = GSD_U.trajectory[0]
Expand All @@ -47,20 +45,14 @@ def test_gsd_positions(GSD_U):
assert_almost_equal(GSD_U.atoms.positions[0],
[ -5.58348083, -9.98546982, -10.17657185])

@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")
def test_gsd_n_frames(GSD_U):
assert len(GSD_U.trajectory) == 2

@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")
def test_gsd_dimensions(GSD_U):
ts = GSD_U.trajectory[0]
assert_almost_equal(ts.dimensions,
[ 21.60000038,21.60000038,21.60000038,90.,90.,90.])

@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")
def test_gsd_data_step(GSD_U):
assert GSD_U.trajectory[0].data['step'] == 0
assert GSD_U.trajectory[1].data['step'] == 500
10 changes: 3 additions & 7 deletions testsuite/MDAnalysisTests/topology/test_gsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
import os


@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")
class TestGSDParser(ParserBase):
parser = mda.topology.GSDParser.GSDParser
ref_filename = GSD
Expand All @@ -48,9 +46,7 @@ def test_attr_size(self, top):
assert len(top.names) == top.n_atoms
assert len(top.resids) == top.n_residues
assert len(top.resnames) == top.n_residues

@pytest.mark.skipif(os.name == 'nt',
reason="gsd not windows compatible")

class TestGSDParserBonds(ParserBase):
parser = mda.topology.GSDParser.GSDParser
ref_filename = GSD_bonds
Expand All @@ -67,10 +63,10 @@ def test_attr_size(self, top):
assert len(top.names) == top.n_atoms
assert len(top.resids) == top.n_residues
assert len(top.resnames) == top.n_residues

def test_atoms(self, top):
assert top.n_atoms == self.expected_n_atoms

def test_bonds(self, top):
assert len(top.bonds.values) == self.expected_n_bonds
assert isinstance(top.bonds.values[0], tuple)
Expand Down