From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Apr 19 2004 - 11:49:49 CDT

Lubos,
  You used the word "crash", but it sounds like the plugin is just
returning an error message, is this correct? Lets only use the word
"crash" to refer to actual program crashes, so as not to cause confusion. :-)

The comment line isn't read by the current version of the xyzplugin as
you've discovered. This is actually mentioned in the xyzplugin src, but
didn't get mentioned in the plugin documentation page, so I'll fix this
momentarily. Here's the text from the source file:

/*
 * XYZ molecule file format:
 * XYZ files are a simple molecule file format suitable for output
 * by homegrown software since they are very minimalistic. They don't
 * even include bonding information.
 *
 * [ # optional comment line ] comment line (can be blank)
 * ^^^ note, this is not supported by the current
 * version of this plugin.
 * [ N ] # of atoms, required by this xyz reader plugin
 * [ molecule name ] name of molecule (can be blank)
 * atom1 x y z [optional data] atom name followed by xyz coords
 * atom2 x y z [ ... ] and and (optionally) other data.
 * ... instead of atom name the atom number in
 * atomN x y z [ ... ] the PTE can be given.
 *
 * Note that this plugin currently ignores everything following the z
 * coordinate (the optional data fields).
 */

If you want to make a modified xyz plugin to read your files that contain
trajectory information, the best reference to look at would probably be
the code in read_text_timestep() in dcdplugin.c. Essentially, you just
need to set ts->A, ts->B, ts->C, ts->alpha, ts->beta, and ts->gamma
for each timestep and you should be good to go.

Let us know if you need help with this.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Apr 19, 2004 at 04:16:46PM +0200, Lubos Vrbka wrote:
> hi all,
>
> from the header of the xyzplugin.c file i can see that the comment line
> (second line in the xyz file) is not supported...
> when i try to read single frame xyz file with something written on the
> 2nd line it loads fine.
> when i try to read multiple frame xyz file with all "2nd lines" blank it
> also loads fine.
> however, with a comment written on the second lines (in fact, i store
> pbc information in format " box x_dim y_dim z_dim" there, it crashes
> with "ERROR: expecting 220 atoms, found only 221"
> why is it crashing? from the source it seems it should be skipped...
>
> and another question - if i'd like to modify the xyzplugin to support my
> "format" of xyz file with box information on the second line - could
> you please tell me where to look for the appropriate code how to store
> box information for the whole trajectory in the vmd?
>
> regards,
>
> --
> Lubos
> _@_"

-- 
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