|
1 | 1 | #
|
2 | 2 | # 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. |
4 | 4 | #
|
5 | 5 | # This file is part of PCMSolver.
|
6 | 6 | #
|
@@ -90,11 +90,9 @@ def shiftedColorMap(cmap, start=0, midpoint=0.5, stop=1.0, name='shiftedcmap'):
|
90 | 90 | reg_index = np.linspace(start, stop, 257)
|
91 | 91 |
|
92 | 92 | # 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)]) |
98 | 96 |
|
99 | 97 | for ri, si in zip(reg_index, shift_index):
|
100 | 98 | r, g, b, a = cmap(ri)
|
@@ -134,10 +132,9 @@ def plot(cavity_npz, surf_func_npy=None):
|
134 | 132 | colors = mappable.to_rgba(surf_func.flatten())
|
135 | 133 | # Generate list of vertices
|
136 | 134 | 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) |
141 | 138 | ]
|
142 | 139 | elements = Poly3DCollection(vertices, facecolors=colors)
|
143 | 140 | ax.add_collection3d(elements)
|
|
0 commit comments