Feature Requests item #2791729, was opened at 2009-05-14 09:14
Message generated for change (Comment added) made by hansonr
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=2791729&group_id=23629

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: New IO Format
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Laurence Marks (ldm001)
Assigned to: Nobody/Anonymous (nobody)
Summary: Wien2k + vibrations

Initial Comment:
Can you please provide a reader for Wien2k DFT files www.wien2k.at (I can 
provide format info etc). Also, can you provide information on how to input 
vibrational modes; I am writing an interface for these so can produce a file in 
the "appropriate" format, if someone tells me what!

----------------------------------------------------------------------

>Comment By: Bob Hanson (hansonr)
Date: 2009-05-16 21:57

Message:
by the way, the latest version allows 

load andalusite.struct {1 1 1} spacegroup "none"

meaning "load the "MULT" atoms and disregard the symmetry matrices.

This might be handy for testing. 

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-16 21:52

Message:
Glad to hear hydroxy.struct has the gap. That was what I was worried about.
There are still a few general issues I know we need to consider, but yes, I
think we can say we have a Wien2k reader. Happy day! I hope you enjoy it.
I'd like to close this feature request.

Vibrations -- I'd be very interested in discussing this. Right now you can
read vibrations independently from a file. Vibrations are a "settable"
quantity, meaning that you can create them on the fly using a script:


{atomno=3}.vxyz = {1/2 0 0}

note the factional coordinates here. So really the "file" that would be
read would simply be a Jmol script file. Since you apparently have no
specific file format for these vibrations, why not simply put them out in
this format? You have to be a little careful, because "atomno=3" might mean
more than one atom when more than one model is loaded. 

Or you could create a "data" file, read it using the file() function:

 mydata = file("datafile.txt")

and have it be a list of the three vector quantities for all atoms loaded.

and then manipulate that file as desired to create the vibrations. 

I would say the thing to do would be to try that and see how it goes, then
consider working with an official specification. One thing I am loath to do
is to create readers for ad hoc data types that really aren't anybody's
standard. 

Symmetry and vibrations. Now there's an interesting thought. I wonder how
that works. A single point can be generated by several different
operations, but these in general would transform a vector (a pair of
points) differently. So while the same point can come from two different
symmetry operations, transformation of a vector by the same two operations
might produce different results. 

Bob

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-16 15:51

Message:
I think this is "done", at least as far as a reader for Wien2k files. 

Slightly beyond this; I would like (for research purposes) to be able to
visualize crystalline vibrations, it is hard to understand them otherwise.
Some possibilities:
a) Add a "Vibration Mode X" line or many lines at the end of a WIen2k file
which would then be read as atom.vectorX, atom.vectorY, atom.vectorZ. This
extra section would be optional. Since I would tack this extra section at
the end of a conventional Wien2k file, I can make it anything that is
conventient.
b) Impliment a "add vibrations file ABC" as a more general version to add
vibrations to any data set.

These are two plausible methods, there might be others, I could not find
anything in the documentation.

N.B., For crystalline vibrations one needs to apply the symmetry elements
to the vibrations of course.

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-16 12:51

Message:
Thanks for the testing. I've been testing on my computer (under cygwin),
loading different examples and everything looks fine. The Pyrope struct
"ang" is almost certainly an error on my part. At least on my computer
hydroxy.struct is right; it's a hydrated MgO (111) surface so should have a
big gap in the center; I'll upload a jpeg of it in a few moments. I know
Peter Blaha has also been testing it; he's got a bit further than me,
editing bonds etc and redefining polyhedra.

I have not had a chance to read the documentation yet to see what can be
done. Peter has constructed an xyz file to show vibrations (works nicely),
although it's not for a crystal. There may be ways to do this, I have to
hunt around more.

Two minor general comments: maybe there are ways to do this.
a) It would be nice to use ionic radii rather than covalent. I realise
that covalent are more relevant for proteins etc, but not so much in the
solid state.
b) Crystalline vibrations would be nice to have, not just xyz. I'm going
to ask the IUCR cif commission to include this in the next revision.
c) Personally, I like to have the unix commands "sh", "ls" available --
you would be surprised just how often one wants them around, it always
helps me with debugging.




