Skip to content

Commit d9ee934

Browse files
robertodrilfreddy
authored andcommitted
Update license header in plot_cavity.py
1 parent c8bebf0 commit d9ee934

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

tools/plot_cavity.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#
22
# PCMSolver, an API for the Polarizable Continuum Model
3-
# Copyright (C) 2017 Roberto Di Remigio, Luca Frediani and collaborators.
3+
# Copyright (C) 2018 Roberto Di Remigio, Luca Frediani and collaborators.
44
#
55
# This file is part of PCMSolver.
66
#
@@ -90,11 +90,9 @@ def shiftedColorMap(cmap, start=0, midpoint=0.5, stop=1.0, name='shiftedcmap'):
9090
reg_index = np.linspace(start, stop, 257)
9191

9292
# shifted index to match the data
93-
shift_index = np.hstack([
94-
np.linspace(
95-
0.0, midpoint, 128, endpoint=False), np.linspace(
96-
midpoint, 1.0, 129, endpoint=True)
97-
])
93+
shift_index = np.hstack(
94+
[np.linspace(0.0, midpoint, 128, endpoint=False),
95+
np.linspace(midpoint, 1.0, 129, endpoint=True)])
9896

9997
for ri, si in zip(reg_index, shift_index):
10098
r, g, b, a = cmap(ri)
@@ -134,10 +132,9 @@ def plot(cavity_npz, surf_func_npy=None):
134132
colors = mappable.to_rgba(surf_func.flatten())
135133
# Generate list of vertices
136134
vertices = [
137-
list(zip(cavity['vertices_' + str(i)][0, :],
138-
cavity['vertices_' + str(i)][1, :],
139-
cavity['vertices_' + str(i)][2, :]))
140-
for i in range(nElements)
135+
list(
136+
zip(cavity['vertices_' + str(i)][0, :], cavity['vertices_' + str(i)][1, :], cavity['vertices_' + str(i)][
137+
2, :])) for i in range(nElements)
141138
]
142139
elements = Poly3DCollection(vertices, facecolors=colors)
143140
ax.add_collection3d(elements)

0 commit comments

Comments
 (0)