colvars
colvars copied to clipboard
Molecule view reset when loading coordinates in VMD
When creating a colvar that requires reading a PDB file, some background operation (possibly the creation of a temporary molecule) cause the camera viewpoint to be reset. It would be nice to avoid this side effect if possible.
This is the line where the VMD PDB file reader is invoked (original commit 23f8480151ecc4efb03c9172e0804456d509d6ce):
int tmpmolid = vmd->molecule_load(-1, pdb_filename, "pdb", tmpspec);
A VMD DrawMolecule
instance is needed to get the various fields, but it should be possible to call directly the molfile function, since the format is assumed to be "pdb"
anyway.
From a quick look at the implementation of molecule_load()
there are a few plugin functions to be called. If you choose to just back up the VMD view with Tcl in the Dashboard (useful for other purposes, too), please keep the issue open. I wouldn't mind removing the need to create a temporary molecule altogether and use the molfile reader directly.
If you choose to just back up the VMD view with Tcl in the Dashboard
Done, keeping the issue open.
Done. Completed!