----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-16 12:03

Message:
Checking files further. In my opinion....

Pyrope.struct says ang, but it is not. I hope you hand-coded that in just
as a test; Jmol can't be expected to read "unit=ang" as BOHR. B Lattice
looks good to me.

NdZrO.struct looks good -- F lattice

SrTiO3t.struct looks good -- I lattice

TiO.struct looks good - Hall symbol: -F 4 2 3

Ti2O3.struct looks good -- same as AM model

FeF2.struct looks good -- CXY

Olivine, Andalusite SrTiO3 all look fine.

hydroxy.struct -- no good. Exactly what are the lattice shifts for "CXZ"?
Are you sure this is the structure? The symmetry? I guess we are missing
something with the CXZ lattice.

You will need, of course, to check all these yourself, but they appear
"reasonable" to me, except ofr hydroxy.struct. I'd like to see an image
created from another program and a list of all actual operators and 


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-16 00:29

Message:
One last upload for the evening. Here I think I have correctly interpreted
Wien2k User Manual Table 4.4:

P --> SHELX P
B --> SHELX I
CXY --> SHELX C
CXZ --> SHELX B
CYZ --> SHELX A
R --> SHELX R

I guess that makes reasonable sense


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-15 18:33

Message:
OK, I think we are there. The Jar file, again, is in
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip

see http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm for
examples.

Thank you very much, Laurence, for getting me going on this. Turns out
there was a bug that only applied to SHELX files, which also require
lattice elaboration. The missing atoms are now there. 

Again, Jmol by default honors the symmetry operators in the file and does
not presume packing is desired. You will probably want the PACKED keyword:

load TiO.struct PACKED

like that, or the -1 option if more than one unit cell is indicated:

load Ti2O3.struct {444 666 -1}

I am eager for you to test this extensively and let me know how it goes. 

Also, for the record, the way Jmol applies lattices is by converting the
lattice information to specific Hall notations:

  final static String[] latticeTranslationData = {
    "\0", "unknown",         ""
    ,"P", "primitive",       ""
    ,"I", "body-centered",   " 1n"
    ,"R", "rhombohedral",    " 1r 1r"
    ,"F", "face-centered",   " 1ab 1bc 1ac"
    ,"A", "A-centered",      " 1bc"
    ,"B", "B-centered",      " 1ac"
    ,"C", "C-centered",      " 1ab"
    ,"S", "rhombohedral(S)", " 1s 1s"
    ,"T", "rhombohedral(T)", " 1t 1t"
  };

This is in symmetry.HallInfo.java. Jmol can read Hall notation directly
and translate that to exactly the rotations necessary to complete the
symmetry. Note that since Jmol can also apply symmetry expressed in the
LOAD command to override what is in the file, one can do some very
interesting things, like only apply a portion of the full symmetry.

So please check this out with all available lattice types.

Bob

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-15 12:01

Message:
Right, the Jar file is in
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.zip

I just uploaded a revision - still not quite right, because I'm missing a
few atoms, but the PACKED option is much better. You will always want it, I
think:

load TiO.struct PACKED

like that, or

load TiO.struct {444 666 -1}

which packs a larger set of unit cells. 

There is still a bug, but I'm out of time today.

Bob


----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-15 10:46

Message:
Sorry, but I'm stuck testing and cannot get anywhere. It looks like the
latest binary is 7.35 and the Wien2k is in 7.36. I downloaded 7.36 but it
looks like it needs to be build (no jmol.jar), and I'm not familiar with
this. In my cygwin environment I have gcj and jikes....

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-15 09:12

Message:
You are moving way too fast for me; I have not had a chance to install the
version yet! Please give me a few days.

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-15 08:42

Message:
Laurence, 

I'd like to move this discussion to the Jmol user list. 

