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

Avoid UNIX paths in accessor functions and sort datasets #31

Merged
merged 3 commits into from
Nov 19, 2018
Merged
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
22 changes: 11 additions & 11 deletions src/alchemtest/gmx/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def load_benzene():

module_path = dirname(__file__)

data = {'Coulomb': glob(join(module_path, 'benzene/Coulomb/*/dhdl.xvg.bz2')),
'VDW': glob(join(module_path, 'benzene/VDW/*/dhdl.xvg.bz2'))}
data = {'Coulomb': sorted(glob(join(module_path, 'benzene', 'Coulomb', '*', 'dhdl.xvg.bz2'))),
'VDW': sorted(glob(join(module_path, 'benzene', 'VDW', '*', 'dhdl.xvg.bz2')))}

with open(join(module_path, 'benzene', 'descr.rst')) as rst_file:
fdescr = rst_file.read()
Expand All @@ -47,9 +47,9 @@ def load_expanded_ensemble_case_1():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'expanded_ensemble/case_1/CB7_Guest3_dhdl.xvg.gz'))}
data = {'AllStates': glob(join(module_path, 'expanded_ensemble', 'case_1', 'CB7_Guest3_dhdl.xvg.gz'))}

with open(join(module_path, 'expanded_ensemble/case_1', 'descr.rst')) as rst_file:
with open(join(module_path, 'expanded_ensemble', 'case_1', 'descr.rst')) as rst_file:
fdescr = rst_file.read()

return Bunch(data=data,
Expand All @@ -71,9 +71,9 @@ def load_expanded_ensemble_case_2():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'expanded_ensemble/case_2/*.xvg.gz'))}
data = {'AllStates': sorted(glob(join(module_path, 'expanded_ensemble', 'case_2', '*.xvg.gz')))}

with open(join(module_path, 'expanded_ensemble/case_2', 'descr.rst')) as rst_file:
with open(join(module_path, 'expanded_ensemble', 'case_2', 'descr.rst')) as rst_file:
fdescr = rst_file.read()

return Bunch(data=data,
Expand All @@ -95,9 +95,9 @@ def load_expanded_ensemble_case_3():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'expanded_ensemble/case_3/*.xvg.gz'))}
data = {'AllStates': sorted(glob(join(module_path, 'expanded_ensemble', 'case_3', '*.xvg.gz')))}

with open(join(module_path, 'expanded_ensemble/case_3', 'descr.rst')) as rst_file:
with open(join(module_path, 'expanded_ensemble', 'case_3', 'descr.rst')) as rst_file:
fdescr = rst_file.read()

return Bunch(data=data,
Expand All @@ -118,7 +118,7 @@ def load_water_particle_without_energy():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'water_particle', 'without_energy', '*.xvg.bz2'))}
data = {'AllStates': sorted(glob(join(module_path, 'water_particle', 'without_energy', '*.xvg.bz2')))}

with open(join(module_path, 'water_particle', 'descr.rst')) as rst_file:
fdescr = rst_file.read()
Expand All @@ -141,7 +141,7 @@ def load_water_particle_with_potential_energy():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'water_particle', 'with_potential_energy', '*.xvg.bz2'))}
data = {'AllStates': sorted(glob(join(module_path, 'water_particle', 'with_potential_energy', '*.xvg.bz2')))}

with open(join(module_path, 'water_particle', 'descr.rst')) as rst_file:
fdescr = rst_file.read()
Expand All @@ -164,7 +164,7 @@ def load_water_particle_with_total_energy():

module_path = dirname(__file__)

data = {'AllStates': glob(join(module_path, 'water_particle', 'with_total_energy', '*.xvg.bz2'))}
data = {'AllStates': sorted(glob(join(module_path, 'water_particle', 'with_total_energy', '*.xvg.bz2')))}

with open(join(module_path, 'water_particle', 'descr.rst')) as rst_file:
fdescr = rst_file.read()
Expand Down