Skip to content

Commit

Permalink
Merge pull request #39 from jchodera/master
Browse files Browse the repository at this point in the history
Bugfixes and mdtraj update
  • Loading branch information
jchodera authored Jun 25, 2016
2 parents 61dd70d + 13152ec commit 6c7fb72
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 4 deletions.
4 changes: 2 additions & 2 deletions devtools/conda-recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ requirements:
- pandas
- pytables
- natsort
- mdtraj 1.5.1 # TODO remove me when segment_id bug is fixed (this is installed through openmoltools)
- mdtraj

run:
- python
- numpy
- pandas
- pytables
- natsort
- mdtraj 1.5.1 # TODO remove me when segment_id bug is fixed (this is installed through openmoltools)
- mdtraj

test:
requires:
Expand Down
19 changes: 17 additions & 2 deletions fahmunge/automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def strip_water(path_to_merged_trajectories, output_path, topology_selection, mi
for in_filename in in_filenames:
protein_filename = os.path.join(output_path, os.path.basename(in_filename))
args = (in_filename, protein_filename, min_num_frames, topology_selection)
work.append(args)

# create no-solvent pdbs for all RUNs. Relies on trajectories having
# runX-cloneY.h5 filename format
Expand All @@ -206,7 +205,23 @@ def strip_water(path_to_merged_trajectories, output_path, topology_selection, mi
pdb_filename = os.path.join(output_path, pdb_name)
if not os.path.exists(pdb_filename):
print("Stripping solvent from '%s' to create '%s'" % (in_filename, pdb_filename))
create_nosolvent_pdb(in_filename, pdb_filename, topology_selection)
try:
create_nosolvent_pdb(in_filename, pdb_filename, topology_selection)
except Exception as e:
print(str(e))

# Sanity check that this is an HDF5 file.
if in_filename.endswith('.h5'):
print("Deleting corrupted file '%s'..." % in_filename)
os.remove(in_filename)

# Skip work.
print('Skipping solvent stripping...')
continue

# Append work
work.append(args)


print('%s : %d trajectories to process' % (output_path, len(work)))

Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
numpy
pandas
tables
natsort
mdtraj
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@
Operating System :: MacOS
"""

from pip.req import parse_requirements

# parse_requirements() returns generator of pip.req.InstallRequirement objects
install_reqs = parse_requirements('requirements.txt', session=False)

# reqs is a list of requirement
# e.g. ['django==1.5.1', 'mezzanine==1.4.6']
reqs = [str(ir.req) for ir in install_reqs]

def find_packages():
"""Find all of fahmunge's python packages.
Adapted from IPython's setupbase.py. Copyright IPython
Expand Down Expand Up @@ -155,4 +164,10 @@ def run(self):
classifiers=CLASSIFIERS.splitlines(),
packages=["fahmunge"],
package_dir={'fahmunge': 'fahmunge'},
entry_points={
'console_scripts' : [
'munge-fah-data = fahmunge.cli:main',
]
},
install_requires=reqs,
**setup_kwargs)

0 comments on commit 6c7fb72

Please sign in to comment.