From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Feb 27 2007 - 12:48:46 CST

Hi,
  Thanks for reporting this, indeed you found a bug in VMD which we'd
never written an explicit test for previously. The problem occurs because
you've loaded trajectory data, but _not_ structure data, and then you've
attempted to save the molecule to a file format the _requires_ the presence
of structure data. Due to the lack of a safety check in this circumstance,
your sequence of operations causes a crash. Justin Gullingsrud sent me a
patch already early this morning which prevents a crash from occuring.

Now, however, even though the cause of the crash is fixed, the particular
operations you're trying to perform are still not legal, since there's no
way for VMD to make up the missing structure data required by file formats
such as XYZ, POSCAR, etc. You _must_ load a structure file into the molecule
along with the DCD if you want to export it again in one of these formats.
While VMD should not have crashed as a result of your attempts, what you're
trying to do cannot possibly work, and would also not work with CatDCD either
since in both cases you have loaded insufficient information into the programs
to be able to write out new structure files. (e.g. atom names, residue names,
etc..)

All you need to do to alleviate your problem is to load a matching PDB, PSF,
or another structure file along with your DCD files, before you try and write
them back out in the other file formats. That should cure your problems.

The next beta version of VMD (which I'll post later today) will include
the fix for the crash, and will correctly emit error messages when this
situation arises.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Feb 26, 2007 at 06:03:54PM -0500, Nichols A. Romero wrote:
> John,
>
> Thanks for your whick reply. The DCD file was created with QS which is part
> of CP2K (cp2k.berlios.de).
>
> Axel Kohlmeyer helped with the programming of the plugin I believe.
>
> The steps are
> 1. New Molecule
> 2. Load the DCD file
> 3. Click on the Molecule and do "Save Coordinates"
> 4. Save to XYZ and POSCAR leads to a core dump.
>
> If I save out to another DCD file, it does *NOT* crash though.
>
> I just also tested PDB and that seems to crash as well, like XYZ and POSCAR.
>
> I could probably even create a small DCD file that you could play around
> with. The one I am working
> with is too big to e-mail (even with compression).
>
> On 2/26/07, John Stone <johns_at_ks.uiuc.edu> wrote:
> >
> >
> >Hi,
> > Can you tell me the exact sequence of steps you're performing, and
> >what program generated the original DCD file? Do you get the same
> >behavior
> >if you save back out to another DCD file, or is this problem only
> >associated
> >with formats such as XYZ etc?
> >
> > John
> >
> >On Mon, Feb 26, 2007 at 05:28:41PM -0500, Nichols A. Romero wrote:
> >> Oops... I forgot to mention that those sequence of operations cause VMD
> >to
> >> crash.
> >>
> >> On 2/26/07, Nichols A. Romero <naromero_at_gmail.com> wrote:
> >> >
> >> >Hi,
> >> >
> >> >I am reporting a bug in VMD 1.8.5. I am running RHEL on an Intel 32-bit
> >> >system. I also have nVIDIA video card
> >> >but I don't believe any of these details are relevant since I can
> >> >reproduce this problem on SGI Altix (IA64)
> >> >system as well which is quite different from my desktop machine.
> >> >
> >> >I am simply loading a Trajectory in DCD format and then trying to
> >export
> >> >the coordinates to ANY format, e.g.
> >> >xyz, POSCAR, etc. I have run with the debug option and this is what I
> >get.
> >> >
> >> >
> >> >(gdb) where
> >> >#0 0x0051b600 in strncpy () from /lib/tls/libc.so.6
> >> >#1 0x08142465 in MolFilePlugin::write_structure ()
> >> >#2 0x081020c7 in CoorPluginData::CoorPluginData ()
> >> >#3 0x0817219a in VMDApp::molecule_savetrajectory ()
> >> >#4 0x081b7186 in SaveTrajectoryFltkMenu::do_save ()
> >> >#5 0x083bde7c in Fl_Button::handle ()
> >> >#6 0x083ba310 in fl_throw_focus ()
> >> >#7 0x083ba402 in Fl::handle ()
> >> >#8 0x083cd057 in fl_handle ()
> >> >#9 0x083cc66e in Fl::remove_fd ()
> >> >#10 0x083cc890 in fl_wait ()
> >> >#11 0x083b9bb6 in Fl::wait ()
> >> >#12 0x0816e1fd in VMDApp::VMDupdate ()
> >> >#13 0x08184857 in main ()
> >> >
> >> >
> >> >
> >> >
> >> >
> >> >--
> >> >Nichols A. Romero, Ph.D.
> >> >1613 Denise Dr. Apt. D
> >> >Forest Hill, MD 21050
> >> >443-567-8328 (C)
> >> >410-306-0709 (O)
> >> >
> >>
> >>
> >>
> >> --
> >> Nichols A. Romero, Ph.D.
> >> 1613 Denise Dr. Apt. D
> >> Forest Hill, MD 21050
> >> 443-567-8328 (C)
> >> 410-306-0709 (O)
> >
> >--
> >NIH Resource for Macromolecular Modeling and Bioinformatics
> >Beckman Institute for Advanced Science and Technology
> >University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
> >Email: johns_at_ks.uiuc.edu Phone: 217-244-3349
> > WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
> >
>
>
>
> --
> Nichols A. Romero, Ph.D.
> 1613 Denise Dr. Apt. D
> Forest Hill, MD 21050
> 443-567-8328 (C)
> 410-306-0709 (O)

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078