martinpacesa / BindCraft

User friendly and accurate binder design pipeline
MIT License
287 stars 59 forks source link

ValueError: RGBA values should be within 0-1 range #4

Closed joerloeffler closed 1 month ago

joerloeffler commented 1 month ago

Hey, sorry, but I ran into another issue when running the provided example. Stage 4 finishes, but then I get the following:

Trajectory successful, final pLDDT: 0.74 Traceback (most recent call last): File "/home/joe/Software/BindCraft/bindcraft.py", line 108, in trajectory = binder_hallucination(design_name, target_settings["starting_pdb"], target_settings["chains"], File "/home/joe/Software/BindCraft/functions/colabdesign_utils.py", line 227, in binder_hallucination plots = af_model.animate(dpi=150) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/colabdesign/af/utils.py", line 118, in animate return make_animation(sub_traj, pos_ref=pos_ref, length=self._lengths, File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/colabdesign/shared/plot.py", line 303, in make_animation ims[-1].append(plot_pseudo_3D(pos[k], c=plddt[k], Ls=Ls, cmin=0.5, cmax=0.9, flags)) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/colabdesign/shared/plot.py", line 177, in plot_pseudo_3D lines = mcoll.LineCollection(seg_xy[order], colors=colors[order], linewidths=linewidths, File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/collections.py", line 1393, in init super().init( File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/collections.py", line 206, in init self._internal_update(kwargs) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/artist.py", line 1216, in _internal_update return self._update_props( File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/artist.py", line 1192, in _update_props ret.append(func(v)) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/collections.py", line 1463, in set_color self.set_edgecolor(c) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/collections.py", line 834, in set_edgecolor self._set_edgecolor(c) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/collections.py", line 813, in _set_edgecolor self._edgecolors = mcolors.to_rgba_array(c, self._alpha) File "/home/joe/miniforge3/envs/BindCraft/lib/python3.9/site-packages/matplotlib/colors.py", line 476, in to_rgba_array raise ValueError("RGBA values should be within 0-1 range") ValueError: RGBA values should be within 0-1 range

Did anyone else encounter this?

sokrypton commented 1 month ago

Can you try downgrade matplotlib? pip install matplotlib==3.7.1

joerloeffler commented 1 month ago

Thank you for pointing this out! with the downgrade the code runs! Thank you @sokrypton