Ren,
Try using `from_gsd_snapshot` to convert GSD snapshots to HOOMD snapshots. It appears that your conversion is missing some quantities, such as particle images.
------
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
> On Jun 28, 2021, at 11:30 AM, Work Ren <
rh....@gmail.com> wrote:
>
> Hi,
> I have a well ordered interface in a gsd file, when I tried to read the last frame into the hoomd.Snapshot() and replicate, the initial particle positions seem change a lot, no longer ordered interface at all, the script I am using is as the following:
>
> hoomd_traj = gsd.hoomd.open(gsd_file)
> snapshot_gsd= hoomd_traj.read_frame(frame_to_read)
>
> snapshot_hoomd = hoomd.Snapshot()
> snapshot_hoomd.particles.N = snapshot_gsd.particles.N
>
> snapshot_hoomd.particles.position[:] = snapshot_gsd.particles.position[:]
> snapshot_hoomd.particles.typeid[:]=snapshot_gsd.particles.typeid[:]
> snapshot_hoomd.particles.types = snapshot_gsd.particles.types
> snapshot_hoomd.configuration.box=snapshot_gsd.configuration.box
> snapshot_hoomd.particles.mass[:] = 1
> snapshot_hoomd.bonds.N = snapshot_gsd.bonds.N
> snapshot_hoomd.bonds.types = snapshot_gsd.bonds.types
> snapshot_hoomd.bonds.group[:] = snapshot_gsd.bonds.group[:]
> snapshot_hoomd.bonds.typeid[:] = snapshot_gsd.bonds.typeid[:]
> snapshot_hoomd.angles.N = snapshot_gsd.angles.N
> snapshot_hoomd.angles.types = snapshot_gsd.angles.types
> snapshot_hoomd.angles.group[:] = snapshot_gsd.angles.group[:]
> snapshot_hoomd.angles.typeid[:] = snapshot_gsd.angles.typeid[:]
>
> snapshot_hoomd.replicate(3,3,1)
>
> The ordered interface is as the following
> <2021-06-28 23-27-54屏幕截图.png>
> After reading into the snapshot, it becomes:
> <2021-06-28 23-28-45屏幕截图.png>
> Any suggestions?
> I am using the 3.0 beta 6.
>
> When I was using 2.9.3, there was no such issues.
>
> Thanks a lot.
> Ren Hua
>
> --
> You received this message because you are subscribed to the Google Groups "hoomd-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
hoomd-users...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/hoomd-users/7f5cdcf8-e0f0-48f6-9b06-ff592c100e41n%40googlegroups.com.
> <2021-06-28 23-28-45屏幕截图.png><2021-06-28 23-27-54屏幕截图.png>