There are many options for Jmol loading. Take a look at
http://chemapps.stolaf.edu/jmol/docs  under LOAD and consider the options
there for crystal structures. One option is, as you suggest, to fold back
atoms into the unit cell. But there are lots of situations (whole small
molecules, for instance) where that is not desired. People have come up
with a variety of ways to work with this. 

One simple way to get all the atoms, and duplicates for atoms with
positions on faces, is to generate a 3x3x3 cube and look only at the center
cube:

load xxxxx {3 3 3}
center cell=666
unitcell offset {1 1 1}
display cell=666

This is probably the best way to go, because it adds the duplication of
points at 0 and 1, which otherwise might be missed. 

Please use that method and then let me know if atoms are still missing.
They should not be. 

Bob


----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-15 08:35

Message:
Another, trickier (general) bug; the minimizer function assumes that the
structure is an isolated cell and ignores the translational symmetry.
Probably less than simple to fix.

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-15 08:19

Message:
Two comments:
a) There is a glitch in what atoms are shown. For instance, for Andalusite
{111} and Olivine {111} atoms are shown for z > 1 or < 0; they should have
been translated back into the unit cell. This is a clear example of what I
mentioned in my previous email and looks like it is for the c-axis only.
b) I'm told (by someone else who is testing the code) that the Bravais
lattices are not being recognized. To clarify, Wien2k is using the (fairly
standard) convention of only showing the symmetry operations without the
Bravais symmetry. Therefore for a F cell for each of the symmetry
operations in the file, the additional translations (0,1/2,1/2);
(1/2,0,1/2); (1/2,1/2,0) need to be included. I've added a simple TiO fcc
cell so this can be checked. (It might be bug a), I have not checked
myself.)

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-15 07:18

Message:
I assume that this version is in the latest SVN (which I can figure out how
to download) -- please confirm; I'll test it and have some of my students
(and a few others) test it as well.

