Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#24 file reader for CASTEP and AIMS input files

open
Bob Hanson
File IO (8)
5
2010-11-22
2009-08-20
Joerg Meyer
No

I have added two readers for input files, which make use of the periodic boundary conditions (PBC) infrastructure of Jmol
- CASTEP: http://www.castep.org (.cell files - only PBC)
- FHI-aims: http://www.fhi-berlin.mpg.de/aims/ (geometry.in files - both cluster models and PBCs)
Using the signed applet, the readers can be tried here
http://w3.rz-berlin.mpg.de/~meyer/jmol-demo-20090819/

Discussion

<< < 1 2 (Page 2 of 2)
  • Nicolas
    Nicolas
    2010-11-22

    • assigned_to: nobody --> hansonr
     
  • Joerg Meyer
    Joerg Meyer
    2011-04-30

    patch against revision 15409: version 1.3 of AimsReader fixing support for fractional coordinates

     
  • Joerg Meyer
    Joerg Meyer
    2011-04-30

    Still haven't forgotten about the CASTEP/CML stuff. But at least fractional coordinates in AimsReader for now ;-)

     
  • Bob Hanson
    Bob Hanson
    2011-04-30

    I'm not sure that's a question or an answer. Please elaborate.

     
  • Joerg Meyer
    Joerg Meyer
    2011-04-30

    Bob, I apologize for having been so unclear. I was trying to refer to jmol-AimsReader_fractional_coordinates.patch which I attached this morning. It would be great if you could check that in. CASTEP/CML is still on my longer term to do list, but unfortunately there are still other things with higher priority.

     
  • Bob Hanson
    Bob Hanson
    2011-04-30

    can we have a couple of example files?

     
  • Joerg Meyer
    Joerg Meyer
    2011-05-01

     
    Attachments
  • Joerg Meyer
    Joerg Meyer
    2011-05-01

     
    Attachments
  • Joerg Meyer
    Joerg Meyer
    2011-05-01

    Sure - good point. I have uploaded two examples.

     
  • Bob Hanson
    Bob Hanson
    2011-05-01

    Let's discuss this some more, and get some more examples. Can you send some less symmetric examples: hexagonal cells, triclinic, etc. These are very limited that we have here. Or can we always assume an orthorhombic system?

     
  • Bob Hanson
    Bob Hanson
    2011-05-01

    please check SVN -- atom/atom_frac should be working properly for AIMS reader in both 12.1.45 and 12.0.42. I didn't implement it exactly this way, and I brought the AIMS reader in line with other readers.

     
  • Bob Hanson
    Bob Hanson
    2011-05-01

    I wrote: "Let's discuss this some more, and get some more examples. Can you send some less symmetric examples: hexagonal cells, triclinic, etc. These are very limited that we have here. Or can we always assume an orthorhombic system?"

    But that's quite unnecessary. Of course, the lattice vector defs are sufficient for any unit cell. So we should be all set there.

    Notice that now the AIMS reader is reading the defaults properly -- if no lattice_vector records are present, and no unit cell information is present in the LOAD command, then no unit cell is depicted. If unit cell information is present in the file, then it is shown, even if the load command does not include a lattice specification such as {1 1 1} or PACKED. This is to be consistent with other unit-cell-based file loading.

    Note that now you can override or define explicitly the cell dimensions in the LOAD command. For example:

    load "f2.in" {1 2 1} unitcell [16.504 0 0 0 8.252 0 0 0 0]

    will load an AIMS file that is really a slab in SLAB mode based on the given lattice vectors instead of the z lattice vector defined in the file. Of course, if this is done, then one needs to be sure to use all atom and not atom_frac records, or the z component will be skewed.

     
  • Joerg Meyer
    Joerg Meyer
    2011-05-02

    Looks good on this end - quite some nice clean-up indeed! Sorry for not having looked more extensively at the much evolved infrastructure - I was in a hurry. (At least I hope that I haven't overlooked addPrimitiveLatticeVector and friends in the initial commit - it avoids the private lattice transformation in that class after all.) Using setFractionalCoordinates to set a state variable during reading is great as it greatly simplifies things. Just out of curiosity: The private boolean isFractional certainly does not hurt to have, but I guess it could also be dropped?

     
  • Bob Hanson
    Bob Hanson
    2011-05-02

    this.isFractional is important, I think, because it tells us if there is need to reset the global variable and unit cell between atom and atom_frac. Usually this is done just occasionally by a reader; in this case it could be every other line.

     
  • Joerg Meyer
    Joerg Meyer
    2011-05-02

    I thought that what you describe is already achieved by calling setFractionalCoordinates with the right boolean value before setAtomCoord - independent of whether this.isFractional is stored in AimsReader or not. But anyway, it certainly does not hurt.

     
  • Bob Hanson
    Bob Hanson
    2011-05-02

    yes, but then you would be calling it every single line in some cases, and that would be unnecessary. This does more than just set the boolean; it recreates the unit cell, I think.

     
<< < 1 2 (Page 2 of 2)