Hello John,

You should be able to access the struct like an object in a typical programming language.

s1.pos for positions
s1.pos(1,:) for the first row
s1.pos(:,1) for the first column

s1.a(1) for the first lattice coordinate and such

What you're seeing now is a referral to the entire object.

It's indeed possible that some octave setting caused it to print the entire object before (maybe even version dependent). But proper accessing is done through the .pos .

You'd have to check the octave manual for full details on this behavior.


Hope I was of some help,

Michael Sluydts

John Rundgren schreef op 17/09/2014 14:02:
Dear Wien2k team,

SRC_structeditor/doc/readme.txt shows on pages 1-2 how the octave statement
>s1=loadstruct("GaAs.struct")
generates all thinkable coordinates of the structure. But when I changed to Ubuntu14 the s1 coordinates remained invisible.

From Gavin Abo I gratefully got a hint to write
>print_struct_array_contents(1)
>s1=loadstruct("GaAs.struct"),
giving readable coordinates wrapped in brackets as shown below.

Remarkably, Ubuntu14-octave has not completely forgotten the readme.txt instructions:
>s2=makeprimitive(s1)
and
>s3=makeconventional(s1)
write out coordinates as earlier without brackets.

How can one get around the write-out confusion?
Best, John Rundgren

s1 =
  1x1 struct array containing the fields:
    a =
    {
      [1,1] =
         10.6839450000000   10.6839450000000   10.6839450000000
    }
    alpha =
    {
      [1,1] =
         90   90   90
    }
    aname =
    {
      [1,1] =
Ga
As
    }
    jrj =
    {
      [1,1] =
         781
         781
    }
    lat2car =
    {
      [1,1] =
         10.683945000000000    0.000000000000000 0.000000000000000
          0.000000000000000   10.683945000000000 0.000000000000000
          0.000000000000000    0.000000000000000 10.683945000000000
    }
    brlat =
    {
      [1,1] =
         0.000000000000000   5.341972500000000   5.341972500000000
         5.341972500000000   0.000000000000000   5.341972500000000
         5.341972500000000   5.341972500000000   0.000000000000000
    }
    lattic =
    {
      [1,1] = F
    }
    nat =
    {
      [1,1] =  2
    }
    pos =
    {
      [1,1] =
         0.000000000000000   0.000000000000000   0.000000000000000
         0.250000000000000   0.250000000000000   0.250000000000000
    }
    r0 =
    {
      [1,1] =
         5.00000000000000e-05
         5.00000000000000e-05
    }
    rmt =
    {
      [1,1] =
         2
         2
    }
    zz =
    {
      [1,1] =
         31
         33
    }

_______________________________________________
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html

_______________________________________________
Wien mailing list
Wien@zeus.theochem.tuwien.ac.at
http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
SEARCH the MAILING-LIST at:  
http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html

Reply via email to