Skip to content

Fix VMD script bugs: pbctools + atomselect segfault#29

Open
pinedaps wants to merge 1 commit into
mlund:mainfrom
pinedaps:fix-traj-tcl-vmd193
Open

Fix VMD script bugs: pbctools + atomselect segfault#29
pinedaps wants to merge 1 commit into
mlund:mainfrom
pinedaps:fix-traj-tcl-vmd193

Conversation

@pinedaps

Copy link
Copy Markdown
Contributor

Two bugs fixed in the auto-generated traj.tcl script.

1. Missing package require pbctools

The pbc box call fails with invalid command name "pbc" unless pbctools is explicitly loaded. Added package require pbctools before the pbc box call.

2. Segfault on frame navigation

Registering faunus_update_charges as a trace variable vmd_frame(0) callback was creating and deleting an atomselect on every frame step, causing a segfault in VMD 1.9.3.

Fix: reuse a single persistent atomselect (_charge_sel) created once at load time, and update its frame inside the callback instead of allocating a new selection each time.

Note: Both issues appear to stem from the template being developed against VMD 1.9.4a57, where pbctools is auto-loaded and atomselect memory management differs.

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