Skip to content

Fix writing to read-only array bug in nerdss_converter.py#208

Open
PhysFoley wants to merge 1 commit intosimularium:mainfrom
PhysFoley:bugfix/nerdss-write-to-readonly-array
Open

Fix writing to read-only array bug in nerdss_converter.py#208
PhysFoley wants to merge 1 commit intosimularium:mainfrom
PhysFoley:bugfix/nerdss-write-to-readonly-array

Conversation

@PhysFoley
Copy link
Copy Markdown

This pull request fixes a small bug in the NERDSS converter that was causing it to fail due to attempting to write to a read-only numpy array.

Time estimate or Size

xsmall

Problem

NERDSS trajectories were failing to convert to simularium format due to an issue within the NerdssConverter class where it tried to write to elements of a read-only numpy array.

Solution

Create a copy of the numpy array with the same shape, edit this array, then overwrite the original.

Type of change

  • Bug fix

Change summary:

  • Fixed error "assignment destination is read-only" when calling NerdssConverter._read_pdb_files()

Steps to Verify:

  1. Attempt to convert a NERDSS simulation using ionerdss.convert_simularium()

Keyfiles (delete if not relevant):

  1. simulariumio/nerdss/nerdss_converter.py

@PhysFoley PhysFoley requested a review from a team as a code owner April 1, 2026 17:39
@PhysFoley PhysFoley requested review from ascibisz and toloudis and removed request for a team April 1, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant