Skip to content

Commit

Permalink
Finish Hotfix-1
Browse files Browse the repository at this point in the history
  • Loading branch information
tclick committed Jul 8, 2019
2 parents b046577 + 3f94583 commit 55b7691
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/fluctmatch/fluctmatch/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from future.builtins import (dict, super)
from future.utils import (PY2, native_str)

import copy
import logging
import os
import subprocess
Expand All @@ -36,7 +35,6 @@
import pandas as pd
import MDAnalysis as mda
import MDAnalysis.analysis.base as analysis
from MDAnalysis.coordinates import memory
from MDAnalysis.lib import util as mdutil
from fluctmatch.fluctmatch.data import charmm_split

Expand Down Expand Up @@ -237,16 +235,16 @@ def write_charmm_files(universe,

# Write the new trajectory in Gromacs XTC format.
if write_traj:
universe.trajectory.rewind()
with mda.Writer(
native_str(filenames["traj_file"]),
universe.atoms.n_atoms,
istart=None,
istart=universe.trajectory.time,
remarks="Written by fluctmatch.") as trj:
logger.info("Writing the trajectory {}...".format(
filenames["traj_file"]))
logger.warning("This may take a while depending upon the size and "
"length of the trajectory.")
universe.trajectory.rewind()
with click.progressbar(universe.trajectory) as bar:
for ts in bar:
trj.write(ts)
Expand Down Expand Up @@ -336,6 +334,7 @@ def split_gmx(info, data_dir=path.join(os.getcwd(), "data"), **kwargs):
if index is not None:
command = [
"gmx",
"trjconv",
"-s",
topology,
"-f",
Expand Down
2 changes: 1 addition & 1 deletion src/fluctmatch/topology/RTF.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def _write_residues(self, residue):
key = "ATOM"
atoms = residue.atoms
lines = ((atoms.names, atoms.types, atoms.charges)
if not np.issubdtype(atoms.types.dtype, np.signedinteger) else
if np.issubdtype(atoms.types.dtype, np.signedinteger) else
(atoms.names, atoms.names, atoms.charges))
lines = pd.concat([pd.Series(_) for _ in lines], axis=1)
np.savetxt(self.rtffile, lines, fmt=native_str(self.fmt[key]))
Expand Down

0 comments on commit 55b7691

Please sign in to comment.