Skip to content

Issues with appending agents to TrajectoryData object #153

@mogres

Description

@mogres

System and Software

  • simulariumio Version: 1.7.1
  • Python Version: 3.10.10
  • Operating System: linux

Description

While appending new AgentData obtained from the CytosimConverter to an existing TrajectoryData object, I ran into the following issues:

  1. used_uids, new_agent_index and raw_uid are being saved as floats instead of ints, which caused issues during indexing
  2. The result.display_data dictionary was not updated during the call to append_agents, which resulted in the added agents defaulting to a sphere geometry
  3. the default buffer size used by get_copy_with_increased_buffer_size was too large (1000) for my use case. This resulted in 1000 elements being added every step even when they were not necessary.

Expected Behavior

New AgentData should be added to the existing TrajectoryData with its DisplayData carried over.

Reproduction

  1. Create a CytosimData object (fiber_data) from a cytosim output file
  2. Create a CytosimConverter object (cytosim_converter) from the CytosimData object.
  3. Repeat steps 1 and 2 with a different output file to get a new CytosimConverter object new_cytosim_converter
  4. Append new agent data to the original using:
trajectory_data = cytosim_converter._data  # this is a TrajectoryData object
new_agent_data = new_cytosim_converter._data.agent_data  # this is an AgentData object
trajectory_data.append_agents(new_agent_data)

I can share the data and a notebook with the reproduction example if needed.

More Information

Local changes I made to fix these issues are available at https://github.com/mogres/simulariumio/tree/multiple_cytosim_repeats

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    🌳 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions