RFdiffusion icon indicating copy to clipboard operation
RFdiffusion copied to clipboard

Fix: Conditionally pass idx_pdb to writepdb to avoid AttributeError with SelfConditioning/ScaffoldedSampler

Open woodsh17 opened this issue 3 months ago • 1 comments

This PR resolves an AttributeError that occurs when running the example script design_macrocyclic_binder.sh using the SelfConditioning or ScaffoldedSampler samplers. After PR #348, the code attempted to pass sampler.idx_pdb to the writepdb function, but certain sampler classes (such as SelfConditioning and ScaffoldedSampler) do not always define the idx_pdb attribute. This resulted in a runtime error.

With this change, idx_pdb is only passed to writepdb if the sampler object actually has the attribute.

woodsh17 avatar Sep 29 '25 18:09 woodsh17

Hi @woodsh17 thanks for preparing the fix, can this PR be merged?

prihoda avatar Oct 21 '25 08:10 prihoda