The *xyz reader *ignores everything else on the first line after the
integer.

The *reader format resolver *is what requires just an integer (the number
of atoms) and white space on the first line in order to send the data to
the xyz reader, because there are several other formats that start with an
integer.

So the documentation is technically not incorrect, but what it does not say
is that if you do not specify the format using "xyz::" as a prefix to the
file name in the LOAD command, then Jmol will not recognize your file as
"XYZ" format.

So no need to change your files unless you need to drag-drop them into Jmol
or JSmol. If you are using the LOAD command, just do it like this:

load "xyz::broken.xyz"

It would not be impossible to add one more check to Jmol's  resolver to
allow for this. But that would introduce a whole new problem of "false
positives," and it probably would be better to align the documentation with
what is standard and indicated at
https://en.wikipedia.org/wiki/XYZ_file_format rather than allowing that
resolution.

Bob





On Mon, Sep 26, 2016 at 5:46 AM, Peter Brommer <p.brom...@warwick.ac.uk>
wrote:

> Hi,
>
> This concerns Jmol Version: 14.6.1_2016.08.11  2016-08-11 22:11.
>
> There is an issue with reading/recognising xyz files. On the wiki page
> http://wiki.jmol.org/index.php/File_formats/Formats/XYZ those are
> described as having two header lines per step in a multi-step format, the
> first of which states "the number of atoms in that step. This integer may
> be preceded by whitespace; anything on the line after the integer is
> ignored.”
>
> However, if there is anything after the integer, the xyz file is no longer
> recognised and the load command gives up with “script ERROR: unrecognised
> file format for file broken.xyz". I attach two files which only differ by
> a supposedly ignored character after the number of atoms, and both fulfil
> the standard given in the wiki.
>
> So, at the moment there is a discord between documentation and code. I’d
> prefer this was fixed in the code, so I don’t have to change a bunch of xyz
> files.
>
> Cheers,
>
> Peter
>
> --
> Peter Brommer
>
>
> ------------------------------------------------------------
> ------------------
>
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to