From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Mon Feb 11 2013 - 11:06:47 CST

On Mon, Feb 11, 2013 at 4:46 PM, DanLiu <Dan.Liu_at_simap.grenoble-inp.fr> wrote:
> Dear All,
> I'm wondering if it's possible to plot a 3-D structure with only xyz
> coordinates. Or I have to change the file into some other supported format?

there is no direct reader support for this kind of format.

but you can write your own reader in Tcl script.
you need to know how many atoms you need to create and then you can do
something like this:

set numatoms 500
set mol [mol new atoms $numatoms]
animate dup $mol
set sel [atomselect $mol all]
$sel set name A
$sel set type A

now you can open your file, read it line by line and append those to a
list of coordinate triples and then do
$sel set {x y z} $list

it may be simpler, though, to just output in the .xyz format. where
the first line is the number of atoms, the second line is ignored and
then each line has to have 4 columns, the first column is the
Element/Name/Type of the atom and the other three the x-, y-, and z
coordinates of the atoms.

axel.

> My data is list as follows:
> ⋯⋯
> -2.57811 0 -4.17147
> 0 -4.17147 -2.57811
> 0 -4.17147 2.57811
> -2.57811 0 4.17147
> -4.17147 2.57811 0
> 2.57811 0 -4.17147
> 4.17147 -2.57811 0
> 2.57811 0 4.17147
> 0 4.17147 2.57811
> 0 4.17147 -2.57811
> 4.17147 2.57811 0
> -4.17147 -2.57811 0
> 4.33744 6.91555 2.74408
> 6.91555 2.74408 4.33744
> ⋯⋯
> Thank you in advance.
> Best wishes
> Dan

--
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
International Centre for Theoretical Physics, Trieste. Italy.