# (c) Max Kresch & John McCorquodale, licensed under BSD, 2008.
#     See LICENSE for further details. 

A) Building
  1) on upgrayedd
     $ mk
     This should build the executables "randomQs", "h", and "pd".

  2) elsewhere, edit the file "mk" appropriately.  Namely, you will need to 
      point at the appropriate version of lapack.

  3) acml functions and structs used: 
     - doublecomplex
     - fastexp(double t)
     - fastcos(double t)
     - fastsincos(double t, double* sin, double* cos)

  4) lapack functions used:
     - zheev  (with acml call signature) 

B) Input configuration
  1) Symmetries, in input-generators/syms/
     - Cubic, Face-centered-tetragonal, and Hexagonal symmetries are already
       generated for you.

     - Otherwise, in getSyms, edit around line 99-116, such that the
       appropriate generating symmetries.  Then:

       $ getSyms.py
       $ pkl2Syms.py

       Which should produce a c-binary file "syms" with the group elements
       forming the closure of the elements you added into getSyms.py.

  2) System, in input-generators/syspy  (sysperl, if you prefer perl to python)
     - There are quite a few examples, ready to go:
       Al, Ce, Ho, In, Ni, NiAl, Sc, Tb, Zr
       If you want to use one of these, say "Al", do:
       $ Al
       This will generate the c-binary file "system" which is input to the BvK
       code.

    - If you wish to generate a different system, use one of the existing ones
      as a template.  If you needed to generate your own "syms" file, copy it
      over:
      $ cp ../syms/syms ./syms/mySyms
      and refer to it appropriately in your call to System.write at the bottom
      of your new system file.

   - Either way, copy the system file into the `root' directory.
     $ cp system ../../

  3) qs -- Optional
     - There are some codes for generating qs in input-generators/qs. 
       a) in the main directory, you may run:
          $ randomQs N
          with N integer, which will generate N^3 random Qs in the IBZ.
       b) also in the main directory, you may run:
          $ regularQs N
          with N integer, which will generate N^3 regularly spaced Qs in the 
          IBZ.
       c) in input-generators/qs/cubicMPGrid type:
          $ make
          $ h N
          where the integer N gives the cube root of the number of Qs to be 
          generated and `cropped' by symmetries.
       d) in input-generators/qs/directionalQs, edit the file h.c to pick out
          the direction you want -- there are some examples -- then type:
          $ mk
          $ h
     For (b) and (c), you will have to copy the generate file "WeightedQ" 
     into the root directory.

     You may also generate your own list of Q-points, so long as it complies
     with the idf "WeightedQ" standard, you need only place your file in the
     root directory and calle it "WeightedQ".

C) Running, from the `root' directory.
  1) $ h Vecs
     where Vecs is an integer:  Vecs = 1 means calculate eigenvectors, Vecs = 0 
     means don't.  You need eigenvectors if you want a partial DOS.
     (On upgrayedd, you may use $ rsh -. n## h V )
     where the ## represents the numbers for your node of choice.
  2) $ pd Vecs df
     Vecs has the same meaning as above.  You don't _have_ to use eigenvectors
     if you've calculated them, but you may not use them if you haven't. 
     df is a double, and it will be the bin spacing in THz.

  3) If you want random Qs, you may use the following shortcut (once your 
     system is in place as ./input-generators/syspy/mySystem ):
     $ a mySystem Vecs N df
     where Vecs, N, and df have the same meanings as given above.
     (you can also easily edit "a" to use regularly gridded Qs.)
   
