Skip to content

Commit

Permalink
Fixed flake8 problems.
Browse files Browse the repository at this point in the history
Signed-off-by: Timothy Click <tclick@alumni.ou.edu>
  • Loading branch information
tclick committed Jul 25, 2019
1 parent 4f28c03 commit cdb0faf
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/fluctmatch/commands/cmd_table_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,8 @@ def cli(logfile, top1, top2, coord, table, outfile):
resnI = []
resnJ = []
for segidI, resI, segidJ, resJ in constants[columns].values:
resnI.append(resnames.loc[(segidI, resI),])
resnJ.append(resnames.loc[(segidJ, resJ),])
resnI.append(resnames.loc[(segidI, resI)])
resnJ.append(resnames.loc[(segidJ, resJ)])
constants["resnI"] = pd.concat(resnI).values
constants["resnJ"] = pd.concat(resnJ).values

Expand Down
8 changes: 5 additions & 3 deletions src/fluctmatch/coordinates/COR.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ def write(self, selection: Union[mda.Universe, mda.AtomGroup],
# Write all atoms
current_resid: int = 1
resids: List[int] = attrs["resids"]
for i, pos, resname, name, chainID, resid, tempfactor in zip(
range(n_atoms), coor, attrs["resnames"], attrs["names"],
attrs["chainIDs"], attrs["resids"], attrs["tempfactors"]):
for (i, pos, resname, name, chainID,
resid, tempfactor) in zip(range(n_atoms), coor,
attrs["resnames"], attrs["names"],
attrs["chainIDs"], attrs["resids"],
attrs["tempfactors"]):
if not i == 0 and resids[i] != resids[i - 1]:
current_resid += 1

Expand Down
10 changes: 5 additions & 5 deletions src/fluctmatch/intcor/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,11 @@ def create_empty_table(universe: Union[mda.Universe, mda.AtomGroup]
zeros: pd.DataFrame = pd.DataFrame(np.zeros((n_angles, 5),
dtype=np.float))
cols: pd.DataFrame = pd.DataFrame([
atom1.segids, atom1.resnums, atom1.names, atom2.segids,
atom2.resnums, atom2.names, atom3.segids, atom3.resnums,
atom3.names, ["??", ] * n_angles, ["??", ] * n_angles,
["??", ] * n_angles
]).T
atom1.segids, atom1.resnums, atom1.names,
atom2.segids, atom2.resnums, atom2.names,
atom3.segids, atom3.resnums, atom3.names,
["??", ] * n_angles, ["??", ] * n_angles,
["??", ] * n_angles]).T
table: pd.DataFrame = pd.concat([table, cols, zeros], axis=1)
else:
n_dihedrals: int = len(dihedrals)
Expand Down

0 comments on commit cdb0faf

Please sign in to comment.