Skip to content

Commit

Permalink
When copying a StructureSeq where structure is None, return a Sequenc…
Browse files Browse the repository at this point in the history
…e instead
  • Loading branch information
e-pettersen committed Jan 31, 2025
1 parent 53433c4 commit c28c233
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/bundles/atomic/src/molobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1141,6 +1141,8 @@ def bulk_set(self, residues, characters, *, fire_triggers=True):
self._fire_trigger('residues changed', self)

def __copy__(self):
if self.structure is None:
return super().__copy__()
f = c_function('sseq_copy', args = (ctypes.c_void_p,), ret = ctypes.c_void_p)
copy_sseq = StructureSeq(f(self._c_pointer))
Sequence.__copy__(self, copy_seq = copy_sseq)
Expand Down
2 changes: 1 addition & 1 deletion src/bundles/atomic_lib/bundle_info.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<BundleInfo name="ChimeraX-AtomicLibrary" version="14.1.11"
<BundleInfo name="ChimeraX-AtomicLibrary" version="14.1.12"
package="chimerax.atomic_lib"
purePython="false"
installedDataDir="data"
Expand Down

0 comments on commit c28c233

Please sign in to comment.