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
5 changes: 5 additions & 0 deletions contact_map/contact_map.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""
Contact map analysis.
"""
# Maintainer: David W.H. Swenson (dwhs@hyperblazer.net)
# Licensed under LGPL, version 2.1 or greater
import collections
import itertools
import pickle
Expand Down Expand Up @@ -59,6 +61,9 @@ def _atom_slice(traj, indices):
if traj._have_unitcell:
unitcell_lengths = traj._unitcell_lengths.copy()
unitcell_angles = traj._unitcell_angles.copy()
else:
unitcell_lengths = None
unitcell_angles = None
time = traj._time.copy()

# Hackish to make the smart slicing work
Expand Down
2 changes: 1 addition & 1 deletion contact_map/plot_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def ranged_colorbar(cmap, norm, cbmin, cbmax, name="Partial Map"):
new_norm = matplotlib.colors.Normalize(vmin=cbmin, vmax=cbmax)
sm = plt.cm.ScalarMappable(cmap=new_cmap, norm=new_norm)
sm._A = []
cb = plt.colorbar(sm)
cb = plt.colorbar(sm, fraction=0.046, pad=0.04)
return cb