I meant something different with spacefilling. All the bulk structures I
attached are dense, so have no voids but it looked like there were some in
the displays (there were small so it was hard to see). It may be that some
symmetry operations+translations are missing. This is a bit tricky because
algorithmically it's not a question of a limited loop over the initial
positions, but one needs to use a larger loop over translations and test if
the final atoms fall within the bounds. This may be too obscure, it's early
in the morning. To be 100% clear, to get a cell between -1 and +1 you don't
want (in Fortran, I'm C/Java challenged)

DO IX=-1,1
  DO ISYM=1,NSYM
     X=...
    ...
  ENDDO
ENDO

But instead a loop like

DO IX=-2,2
   DO ISYM=1,NSYM
     XTMP=...
     IF (XTMP.GE.-1).and.(XTMP.LE.1)then
        X=XTMP
        ...
     ENDIF
   ENDDO
ENDDO




----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 21:53

Message:
Laurence,

You can set the spacefill radius to anything you want. If the charges are
not present, then the radii will not be representative of metal and oxide
ions. The easiest way to rectify this is to set the charges, then specify
spacefill ionic:

For example:

{_Al}.charge = 3;
{_Ti}.charge = 3;
{_Si}.charge = 4;
{_O}.charge = -2;
{_Mg}.charge = 2;
{_Ca}.charge = 2;
{_Na}.charge = 1;
{_K}.charge = 2;

select *; spacefill ionic;


OK, so at this point I need you to field test this with a bunch of
different structures and symmetries. If you haven't used Jmol much, you are
in for a treat. There are lots and lots of interesting renderings you can
do based on symmetry and space groups, including planes based on Miller
indices. I particularly like planes such as:

isosurface hkl {1 1 0} map molecular


Bob

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 18:23

Message:
Yup, it looks right. There is a bit of an issue with space-filling "nicely"
and also for Andalusite and Olivine both of which should be almost the same
as the AM cif structure. (The lattice parameters and atomic positions may
be a few percent different, I cannot remember if I DFT optimized these
structures or not.)

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 18:12

Message:
OK, I can verify that the AM cif structure and the Wien2k  structure are
identical.

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 18:04

Message:
(for a comparison of Ti2O3 from the American Mineralogist database and your
struct file, see the uploaded wien-test.png

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 18:03

Message:
Success! Since the symmetry definitions are in terms of the primitive cell,
I needed to stay with that. So all I am doing is converting the hex cell
dimensions to rhombohedral. This certainly provides the correct structure
in the case of Ti2O3. See now 

http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm
http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.jar 

Maybe still some atoms missing? -- oh, maybe those MULT ones?



----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 17:49

Message:
p55 of http://www.wien2k.at/reg_user/textbooks/usersguide.pdf has the
specific matrices to use to convert both directions. I may have sent an
older version earlier, and they don't look like what either of us had. I
would assume that this pdf is correct.

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 17:28

Message:
I've uploaded all the types I have and will upload a simpler CXY in a few
moments; I don't have an example CYZ file and have asked for one, but
people in Europe may already be asleep.

I'm less than 90% confident of the transformation and I may have given you
wrong information earlier. I did a test for the matrix I gave you, taken
from some rarely used contributed code, and I'm less than confident that
it's right. I've asked for clarification on this as well since I don't want
to steer you hopelessly wrong.

In terms of units, checking again
unit=bohr or unit=BOHR or nothing are all BOHR
unit=ang  or unit=ANG  for Angstroms
Pyrope is a B lattice



----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 17:04

Message:
how do I convert a b c alpha beta gamma (hex) to a b c alpha beta gamma
(rhom)?

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 16:57

Message:
So those coordinates are opposite mine, but that's a minor detail. If the
symmetry elements are in the R lattice, then what I need to do is convert
the h cell to an r cell and stick with the coord and symmetries there. I
will try that....

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 16:54

Message:
You are ahead of me. To convert from the Wien2k units (which are in the
rhombohedral cell) to the hexagonal cell the matrix I found in the code is

ah = -ar * 2/3 + br * 2/3 + cr * 2/3
bh = -ar * 1/3 - br * 1/3 +  cr * 2/3
ch =  ar * 1/3 + br * 1/3 + cf * 1/3

(ah, bh, ch) would be in the full hexagonal cell; (ar, br, cr) are what is
listed in the struct file. I am pretty sure that the symmetry operations
will be in terms of the R-lattice (not the H-lattice).

I've uploaded some more file examples.




----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 16:43

Message:
OK, what I believe should be true is this:

      float a = parseFloat(line.substring(12,22));
      float b = parseFloat(line.substring(25,35));
      float c = parseFloat(line.substring(38,48));
      if (isrhombohedral) {
        float ar = a;
        float br = b;
        float cr = c;
        a = ar * 2 / 3 - br * 1 / 3 - cr * 1 / 3;
        b = ar * 1 / 3 + br * 1 / 3 - cr * 2 / 3;
        c = ar * 1 / 3 + br * 1 / 3 + cr * 1 / 3;        
      }

That's from
http://homepage2.nifty.com/a-m/bandmemo/node1.html#SECTION00012500000000000000

Is that correct? 

Now, the next question is this: Are the symmetry operations expressed in
terms of the hexagonal lattice or the rhombohedral lattice?



----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 16:32

Message:
nope, too crypic. I need clear specifications for how to transform the a b
c  coordinates in the file to a'b'c' cooresponding to the indicated unit
cell.

----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 16:26

Message:
Web source:
http://www.wien2k.at/reg_user/textbooks/usersguide.pdf

I've attached Ti2O3.struct converted to a standard cif

Hunting a bit more, I think Angstroms have vanished from all the cases, so
please assume that everything is in BOHR (even if that key is not there)
and just ignore the units.

I'll put some additional cases in shortly (alas, it deletes the message if
not sent).




----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 16:14

Message:
Oh, just saw that latest comment ---

ANG like that, in caps? 

unit=ANG

or 

unit=ang

right now I see

unit=bohr

not 

unit=BOHR

OK, I'll try fixing the coordinate values for R. 

Some examples of the F, B, I, C$$ cells would be helpful. So you mean the
symmetry operations are not complete? Really?


----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 16:11

Message:
I could use a bit more information 

-- web source for that PDF guide? 
-- check of the Ti2O3 structure.

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 15:09

Message:
OK, check out http://chemapps.stolaf.edu/jmol/docs/examples-11/new.htm

http://chemapps.stolaf.edu/jmol/docs/examples-11/Jmol-11.jar contains the
files. I think there is a problem with Ti2O3.struct -- it doesn't say BOHR,
but it looks like Bohr, and I'm not convinced the rhombahedral cell is
loading properly. I might need some help with that. But please check all of
them to see if they are loading properly. 

Bob Hanson


----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 13:27

Message:
Nobody was ldm001 (different computer, forgot to login).

----------------------------------------------------------------------

Comment By: Nobody/Anonymous (nobody)
Date: 2009-05-14 13:26

Message:
Yes, units=Bohr means atomic units or Bohr's, conversion a0=0.529177E0.

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 13:11

Message:
When it says units=Bohr, that does mean this unit cell is in Bohr?

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 13:10

Message:
Looks reasonable. The files you have provided should provide plenty of
examples. Jmol should be able to read the unit cell and symmetries and
derive all additional atoms from just the first atom in the set. This will
be a good test, of course, since the additional atom positions are also
given. I'll give it a try.



----------------------------------------------------------------------

Comment By: Laurence Marks (ldm001)
Date: 2009-05-14 10:23

Message:
I've attached some examples, as well as the relevant part of the
documentation. Fairly self evident and the Space Group numbers/names are
normally correct although it is more robust to use the symmetry.

Are all the atoms needed (as against the symmetry reduced set)? It is
simpler to use the reduced set although I can also do the full set. Also,
does Jmol understand about "F", "B", "I" cells etc to know that these
operations are implied or will it need more information? (For assorted
reasons A, B, or C centered cells are coded differently in Wien2k.)

----------------------------------------------------------------------

Comment By: Jonathan Gutow (gutow)
Date: 2009-05-14 10:15

Message:
As there is money being collected for distribution of Wien2k, I suggest
that the Wien2k project should put some programmer time into developing the
file reader if they want Jmol to read their files.

Jonathan

----------------------------------------------------------------------

Comment By: Bob Hanson (hansonr)
Date: 2009-05-14 09:47

Message:
please attach a few file examples. Vibrational modes are read along with
file data, so if your file format included vibrational mode information
then that could be automatically incorporated. If your vibrational
information must be separate, then I recommend the extended XYZ format.
This is simply:

# of atoms
comment line
[atom line]
[atom line]
[atom line]
[atom line]
...


where the atom line is simply:

element x y z vibx viby vibz

For example:

3
CoolMolecules Vibration Generator
O 0 0 0 0 0.005799922848714869 0
H 0.7698177590299584 -0.5480927092035551 0 0.06516975737819754
-0.04639938278971895 0
H -0.7698177590299585 -0.548092709203555 0 -0.06516975737819754
-0.04639938278971894 0


For multiple modes, you just string as many of those together as you
want:


3
CoolMolecules Vibration Generator mode 1
O 0 0 0 0 0.005799922848714869 0
H 0.7698177590299584 -0.5480927092035551 0 0.06516975737819754
-0.04639938278971895 0
H -0.7698177590299585 -0.548092709203555 0 -0.06516975737819754
-0.04639938278971894 0
3
CoolMolecules Vibration Generator mode 2
O 0 0 0 0 0.005799922848714869 0
H 0.7698177590299584 -0.5480927092035551 0 0.06516975737819754
-0.04639938278971895 0
H -0.7698177590299585 -0.548092709203555 0 -0.06516975737819754
-0.04639938278971894 0
3
CoolMolecules Vibration Generator mode 3
O 0 0 0 0 0.005799922848714869 0
H 0.7698177590299584 -0.5480927092035551 0 0.06516975737819754
-0.04639938278971895 0
H -0.7698177590299585 -0.548092709203555 0 -0.06516975737819754
-0.04639938278971894 0


And if you want to include charge, you can do that between z and vibx:

element x y z charge vibx viby vibz



----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=379136&aid=2791729&group_id=23629

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to