
version 7.2.1 06.08.2026
^^^^^^^^^^^^^^^^^^^^^^^
1. Adapted the move routine for method=4 of SC option.
   [files: eff_atom.f90, move.f90]

version 7.2 05.08.2026
^^^^^^^^^^^^^^^^^^^^^^^
1. Opening a file is made secure. Added writing into tetr.log inQ QUICK routine
   [file: input_tetr.f90]
2. Added some write statements into tetr.log. 
   [file: eff_atom.f90]
3. NEW: added writing all parameters into [SC_option.ref] file (SC menu) before S.
   [file: eff_atom.f90]
4. NEW: added reading all parameters from [SC_option.ref] file (SC menu) at the beginning.
   [file: eff_atom.f90]
5. NEW: added options Dc, Dt and Dp for previewing C-, T- and Pt-region atoms.
   [file: eff_atom.f90]

version 7.11 04.08.2026
^^^^^^^^^^^^^^^^^^^^^^^
A few bugs as wekll as added some niceties in printing statements and comments.
   [files: eff_atom.f90, input_tetr.f90, move.f90]

version 7.1 17.07.2026
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a new option 2S in the main menu to find the best extensions of two surface slabs
   that would make (after the corresponding rotation and rescaling of the 2nd) to match
   each other as much as possible. It is possible either to fix the first lattice or allow
   it to extend as well. By a repetitive call of this option it is possible to put together
   more than two surface slabs, i.e., create a sandwich system of considerable complexity.
   (1) This option only suggests the appropriate extensions of both lattices.
   (2) Once the extensions are known, it is necessary use option Su in M to extend each of the
       two lattices saving the coordinates in fractional coordinates.
   (3) Replace the lattice vectors in the second geometry file by the lattice vectors of the first
       (in an editor, outside TETR, i.e., "manually")
   (4) Then add the second file to the first one using Ad option of the M menu.
   (5( Always check by Bb that the whole slab continues nicely across the X-Y plane
   [files: main.f90, lattice_scale.f90]

version 7.01 07.06.2026
^^^^^^^^^^^^^^^^^^^^^^^
1. For Mac Sequoia 2 addiitonal lines in the Makefile are needed to copmile with Absoft:

   LDFLAGS = -Wl,-ld_classic
   af90 $(FFLAGS) $(LDFLAGS) -o $......

   Then it compiles successfully!
   [files: Makefile]

2. Added a write statement in neb_interpolate() in main.f90 (option NB) as otherwise it was not clear
   that an input is expected.
   [files: main.f90]

version 7.0 12.07.2025
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option 1P added to the main menu to save in the correct format (correctly ordered
   atoms) the CP2K input file for a single calculation of the current.
   Directory example_1P contains an example including the tetr input file (tetr < inp)
   [files: Makefile, eff_atom_one.f90, main.f90]

version 6.6 22.05.2025
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW, SC option of the main menu (method 4): the tip positions on the grid can now be
   chosen much closer to the surface. In doing so, the close enough positons of the tip
   to the surface and the molecule on it are identified (option Ev), and the corresponding
   grid points avoided; this happens if the distance between
   the tip and the surface is smaller than the distance set up by the option Sf in Settings.
   When the grid is created and written (option S), a file called safe (containing a line
   NOT SAFE)) is written in those
   directories instead of the geometry files, etc., so that when running the jobs on HPC
   these directories are skipped.
       In addition, a file tip_grid.xyz is written which contains all atoms of the
   surface and the apex atom of the tip (the lowest atom) for ALL allowed ("safe") tip
   position on the grid.
   NOTE: an attempt has been made to write this info into geom.xyz instead so that CHIMERA
   would show the image directly, but the code crashes with CHIMERA (it does not crash if
   run without it on its own); hence, this option is up to now removed (option Sy is currently
   commented out).
   [file: eff_atom.f90, job scripts in SCRIPTS]

version 6.54 07.03.2025
^^^^^^^^^^^^^^^^^^^^^^^
A bug fixed in selecting atoms of different regions in Eff. Atom method.
   [file: eff_atom.f90]

version 6.53 01.12.2024
^^^^^^^^^^^^^^^^^^^^^^^
1. When using Ad in M menu (CP2K format only), the extra information in the input file apart from the geometry  
   information will be ignored even if present. Previously it was overwriting that info from the current input.
   [files: siesta.f90, main.f90, change.f90, input_tetr.f90]
2. KIND info from the CP2K input is now more carefuly read in with full info given for BASIS_SET and POTENTIAL
   (if present).
   [file: input_tetr.f90]

version 6.52 21.11.2024
^^^^^^^^^^^^^^^^^^^^^^^
1. It is now possible to read CP2K input files containing @include statements from non-current directory.
   TETR asks if the file is the current directory or not, and if not, then it asks for the path.
   [file: input_tetr.f90]

version 6.51 21.11.2024
^^^^^^^^^^^^^^^^^^^^^^^
Effective atom method: in method 4 region C may include atoms of the actual system being scanned,
e.g. a molecule on the surface and atoms of the surface itself. A new option Pt is introduced to
choose atoms of the actual tip that will be displaced on the grid. These will be all atoms of region T
and some artoms of C (or none).
   [file: eff_atom.f90, change_tools.f90,lists.f90]

version 6.5 20.11.2024
^^^^^^^^^^^^^^^^^^^^^^^
1. A very significant changes in the STM EA routine related to a more logical workflow.
   The idea of various options was also reworked. Currently, C+T regions correspond to the
   physical tip that will, as a whole, be moved on the grid. Comments throughout the code
   were also modified/improved. Only the first routine (the 2nd one is due to method 3 and
   was not modified) was modified. In particular, it is assumed that the geometry initially
   read in by TETR should be the one in which the physical tip is positioned at its lowest
   possible height on the grid.
   [file: eff_atom.f90]
2. The 1D option was also touched. It is supposed to work now assu=ming an arbitary direction. 
   [file: eff_atom.f90]

version 6.41 22.05.2024
^^^^^^^^^^^^^^^^^^^^^^^
More detailed oputput of routine compare()
   [file: main.f90]

version 6.4 25.04.2024
^^^^^^^^^^^^^^^^^^^^^^^
Trubute to Ivan Belevich placed in the code.
   [files" hat.f90, do_vibr.f90]

version 6.35 15.02.2024
^^^^^^^^^^^^^^^^^^^^^^^
1. When saving VASP input files, the scaling factor is always set to 1.0.
   [file: applica.f90]
   
version 6.34 08.01.2024
^^^^^^^^^^^^^^^^^^^^^^^
1. A bigger format (i10 instead of i5) in printing into input.dat and in the menu of iorb numbers.
   [file: eff_atom.f90]

version 6.33 12.12.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in choosing the 3rd vector of the box in Eff Atom routine in 3D case fixed.
   [files: eff_atom.f90]
2. NEW: an option A2 is added in the main menu to enable saving an XYZ file geometry along the CP2K relaxation run'
   [file: main.f90]

version 6.32 20.09.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Memory problem in distances() (file main.f90); there was a 'Segmentation fault' message. Replaced N0LT0 with 1000, should
   be enough for all practical purposes.
   [file: main.f90]
2. Cleaning up some of the redundant structurues left from F77 and variables that are not used by defined
   [files: tools.f90, do_vibr.f90, main.f90, change.f90, change_tools.f90]
3. A bug in calling print_long_char and TTag fixed.
   [files: lists.f90, eff_atom.f90]
Now the code compiles with gfortran without any warning messages.

version 6.31 23.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Option SC: in the case of the 1D run, the direction can be chosen arbitrarily by option V3. By default, it will be normal to the surface.
   Also, it is checked that Gr was actualy used before going to save the directory structure (option S).
   [file: eff_atom.f90]

version 6.30 20.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug corrected that is related to option Ad of the M menu: before the CP2K information on the basis set and the pseudopotential of new species
   was not worked out. Now data for new species are correctly added, hence the saved input CP2K file becomes correct. Note that the basis set and
   pseudopotential data for species that are contained in the current and added files are not compared; the data from the current file are used.
   [files: Makefile, cp2k.f90, change.f90, change_tools.f90, buffer,f90, buffer1.f90, tetrag1.f90, bsse.f90, applica.f90, input_tetr.f90]
   
version 6.29 19.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Changed what is to be printed into input.dat (SC routine): integration step instead of nw and 'F F F' string at the end of the file.
   [file: eff_atom.f90]
2. The point (0.0.NGZ_) on the grid is considered as a reference one, at which a proper geometry relaxation is first run. The relaxed geometry
   is then saved as coordinates.inc file. Any vertical line (fixed ix,iy) would then start from that relaxed geometry moved appropriately.
   The related changes into the info.dat file are now made. So, when we go along Z from iz=NGZ_ downwards, the previous geometry is used. When
   we start any new iz=NGZ_ vertical run, the relaxed geometry from the reference (0,0,NGZ_) run is to be used after a proper shift.
   [file: eff_atom.f90]
   
version 6.28 13.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. An insignificant change in the SC and CT options (STM meodel 3): input files are called input_SC.inp and input_CT.inp instead of the
   generic input.inp to be able to have both files in the directory structure.
   [file: eff_atom.f90]

Currently, MODEL 3 workflow looks like this:

  (a) prepare the whole S+C+T input file, e.g. call it SCT_system.inp; define which atoms to be frozen
  
  (b) remove T atoms, save as SC_system.inp; create a copy of the file with all atoms replaced by
           @include 'coordinates.inc'
           @include 'relax_flags.inc' (only in place of the LIST statements)
      e.g., call it SC_system_inc.inp
      The SC system may contain relaxation; use RYN_TYPE GEO_OPT.
      Check the &KIND  - &END KIND block for each species to ensure correct pseudos and the basis set are used.

  (c) remove S atoms, save as CT_system.inp; create a copy of the file with all atoms replaced by
           @include 'T_atoms.inc'
           @include 'C_atoms.inc'
      e.g., call it CT_system_inc.inp
      The CT system must NOT contain relaxation; use RYN_TYPE ENERGY.
      Check the &KIND  - &END KIND block for each species to ensure correct pseudos and the basis set are used.
      
  (d) TETR: read SC_system.inp and go to SC menu; choose the method via Mt, dimension, Cp, Gr, Vp, No, etc.; 
            in Si choose the name of the file SC_system_inc.inp (without the .inp extension).
      At that point we have the directory structure corresponding to the grid and the input file input_SC.inp
      in each directory with all atomic positions in coordinates.inc and correct relaxation info in
      input.inp as well.

      Move everythjing to HPC.
      
  (e) On HPC:
      ^^^^^^^ 
      Run the job script job_SC_bash that:
                           ^^^^^^^^^^^        
            - will use the previous (along Z) directory to copy the wavefunction and geometry files
	    - will run CP2K relaxation using the relaxed and shifted tip structure from the previous Z position
	    - will check if the relaxation successfully completed; if not, the script exits
	    - will save relaxed geometry in coordinates_rlx.inc (tetr < ../inp.2K > ...)
	    - will extract KS.dat and OV.dat files
	    - will create C_atoms.inc and input_CT.inp input files (tetr < ../inp.C_at > ..)
            - will clean each grid directory from unnecessary files
	    
  (f) On HPC (or locally with subsequent transfer to the HPC):
      ^^^^^^^
      TETR: read CT_system.inp and go to CT menu; use the name of the CT_system_inc.inp (without the .inp extension)
            when using option S. This step will place T_atoms.inc file in each directory of the grid with the 
	    correct positions of the T atoms, and also inpnut_CT.inp file (the copy of CT_system_inc.inp). 

      At that point in each grid directory we shall have, in addition:
         input_CT.inp
	 C_atoms.inc
	 T_atoms.inc

   (g) On HPC:
       ^^^^^^^
      Run the job script job_CT_bash that:
                         ^^^^^^^^^^^        
            - will use the previous (along Z) directory to copy the wavefunction
	    - will run CP2K using the relaxed C atoms for the SC calcualtion 
	    - will extract KS_tip.dat and OV_tip.dat files
	    - will create C_atoms.inc and input_CT.inp input files (tetr < ../inp.C_at > ..)
            - will clean each grid directory from unnecessary files

   (h) Tar/gzip geometry, H- and S-matrices (for both SC and CT), coordinates*.inc files and move the whole lot to the local machine
       into the same directory structure. There a useful script: run_extract_clean
                                                                 ^^^^^^^^^^^^^^^^^

      At that point we should have, in each directory on the grid, the following files:
           input_SC.inp      - the input file for SC [now redundant]
           input_CT.inp      - the input file for CT [now redundant]
    	   coordinates.inc   - relaxed geometry of SC [now redundant, but still useful for analysis]
	   C_atoms.inc       - relaxed positions of C atoms
	   T_atoms.inc       - positions of T atoms
	   KS.dat, OV.dat    - the Hamiltonian and Overlap matrices for the SC system
	   KS_tip.dat, OV_tip.dat    - the Hamiltonian and Overlap matrices for the CT system

   (k) Run the routine for the CURRENT calculation (curr) across all grid points.

version 6.27 09.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a stand-alone rutine <move> is introduced that moves designated atoms in <coordinates_prev.inc> file by a vector
   and a new file <coordinates_new.inc> created. The atoms moved and the vector are read in from <info.dat>.
   This routine is to be used when running a job script for the STM calcualation and is designed to make use of the
   relaxed geometry of the tip from the previous grid point along Z (we move downwards along Z !) when runnig the calculation
   on the given grid point.
   [file: move.f90]

version 6.26 08.06.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Routines Tag() TTag() for choosing atoms: if all atoms to be chosen, use the word 'all' instead of the actual numbers.
   [file: ttag.f90]
2. To accelerate method 3/4 STM calculations, an improvement has been made to enabling one to use the relaxed geometry
   on the prveious grid point when staring the current grid point: an info.dat file is given into each directory
   of the grid to show which atoms and by how much should be displaced relative to the previoous grid point.
   [file: eff_atom.f90]

version 6.25 15.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. It was realised that the order of atoms (by species) is not acceptable in general for the calculation of the
   current as atoms must be ordered by the subsystems instead (S,C and T). Correspondingly, the SC and CT options
   of the main menu required a considerable rewrite. That included, in particular:
   (i) introduction of the method (from 1 to 4)
   (ii) taking care of the relaxation flags in each case as the order of atoms may change
   (iii) taking care of the orbtals numbers for each block in each case to facilitate the calculation of the current
         (added in input.dat and input1.dat files)
   (iv) other improvements	 
   [files: eff_atom.f90, lists.f90, change_tools.f90]
2. Option 2K of the main menu: instead of updating atoms in TI(), in this option a file coordinates.inc is saved
   with the relaxed geometry.
   [file: main.f90]

An updated workflow for the current calculation in MODEL 3 (when S+C is considered first with some relaxation,
and then the C+T is considered second, at each grid point, without relaxation, using the C geometry from the
S+C calcualtion) is:

  (a) prepare the whole S+C+T input file, e.g. call it SCT_system.inp; define which atoms to be frozen
  
  (b) remove T atoms, save as SC_system.inp; create a copy of the file with all atoms replaced by
           @include 'coordinates.inc'
           @include 'relax_flags.inc' (only in place of the LIST statements)
      e.g., call it SC_system_inc.inp
      The SC system may contain relaxation.

  (c) remove S atoms, save as CT_system.inp; create a copy of the file with all atoms replaced by
           @include 'T_atoms.inc'
           @include 'C_atoms.inc'
      e.g., call it CT_system_inc.inp
      The CT system must NOT contain relaxation.
      
  (d) TETR: read SC_system.inp and go to SC menu; choose method via Mt, dimension, Cp, Gr, Vp, No, etc.; 
            in Si choose the name of the file SC_system_inc.inp (without the .inp extension).
      At that point we have the directory structure corresponding to the grid and the input file input.inp
      in each directory with all atomic positions in coordinates.inc and correct relaxation info in
      input.inp as well.

      Move everythjing to HPC.
      
  (e) On HPC:
      ^^^^^^^ 
      CP2K: run for all files on the grid with relaxation;
            run extract; remove CP2K files and only keep the extracted KS files (H and S);
      TETR: run 2K to save the relaxed geometry of the SC system in coordinates.inc, then reread the input.inp
	    and save the C atoms (M -> SA) as C_atoms.inc file
		  
  (f) Tar/gzip geometry, H- and S-matrices and C_atoms.inc and move the whole lot to the local machine
      into the same directory structure.

      At that point we should have, in each directory on the grid, the following files:
           input.inp         - the input file for SC [now redundant]
    	   coordinates.inc   - relaxed geometry of SC [now redundant, but still useful for analysis]
	   C_atoms.inc       - relaxed positions of C atoms
	   KS.dat, OV.dat    - the Hamiltonian and Overlap matrices for the SC system

  (g) TETR: read CT_system.inp and go to CT menu; use the name of the CT_system_inc.inp (without the .inp extension)
            when using option S. This step will place T_atoms.inc file in each directory of the grid with the 
	    correct positions of the T atoms, and also inpnut.inp file (the copy of CT_system_inc.inp). 
            Move input.inp with T_atoms.inc to HPC (C_atoms.inc is there already).

  (h) On HPC:
      ^^^^^^^
      CP2K: run for all files on the grid (no relaxation); run extract, move H and S files into
            KS_tip.dat and OV_tip.dat
	    Gzip and copy into the local machine.

      At that point we should have, in each directory of the grid: 
           input.inp         - the input file for CT [now redundant]
    	   coordinates.inc   - relaxed geometry of SC [now redundant]
	   C_atoms.inc       - relaxed positions of C atoms
	   T_atoms.inc       - positions of T atoms
	   KS.dat, OV.dat    - the Hamiltonian and Overlap matrices for the SC system
	   KS_tip.dat, OV_tip.dat    - the Hamiltonian and Overlap matrices for the CT system

  (k) Run the routine for the CURRENT calculation (curr) across all grid points.

version 6.24 11.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. A few improvements in SC and CT options including checking if the input files exist. Also, in the Si
   option of the SC menu the file name of the SC input file with the include statement is asked instead
   of asking it while hitting S which makes more sense. All these changes finalised the workflow.
   [file: eff_aton.f90]

Current workflow for the current calculation in MODEL 3 (when S+C is considered first with some relaxation,
and then the C+T is considered second, at each grid point, without relaxation, usinf the C geometry from the
S+C calcualtion) is:

  (a) prepare the whole S+C+T input file, e.g. call it SCT_system.inp; define which atoms to be frozen
  
  (b) remove T atoms, save as SC_system.inp; create a copy of the file with all atoms replaced by
           @include 'coordinates.inc'
      e.g., call it SC_system_inc.inp	   

  (c) remove S atoms, save as CT_system.inp; create a copy of the file with all atoms replaced by
           @include 'T_atoms.inc'
           @include 'C_atoms.inc'
      e.g., call it CT_system_inc.inp
      
  (d) TETR: read SC_system.inp and go to SC menu; choose dimension, Cp, Gr, Vp, etc.; in Si choose the
            name of the file SC_system_inc.inp (without the .inp extension).
      At that point we have the directory structure corresponding to the grid and the input file input.inp
      in each directory with atomic positions in coordinates.inc.
      Move everythjing to HPC.
      
  (e) CP2K: run for all files on the grid with relaxation;
            run extract; remove CP2K files and only keep the extracted KS files (H and S);
	    TETR: 2K to save the relaxed geometry of the SC system (in, say, input_rlx.inp)
	          then M -> SA to save the C atoms only as C_atoms.inc file
		  
  (f) Tar/gzip geometry, H- and S-matrices and C_atoms.inc and move the whole lot to the local machine
      into the same directory structure.

      At that point we should have, in each directory on the grid, the following files:
           input.inp         - the input file for SC [redundant]
           input_rlx.inp     - the relaxed geometry input file for SC
    	   coordinates.inc   - initial geometry of SC [redundant]
	   C_atoms.inc       - relaxed positions of C atoms
	   KS.dat, OV.dat    - the Hamiltonian and Overlap matrices for the SC system

  (g) TETR: read CT_system.inp and go to CT menu; use the name of the CT_system_inc (without .inp extension)
            when using option S. This step will place T_atoms.inc file in each directory of the grid with the 
	    correct positions of the T atoms, and also inpnut.inp file (the copy of CT_system_inc.inp). 
            Move input.inp with T_atoms.inc to HPC (C_atoms.inc is there already).

  (h) CP2K: run for all files on the grid (no relaxation); run extract, move H and S files into
            KS_tip.dat and OV_tip.dat
	    Gzip and copy into the local machine.

      At that point we should have, in each directory of the grid: 
           input.inp         - the input file for CT [redundant]
           input_rlx.inp     - the relaxed geometry input file for SC
    	   coordinates.inc   - initial geometry of SC [redundant]
	   C_atoms.inc       - relaxed positions of C atoms
	   T_atoms.inc       - positions of T atoms
	   KS.dat, OV.dat    - the Hamiltonian and Overlap matrices for the SC system
	   KS_tip.dat, OV_tip.dat    - the Hamiltonian and Overlap matrices for the CT system

  (k) Run the current routine across all grid points.

version 6.23 09.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Option SA changed to SC (S+C system)
   [file: main.f90]
2. NEW: option CT added - also for the EA method (2nd part of the Method 3) that creates in each
   directory of the grid the T+C system of the correct displacement.
   [file: main.f90, eff_aton.f90]

version 6.22 05.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: the EA option menu has been considerably redesigned with new options added:
   (i) 1D, 2D and 3D grid supported
   (ii) whether all or only tip atoms to be saved in coordinates.inc file
   (iii) whether to copy into each directory the input file with the line
              @include 'coordinates.inc'
	 to complete the full preparation of the directory structure
   [file: eff_atom.f90]

version 6.21 04.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option SA added to the M menu to save selected atoms in a file [*.dat]
   [file: change.f90]
2. NEW: option RA added to the M menu that enables one to replace atomic positions of selected atoms with those in
   a file [*.dat].
   [file: change.f90]

version 6.20 02.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option 2K added in the main menu allowing reading in the relaxed geometry from a CP2K calculation
   (from the corresponding xyz-file provided by CP2K) with subsequent saving (option S) in a new file.
   [file: main.f90]
2. NEW: otioons Tp and Ta added in the EA menu that enable one to specify tip atoms for the EA model calculation.
   This is needed for more advanced EA models when the real tip apex is to be used.
   [file: eff_atom.f90]
   
version 6.18 01.05.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Allowed for 0 grid for the Eff Atom model, useful if I needs to perform a vertrical grid calcualtion only or
   ony within a plane. Also, a bug is corrected. Removed unnecessary creation of the input file.
   [file: eff_atom.f90]

version 6.17 04.04.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. Introduced error number in the routine reading CP2K input file.
   [file: tetr_inpnut.f90]
   
version 6.16 20.03.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: specificaly for the Effective Atom STM model, a new option EA appeared in the main menu. It enables one to
   create a set of directories with positions of the effective atom (He1 species) on a grid within a defined box.
   Currently, only with CP2K. There is also a script <run_prep_inpt>  that is run after TETR to have the correct
   CP2K format of the input files in each of the directories.
        When working on a primitive surface cell STM image, a larger cell needs to be used to avoid interactions between
   the images of the Effective Atom (He1 currently). Then, in Vp, the lattice vectors of the primitive cell can be specified
   as defining the simulation box. In this case, LEV00 will be able to tarnslate the image periodically using this primitive
   cell. 
   [files: main.f90, applica.f90, eff_atom.f90, tetrag1.f90]

This is how the files for the STM calculation within the Efective Atom model need to be prepared:

   (i) start from the <input.inp> file that contains He1 species above the surface somewhere
   (ii) create a copy of that file <1.inp> in which the poisions x,y,z of the He1 are replaced by XXX YYY ZZZ, e.g.
             [  He1   0.0 0.0 3.5  ]    is replaced by   [ He1   XXX YYY ZZZ  ]
   (iii) Run tetr and read <input.inp>, go to EA menu option and run it. There:
     - define the box within which the grid is going to be defined; this is done by defining:
         Cp - the corner point of the box
         Up - the upper Z height of the box (Zupper)
         Vp - the vectors along the two in-plane sides of the box, both starting from Cp
              The 3rd vector of the box is defined perpendicular to the plane of the surface and between Cp(3) and Zupper
     - define the grid within the box
     - using S will generates all directories with files <xyz> contanining coordinates of the He1 species. It will
       also place there an input file as well with the correct geometry, however, in the case of CP2K this file needs
       editing and hence cannot eb directly used.
     - tetr will also create the file <for_lev00.dat> with the information on the grid chosen and the box to be used
       by lev00 when previewing the image.
   (iv) Edit the script <run_prep_input> to include all grid points starting from 0.
    (v) Run the script. It will place in each directory the correct CP2K input file <input.inp> that has the required
        position of the He1 species.


version 6.15 05.03.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug corrected that contsraints are written into a CP2K input file even if they did not exist before even though the input file contained extra lines
   (i.e. have been "old")
   [file: applica.f90]
2. ELEMENT keyword is not wriiten into the CP2K input file
   [file: applica.f90]

version 6.14 13.02.2023
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: an option NB added to the main menu allowing creating intermediate images (the linear interpolation)
   between two given images. The first geometry entered (as usual) is the initial geometry of the NEB band,
   the second geomertry that is asked will serve as the final end point of the NEB band. You will be asked
   to enter only the number of intermediate images N between these two end points (the total number of images
   being N+2 then). TETR creates N+2 files POSCAR_00, POSCAR_01, ... with the geometries, where the first (0,0)
   geometry is the starting point and the last (0,N+1)  - the final point of the band.
   [file: main.f90]

version 6.13 14.12.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug related to reading CP2K lattice vectors fixed (hopefully, this is the final fix!). It should recognize two options
   when reading lattice vectors: ABC and A, B and C.
   [files: input_tetr.f90]
2. NEW: CP2K input file may contain parameters as $param or ${param}. TETR would replace them with the values given in the
   input file and proceed as normal.
   [files: input_tetr.f90]

version 6.12 30.11.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug related to reading CP2K lattice vectors fixed
   [files: input_tetr.f90]

version 6.11 30.11.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug related to angles in specifying the lattice fixed.
   [files: input_tetr.f90, lattice.f90]

version 6.10 21.09.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. Ooption Ts allows for building the list of atoms to be not shown in several steps: once atoms were chosen to be removed from the visualisation, additional atoms can be   
   chosen by repeating the Ts option.
   [files: change.f90, ttag.f90]

version 6.09 24.08.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a new option Ts added to the M menu. It enables one to specify atoms of the system (prior to the extension)
   that will not be shown
   at visualisation. This setting remains until cancelled (by using Ts again with the empty input). If chosen, Bb
   is applied as usual, but only
   atoms not selected in Ts will be shown including their extensions.
   [file: change.f90, change_tools.f90, ttag.f90]   
2. Option Tb in the M menu has been commented out as it interferes with the option Ts.
   [File: change.f90]

version 6.08 23.08.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. The max length of file names was made a single parameter FLEN to be specified in tetrag1.f90.
   Currently = 100.
   [files: tetrag1.f90, input_tetr.f90, applica.f90, mol_vibr.f90, main.f90, lattice_space.f90, change.f90, bsse.f90]
2. LENG2 in real8.f90 was increased to 2000. This would allow longer lists of atomic numbers to be transfered from
   CHIMERA to TETR
   when making a selection on the screen.
   [file: real8.f90]

version 6.07 14.07.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. A NEW option in the M-menu: Tb [only for CHIMERA].
   This allows removing atoms from visualisation, e.g. removing the bottom layers
   to see better atoms in the upper layer. Note that the actual cell is NOT changed!
   By pressing ENTER in this option (without making a selection) returns all previously
   selected atoms to the visualisation. 
   [file: change.f90, change_tools.f90, ttag.f90]

version 6.06 22.06.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. Option Vs in the M menu: can show lattice vectors automatically (still up to 5 altogether)
   [file: change.f90]

version 6.05 12.02.2022
^^^^^^^^^^^^^^^^^^^^^^^
1. Two small bugs corrected the routine creating an AFM script
   [file: run_AFM.f90]

version 6.04 24.06.2018
^^^^^^^^^^^^^^^^^^^^^^^
1. A small bug corrected which then allowed tetr to compile with gfortran compiler (GNU Fortran (Ubuntu 7.3.0-16ubuntu3) 7.3.0).
   [file: tools_strings.f90]

version 6.03 27.01.2018
^^^^^^^^^^^^^^^^^^^^^^^
1. CHIMERA related: in M menu, when more than one cell is built (Bb is not null), then when Td or Fd is
   selected, tagged or frozen atoms in all cells are shown correctly (before wrong atoms were shown if more than
   one cell exist).
   [files: change.f90, tools.f90, bb.f90, Makefile, cluster.f90, make_fcm.f90, move_tip.f90]
2. CHIMERA related: in M menu, when tagging is made across cells arbitrarily (when Bb is not null), atoms
   only from the primitive cell are correctly chosen. This can be done either from the CHIMERA window or inside
   T or TT menus as atomic number(s) can now be used that are larger than ITI (but still smaller than L_ext, which is
   the total number of atoms in the extended cell).
   [file: ttag.f90]

version 6.02 21.10.2017 
^^^^^^^^^^^^^^^^^^^^^^^
1. Arrays in atom_info.f90 made allocatable.
   [files: atom_info.f90, mol_vibr.f90]

version 6.01 19.10.2017 
^^^^^^^^^^^^^^^^^^^^^^^
1. Introduced allocatable arrays for all arrays met in matrix.f90; no more large arrays
   with K0DM0 anymore. Tests all work.
   [files: make_fcm.f90, eig_vibr.f90, tools.f90, atom_info.f90, matrix.f90, solve_vibr.f90]

version 5.11b 10.10.2017 => 6.0 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. Added two more tests:
       11 - H2O vibrations (option Vm)
       12 - MgO vibrations (option Vs)
       13 - cp2k i/o M options, undo/redo
   There are some differences (a) due to numerics (some numbers are shown as nonzero, but they are actually 
   very small (this could be due to using real*4 instead of real*8 as constants throughout) and 
   (b) because in V3 eigenvectors are different for imaginary or zero modes (shown as -1.0).
   [files: run_tests]
2. NEW: introduced throughout "implicit none"; all 13 tests run successfully.
   [files:  add_rem.f, applica.f, bsse.f, build_spacegroup.f, change.f, change_tools.f,
            cluster.f, coulomb.f, crystal_vibr.f, eig_vibr.f, input_tetr.f, kpoint_vibr.f,
            lattice.f, lattice_space.f, make_fcm.f, mol_vibr.f, move_atoms.f, move_tip.f,
            point_gr.f, rotations.f, solve_vibr.f, tetrag1.f, ttag.f,
            buffer.inc, buffer0.inc, buffer1.inc, buffer_index.inc, buffer_c.inc ]

version 5.11a 4.10.2017
^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a file tetr.log does no longer records some 'not very useful' printout. Instead, 
   all console input to the code created when running TETR via statements like read(*,..) is written
   there. This means that tetr can be run afterwards like 
      cp tetr.log tetr.inp
      tetr < tetr.inp
   to exactly reproduce the previous run. This is also useful for creating scrips with tetr
   as you can run the code and then use all the commands given. Note that the file tetr.log
   will be overwritten with every new run (and that is why we need to copy it first to another one).
   [files:  add_rem.f, applica.f, bsse.f, build_spacegroup.f, change.f, change_tools.f,
            cluster.f, coulomb.f, crystal_vibr.f, eig_vibr.f, input_tetr.f, kpoint_vibr.f,
            lattice.f, lattice_space.f, make_fcm.f, mol_vibr.f, move_atoms.f, move_tip.f,
            point_gr.f, rotations.f, solve_vibr.f, tetrag1.f, ttag.f]
2. A new set of tests added: 
        6 - M menu with vasp, gereral steps
        7 - M menu, construction of Si(111) surface
        8 - M menu, construction of Si(001) surface, 2x1 reconstruction
        9 - Cl menu, construction of a Si cluster
       10  - Pc menu, construction of a crystal from a space group symbol
   [files: directory REF, run_tests, do_tar_improved]

version 5.11 30.09.2017
^^^^^^^^^^^^^^^^^^^^^^
1. A bug in writing cp2k input file at option B2 of M menu (BSSE correction), TETR method,
   has been fixed (no KIND information was before printed).
   [file: bsse.f]
2. Testing procedure is developed which tests the output of the code using a few examples: 
     TEST1: vibrartions of H2O molecule
     TEST2: vibrartions of CO2 molecule
     TEST3: BSSE distribution (TETR method for CP2K) for 2 benzene molecules
     TEST4: vibrartions of MgO supercell
     TEST5: vibrartions of MgO  - Vk option
   [files: bsse.f, run_tests, do_tar_improved]
   [REF subdirectories in example directories: H2O, CO2, BSSE_cp2k_2_benzene]
3. Adopted old format for vibr_info.dat file (vibrations). Now old files can be read in.
   [files: eig_vibr.f, make_fcm.f]
4. All *.inc files were edited: dimesnsions removed from common blocks and all variables
   are defined, so that transition to F90 would be simplified.
   [files: all *.inc files]

version 5.1 27.09.2017
^^^^^^^^^^^^^^^^^^^^^^
1. Several essential bugs were fixed (see change_from_5.04_to_5.1 file for details), as otherwise 
   the code crashed at options V2 and V3.
   [files: tetrag1.inc, tetrag1.f, cluster.f, permut.f, move_atoms.f, ttag.f]
2. A few other insignificant changes in a format of a write statement
   [file: input_tetr.f]
3. One read statement was missing when reading vibr_info.dat file which casued a crash for V2 and V3.
   Now fixed, allowing for an old format when (apparently) this input info was not printed.
   [files: eig_vibr.f, make_fcm.f]

version 5.04 5.6.2017
^^^^^^^^^^^^^^^^^^^^^^
1. If CHINERA, geom.xyz file is written immediately for existing input file right after it was
   read in.
   [file: tetrag1.f]
2. Menus in change.f were adjusted.
   [file: change.f]
3. A bug corrected in statiing if CHIMERA was used or not 
   [file: tetrag1.f]

version 5.03 28.04.2017
^^^^^^^^^^^^^^^^^^^^^^
1. [CP2K] Species block &KIND is read in explicitly from a cp2k input and written into cp2k
   input. This is useful if a non-cp2k input file is written into the cp2k format, or
   new species  are added, whereby preserving the correct cp2k input structure. Some information
   will have to be added in those cases such as ELEMENT, BASIS_SET and POTENTIAL to the written
   input file.
   [files: input_tetr.f, applica.f]
2. Dependencies in the Makefile updated
   [file: Makefile]

version 5.02 27.04.2017
^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option 1 in M menu: one can specify the new center by an atomic number as well.
   [file: change.f]
2. If CHIMERA=True, then one can display selected or frozen atoms in the CHIMERA window
   [Files: change.f, cluster.f, tools.f]
3. If CHIMERA=True, the option Vs of the M menu works as well: the vectors entered are
   displayed in the CHIMEERA window
   [files: change.f, tools.f, change_tools.f]

version 5.01 17.04.2017
^^^^^^^^^^^^^^^^^^^^^^
1. NEW: rotation of the whole system around an arbtrary axis was added to M
   as a suboption of the option 3.
   [files: change.f, change_tools.f, rotations.f]
2. Normalisation of an additional vectors in M -> Vs was incorrect; fixed.
   However, currently, this normalisation is disabled. This was one can e.g.
   preview lattice vectors with xmakemol.
   [file: change.f]
3. A facotr of 10 introduced for extra vectors to diplace in M -> Vs was removed.
   [file: change_tools.f]
4. A bug in option Cm fixed: in some cases it did not remove the full translation
   needed.
   [file: tetrag1.f]

version 5.00 9.03.2017
^^^^^^^^^^^^^^^^^^^^^^
NEW: A major change (consisting of a lot of small chnages) related to support for CHIMERA
1. Some menues have been contracted by introduing the second column
   [files: change.f, tetrag1.f, cluster.f]
2. the code bacame safer: read(*,*) statements were supplied by err=label option
   to retype the entry.
   [files: many]
3. the length of a string for T and TT options was set to LENG1 in real8.inc.
   This allows setting a large length arbitrarily.  Currently it is set to 2000
   which should be sufficient in most cases.
   [files: ttag.f, tools_srings.f, make_fcm.f, real8.inc, lists.inc, applica.f,
   bsse.f, tools.f]
4. some unnecessary output has been made into a tetr.log file
   [files: many]
5. command line argument CHIMERA introduced to be able to recognise if tetr
   is called from CHIMERA
   [file: tetrag1.f]
6. dependence of make_fcm.f on lists.inc has been fixed in Makefile
   [file: Makefile]
7. option XY removed from all menus. In all cases only geom.xyz is to be written,
   other names (movie.xyz, geom_box.xyz, geom_film.xyz) were replaced.
   [files: add_rem.f, crystal_vibr.f, cluster.f, change.f, mol_vibr.f,
           lattice_space.f, lattice.f, eig_vibr.f, tetrag1.f, move_tip.f,
	   move_atoms.f, make_fcm.f]
8. option Hs is invoked only if not CHIMERA
   [files: add_rem.f, change.f, cluster.f, crystal_vibr.f, eig_vibr.f,
           lattice.f, lattice_space.f, make_fcm.f, mol_vibr.f, move_atoms.f,
	   move_tip.f]
9. Cleaned up the code (removed variables which are not udes).
   [files: many files]

version 4.98 26.01.2017
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in write_final_cp2k fixed - 11.11.2016
   [file: tetrag1.f]
2. A bug in rwading cp2k input file: vscale was not set up. Fixed - 26.01.2017
   [file: input_tetr.f]

version 4.97 18.03.2016
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: an option Sk is added in the Vk menu which enables one to choose
   the cell extension by specifying a K point of interest. Then the smallest
   cell extension is found that reproduces the given K point. A parameter Nm
   need to be chosen which facilitates construction of a list of integers
   that serve as components of the extension matrix. The bigger the value of 
   Nm=1,2,3,..., the more different extention matrices are sampled. It is adviced
   to try first the default value Nm=2 and then check the obtained cell extension
   using a bigger value (but the calculation will run longer).
   [file: kpoint_vibr.f]

version 4.96a 23.01.2016
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a new option Vk for calculating vibrations of a crystal is introduced.
   This option is based on a method not based on group theory: all displacements
   are generated directly using k-points. Then, when constructing the force-constant
   matrix (FKM), two cases are distinguished: when the given K-point Vkp is alone or comes
   as a pair with the -Vkp, similarly to the old method (that was implemented in Vs). 
   Finaly, real and imaginary parts of the FKM are printed
   into D_#.fcm files for each k point. An information file FCM.info is also prited.
   This option should give eigenvalues identical (within a tolerance) to the ones given 
   by option Vs. This development resulted in various changes around the code. 
   V3 option is not available for this case at the moment.
   [file: eig_vibr.f, tetrag1.f, mol_vibr.f, eig_vibr.f, solve_vibr.f, kpoint_vibr.f
          crystal_vibr.f, devices.f make_fcm.f ]
2. NEW: limited support for LAMMPS and GW code [still bugs in this version]
   [files: input_tetr.f, tetrag1.inc, mol_vibr.f]

version 4.95m 22.01.2016
^^^^^^^^^^^^^^^^^^^^^^^
Intermediate stable version with some improvements in syntaxis in preparation
to the next version.

version 4.95 18.12.2015
^^^^^^^^^^^^^^^^^^^^^^^
1. Bug fixes in the vibrational routine; in particular, a manual option
   in creating necessary files has been removed as otherwise the code
   would not work as a script. Also, if only one vector is present within
   the given irrep, automatic choince iV1 did not work; hence, removed.
   [file: mol_vibr.f]
2. A better run_DFT script is created with a single line to be edited which
   points to the number of processors and the location of the executable.
   [file: mol_vibr.f]
3. Compare files: a fixed file name for the compare file (in a case when
   the file to compare with is in a different directory, TETR crashed).
   [file: tetrag1.f]
4. Input identification of CP2K file was unnecessarily based on checking
   if MOTION block is present; now removed.
   [file: applica.f] 
5. A testing option is added which allows switching off the symmetry completely
   when perfroming vibrations calculations.
   [files: mol_vibr.f, change.f, coulomb.f, lattice.f, make_fcm.f, move_atoms.f, 
           point_gr.f, change_tools.f]

version 4.94 11.12.2015
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: vibrational option for CP2K implemented.
   [files: mol_vibr.f, applica.f, tetrag1.f, make_fcm.f, eig_vibr.f, get_forces.f]
2. Various bugs in BSSE option for CP2K (standard and non-standard) fixed. It has been
   tested and it works now.
   [files: bsse.f]
3. Reading empty coordinates.inc file (if any) for CP2K did continue; now it stops.
   [file: input_tetr.f] 
4. Some improvements in vibrational routines (memory limitations, a possiblity to
   perform files generation manually).
   [file: mol_vibr.f]

version 4.93 24.04.2015 / 16.06.2015/ 3.10.2015
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in writing run_DFT_script file for VASP_v.5.2 fixed.
   [file: mol_vibr.f]
2. A better printout warning is given if atoms read in via the option Ad in the
   M menu coincide with the existing ones and hence are not accepted.
   [file: change.f] 
3. When reading XYZ file as an input, a zero dimension along any axis is recognised
   and correspondingly a lattice vector in that direction is made artificially large.
   A warning is also given.
   [file: input_tetr.f]
4. NEW: it can read and write geometry in CRYSTAL format. No account is made of symmetry
   operations though, so a single symmetry operation is assumed (although it would read
   all of them, but will ignore if present). Hence, only irreducible atoms may appear if symmetry
   was assumed in the file - take care.
   [files: tetrag1.f, applica.f, input_tetr.f]
5. A bug corrected in reading CRYSTAL files after Natalia's pointed out (3.10.15)
   [file: input_tetr.f]

version 4.92 9.02.2015
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in option Ss for SIESTA fixed
   [file: bsse.f]
2. Only non-blank characters of 'the rest from siesta' part of the input are printed
   making the lines much shorter.
   [file: bsse.f]

version 4.91 26.01.2015
^^^^^^^^^^^^^^^^^^^^^^^
1. Ooption Sy in the Vm menu prints out all the matrices of irreps of the point group.
   [file: mol_vibr.f]
2. A bug in reading lines of siesta input file fixed (wrong line length)
   [file: input_tetr.f]

version 4.90 15.10.2014
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug fixed related to numbering of fragments  (option B1 in M menu).
   [file: change.f]
2. CP2K: bugs fixed in the M menu in options B2 (input for BSSE correction) and B3
   (density of each fragment).
   [file: bsse.f]
3. NEW: the same procedure for the BSSE as used for SIESTA is implemented for CP2K.
   This means that now two options for the BSSE calculation with CP2K are available:
   the standard one (which in the case of many fragments may be very expensive) and
   the one based on using only two extra calculations per each fragment. This latter
   is the new option added.
   [file: bsse.f]  

version 4.89 1.08.2014
^^^^^^^^^^^^^^^^^^^^^^^
1. Bugs fixed in the engine responsible for the calculation of vibrations: 
   (i) limitation is lifted on the number of fixed orbits
  (ii) a bug is fixed related to VASP v. 5.2
   [file: mol_vibr.f]
2. Increased boundaries in sym_par.inc:
      PARAMETER ( N0RB   =                     1000 )
      PARAMETER ( K0DM0  =                     1000 )
   [file: sym_par.inc]

version 4.88 10.07.2014
^^^^^^^^^^^^^^^^^^^^^^^
1. It is now possible to have several settings in space groups which
   allow for that. The corresponding file containing the space groups
   generators has been updated with 6 choices of #14 and 2 choices of #167.
   The info is appended on the line of the group (see space.grp.intern), and
   the necessary distinction is made (if needed for reading the right 
   collection of a,b,c and the angles) by the 3rd character of the word Type
   (e.g. SL0, SL1, etc.).The whole structure is there now, but is lacking is the
   inpt of all group choices in the space.grp.intern file.
   [files: build_spacegroup.f, space.grp.intern]

version 4.87 03.12.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. Some improvements in reading CP2K input files.
   [files: siesta.inc, input_tetr.f]

version 4.86 15.10.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. In M menu the option Vs is added allowing, when previewing, show up additional vectors
   of length 10 each. This could be useful e.g. when choosing normal to a plane.
   [files: change.f, change_tools.f]
2. When saving VASP file, it is asked if to save the atomic positions in Cartesian or fractional form.
   The answers: C,c for Cartesian and F,f for fractional. If no asnwer is given (ENTER), then the form
   from the input is used.
   [file: applica.f]
3. When reading CP2K input file with @INCLUDE commands, both cases of @include and @INCLUDE are checked.
   [file: input_tetr.f]
4. Temporary file tmp.inp created while reading in the CP2K input file is deleted after reading.
   [file: input_tetr.f]

version 4.85 28.08.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. When checking for comment line, only the frist 2 characters are actually checked, not the whole line
   as before.
   [file: tools_strings.f]
2. NEW: when reading cp2k (QUICKSTEP) input files, @include command in the input file is fully supported.
   Note that the new file saved after changes will NOT contain the @include commands anymore.
   [file: input_tetr.f]

version 4.84 20.04.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. A typo fixed which affected reading vasp 5.2 files (sorry, folks!)
  [file: input_tetr.f]

version 4.83 7.03.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. Error message when displacing atom(s) im Mv of the M menu by (0,0,0) vector
was replaced with a warning message instead and the process continued. Useful for
running scripts.
  [file: change_tools.f, change.f]

version 4.82 10.02.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: the rotation block for M, Cl and Pc has been revamped whereby a general
   rotation around an arbitrary axis has been implemented and other features
   existing before removed; still fliping option (useful for flipping e.g. a 
   molecule on a surface) has been left but modified to make it easier to
   apply. 
   [files: cluster.f, change.f, lattice_space.f, tools.f, change_tools.f, 
   rotations.f, Makefile]

version 4.81 02.02.2013
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in reading xyz files: the title line was assumed to be empty. Now fixed.
   [file: input_tetr.f]
2. A bug in reading SIESTA input when species are missing (but declared) and the 
   order of species is not the same as declared. Now fixed.
   [file: input_tetr.f]

version 4.8 21.12.2012
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option Sr in the M menu now creates automatically the first two vectors
   in the XY plane, no need for option 3. The latter is now redundant, but is still
   left in.
   [file: change.f] 

version 4.73 21.08.2012
^^^^^^^^^^^^^^^^^^^^^^^
1. Forces were not read in from vasp v. 5.2 OUTCAR file because of wrong marker used.
   Now fixed.
   [file: get_forces.f]

version 4.72 21.08.2012
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug fixed which prevented tetr to write a *.xyz file directly from the 
   main menu before the YES_xyz is set up in change().
   [file: tetrag1.f]

version 4.71 20.04.2012
^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in writing QE file in the case if a new species is created
   [file: applica.f, qe.inc]
2. Bug fix in writing QUICKSTEP input file after Ss
   [file: tetrag1.f]
3. Bug fix in change.f related to inconsistency in listat() and tagYES
   after option U.
   [file: change.f]

version 4.70 20.04.2012
^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: support for Quantum Espresso: can read and write QE input files.
   Not all options are supported yet, but the most useful/straightforward are.
   [files: applica.f, tetrag1.f, input_tetr.f]
2. Menus requiring code selection have been updated.
   [file: input_tetr.f]
3. When writing input files for SIESTA, QUICKSTEP and QE the recorded lines of the
   original input files (if exist) are printed cut after the last character using
   the F90 TRIM function (it was checked that it works with af90,  gfortran and 
   Intel compilers; however, it may not work with others, in which case the trim(...)
   has to be removed from applica.f).
   [file: applica.f]
4. NEW: When reading in input files from VASP, VASP 5.2, SIESTA, QUICKSTEP and QE 
   a check was made previously on equaivalent atoms and, if found, the process
   stopped with an error message. Now this has been improved: the equivalent atoms
   are ignored (including whole species if all atoms from them are equivalent to
   other atoms) and the process continued with WARNING messages. In the cases of
   SIESTA and QUICKSTEP skipped atoms may screw up the constraints (if exist) as
   atomic numbering changes. In these two cases a WARNING message is given, but
   the constraints are left (may be incorrect). There is no priblem with any VASP
   or QE as the constraints are supplied with atomic positions, not by atomic numbers.
   [file: input_tetr.f]
5. In M menu: after U or UU all tagging is removed to avoid a problem or wrong tags
   on non-existing atoms after undo is made on added atoms.
   [file: change.f]

version 4.69 20.03.2012
^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in Pc option fixed related to incorrect transformation of fractional
   translations of non-symmorphic groups. <= apparently, the correction in v. 4.67
   was incorrect, I returned back to what it was in the previous versions. Now Si
   bulk from group #227 is correctly built. It is difficult to recall why that
   change was made in v. 4.67 in the first place.
   [file: build_spacegroup.f]

version 4.68 13.03.2012
^^^^^^^^^^^^^^^^^^^^^^^^
1. Some bugs in writing QUICKSTEP file fixed.
   [files: input_tetr.f, applica.f]
2. NEW: Ss option of the main menu handles the QUICKSTEP output as well: if
   an input file (e.g. before relaxation) is read in first from the head menu,
   then using Ss one can replace the coordinates from the QUICKSTEP xyz file
   and save the new file with a new name, e.g. seed_rlx.inp
   [files: tetrag1.f]
3. HELP with option H in the M menu: SR must be applied for the larger possible cell
   which is still equivalent to the bulk; after that one can increase the 3rd lattice
   vector and then apply H (or apply H first and then increase the 3rd vector). 
   The point is that saving (with SR) small lattice vectors
   of the bulk prior to the H option may not be sufficient for bigger cells.

version 4.67 15.12.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in Pc option fixed related to incorrect transformation of fractional
   translations of non-symmorphic groups. 
   [file: build_spacegroup.f]
2. The default for An was changed in Pc menu into reading atoms in fractional
   coordinates wrt the conventional cell. Also, An is shown from the very beginning
   (the previous structure was overcomplicated).
   [file: lattice_space.f]
3. NEW: an option ST added in the M menu allowing saving tagged atoms in XYZ format
   as geom_tagged.xyz
   [file: change.f]
4. Format improved in show_atoms() routines from i3 to i5 for atomic numbers to deal
   with an issue of big systems with over 999 atoms.
   [file: change_tools.f]
5. NEW: a collection of atoms can be moved in an equivalent position in the M menu 
   (this is a generalisation of the previous option 4 which was before applied only 
   to a single atom): option Re
   [file: change.f]

version 4.66 12.11.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. Plot() routine corrected in correspondence with a different syntax of gnuplot v.4.4
   (the latest at this time).
   [file: tools.f]

version 4.65 01.07.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. In option Cm relaxation flags for both geometries are also printed to see clearly
   which atoms are fixed and which are not. Relaxation flags are also compared and if
   different, warning is issued.
   [file: tetrag1.f]

version 4.64 06.05.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in option Rd of the M menu fixed.
   [file: change.f]

version 4.63 25.04.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. Ooption Rd of the M menu has been improved by modifying the algorithm so that a check 
   on the correctness of the tried cell reduction is explicitly performed
   [file: change.f]

version 4.62 16.04.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. An algorithm for H-termination in the M menu modified to work better and in more
   general situations.
   [files: change.f, change_tools.f]
2. Some menu options in the M menu renamed as follows:
   Rm - remove atoms
   Rn - rename atoms
   KT - keep atoms, remove the rest
   [file: change.f]    
3. Option 8 of the M menu modified: any lattice vector can now be changed, not only the 3rd one
   as before.
   [file: change.f]    

version 4.61 05.04.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug corrected in compiling lists for printing in the M menu. This is related to
   the situation in which there was already a list of selected (tagged) atoms and then
   a set of atoms is added from another file (option Ad). In this case the list of atoms
   for the nice printing was not recalculated resulting in some cases in wrong list
   produced.
   [files: change.f, change_tools.f, cluster.f, make_fcm.f, ttag.f, tools.f]
2. Some f77 instructions were simplified using f90 extensions - not much though, have to be
   done properly some day!!!
   [files: change.f, change_tools.f, cluster.f, make_fcm.f, ttag.f, tools.f]

version 4.6 31.03.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a new option Rd in the M menu which allows fractional extension matrix in cell
   generation, namely, in cell reduction. For instance, one can start from a supercell
   and wish to reduce it back to a smaller cell which would still reproduce the same
   infinite crystal. 
   [files: change.f, devices.f, tetrag1.inc]
2. NEW: tolerance when checking equivalence of atoms in M (presently only for option Rd)
   can be changed via settings option Tl.
   [files: change.f] 

version 4.5.2 12.03.2011
^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a new option Sc added to the M menu allowing to uniformly rescale all atomic
   positions together with lattice vectors for the whole system. This may be useful e.g.
   when a new lattice constant is to be used for an existing system (e.g. when one would
   like to recalculate the relaxed system with a new DFT functional).
   [file: change.f]

version 4.5.1 8.12.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. When reading siesta input, tetr complained and did not proceed if the system label
   was not found in the input file. This has been replaced by a warning and tetr now
   proceeds with the temporary label TEMP.
   [file: input_tetr.f]
2. When reading VASP v. 5.2 input files (POSCAR, CONTCAR), two cases can be handled:
   when species symbols are given on a separate line just before the numbers of atoms 
   in each species (new format) or not (old format).
   [file: tetrag1.f]
3. A bug fixed related to reading an input file from VASP: when a wrong option is chosen
   in the main menu, the file was not closed properly by tetr which resulted in an error 
   when reading this file again with another option (e.g. 3 first and then 8 - both VASP).
   [file: input_tetr.f]

version 4.5 24.11.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: Menu options V2 and V3 allow for the calculation of the vibrational free energy:
   if V2 does this for all frequencies of a single irrep, V3 does it for all vibrations.
   In both cases the zero phonon energy is also shown. This can be done either for one
   or for a range of temperatures (although T dependence is very weak!). Note that in the
   case of V3 all frequencies < 0.01 cm-1 are not accounted for.
   [files: eig_vibr.f, make_fcm.f]

version 4.4 17.11.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. Some bugs fixed affecting calculations of vibrations.
   [files: get_forces.f, mol_vibr.f]
2. Location of tetr as read in by hat.f is used directly in the code instead of the enviromental variable
   $HOME_TETR which (for some reason) is not available to my debugger. Thus, there is only one
   place now for this variable to be used which is hat.f
   [file: mol_vibr.f, eig_vibr.f]

version 4.3 22.07.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: support for VASP version 5.2.
   WARNING: some probems may still remain, in particular, in get_forces.f
   in deciding whether the relaxation stopped; I cannot check this point
   without having the results of the actual calculation with vasp v.5.2. 
   However,  all the necessary structures are in place.
   [files: tetrag1.f, cluster.f, get_forces.f, input_tetr.f, applica.f, 
           mol_vibr.f, make_fcm.f, move_tip.f, bsse.f]
2. Mendeleev's table extended to 112 first entries'
   [files: mendeleev.inc, devices.f, input_tetr.f]
3. Atomic masses given to all 112 species'
   [file: mendeleev.inc]

version 4.22 20.06.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: atomic positions (option At) in the Pc menu (using a space group) can
   be now given in fractional coordinates wrt the conventional unit cell. This
   allows using data from crystalographic collections (e.g. Cambridge cif files)
   [file: lattice_space.f]
2. NEW: option 5 added to the M menu to reset all atoms within the chosen cell,
   i.e. with all their fractional coordinates to be between 0 and 1.
   [file: change.f]

version 4.21 07.04.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. Some improvements in the option Sr of the M menu (choosing the plane)
   [file: change_tools.f, get_best_ai.f]
2. The default in B menu of atomic coordinates has been changed to Cartesian.
   Also, an array x(1:3) introduced in ask_equiv() for enabling giving expansion
   coeeficients if needed (now commented out).
   [file: lattice.f, devices.f]

version 4.2 16.03.2010
^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug fixed in reading siesta input file (one rewind() commeand was missing)
   [file: input_tetr.f]

version 4.1 06.02.2010
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a support for QUICKSTEP: it can now read and write simple files
   in QUICKSTYEP format. There are many more options in QUICKSTEP, not yet supported!
   Supported options: blocks &CELL (all main formats), &COORD and &FIXED_ATOMS 
   (any COMPONENT X/Y/Z/XY/XZ/YZ/XYZ command is supported)
   [files: tetrag1.f, input_tetr.f, siesta.inc, applica.f, bsse.f, tetrag1.inc]
2. NEW: tetr can now save an input file for QUICKSTEP for the BSSE calculation
   with all the necessary options required. In this case no script is necessary
   as QUICKSTEP does all the calculations, however, the choice of "molecules" can
   be done in the M menu which is still more convenient!
   [files: bsse.f, change.f]
3. NEW: tetr can organise QUICKSTEP calculation of electron densities (in B3 of M
   menu) by creating a script and a directory structure, similarly to this option
   working before.
   [files: tools_strings.f, bsse.f]
4. the code related to chosing molecules (option B1 in M) is simplified a bit
   [file: change.f]
5. A bug corrected affecting option B3 for SIESTA, M menu (code crash)
   [file: bsse.f]

version 4.05 22.01.2010
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option Rt (rotations of atoms) has been updated by implementing a general
   rotation such that a plane of atoms would appear after the rotation oriented
   with its normal along the specified direction. This is a generalisation of the
   existing options Px,Py,Pz which were found to be incorrectly implemented as well.
   This is now also corrected.
   [files: tools.f, change_tools.f, change.f, cluster.f, lattice_space.f]
2. NEW: flipping wrt a plane is added in Rt as another way to rotate a set of atoms
   [files: tools.f, change_tools.f]

version 4.04 16.08.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. More bugs in recogniding separate relaxation flags for each cartesian component
   for siesta calculation found and fixed.
   [files: change.f, bsse.f, applica.f, input_tetr.f]

version 4.03 12.08.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in removing atoms which was related to relaxation flags, fixed.
   [file: change.f]
2. A bug in reading/writing separate relaxation flags for each cartesian component
   fixed (siesta)
   [file: input_tetr.f, applica.f]
3. A bug is fixed which forced saving some of the siesta keywords twice to the
   fdf file.
   [file: applica.f]

version 4.02 10.08.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. Some of siesta keywords associated with the fdf format were not correct; fixed.
   [files: applica.f, bsse.f]

version 4.01 26.07.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. It appears that some compilers do not like a variable in the definition of the
   length of a character, so I had to make some changes to make the code more portable.
   If version 4.00 compiles, then you do not need to go tho this one.
   [files: tetr_param.inc, cluster.f, change.f, move_tip.f, ttag.f, lists.inc, Makefile]

version 4.00 25.07.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: appropriate support for very large systems, e.g. longer lists and warning
   if they are too long; this has not been done in make_fcm.f and lattice_space.f
   (likely to be less required).
   [files: tetr_param.inc, cluster.f, change.f, move_tip.f, get_forces.f, ttag.f, 
           tools.f, mol_vibr.f]

version 3.99.17 16.05.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. A more careful checks are made if the correct parameters are given when saving
   siesta input files for vibrations calculations.
   [files: applica.f, change.f, cluster.f, crystal_vibr.f, lattice.f, lattice_space.f,
           mol_vibr.f, move_atoms.f, move_tip.f, tetrag1.f]
2. One more check is made when writing siesta input files for the BSSE correction.
   [file: bsse.f]

version 3.99.16 05.05.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. A bug in BSSE part fixed: SystemLabel was not printed into the input files
   for each part (no-ghost). Because of this, if the density is required to be saved,
   then the name of the RHO file was wrong and hence not moved by the BSSE_script to 
   its directory (file name mismatch). Now fixed.
   [file: bsse.f]
2. A bug in writing input files for the BSSE correction related to checking options
   DM.UseSaveDM and UseSave Data fixed.
   [file: bsse.f]

vErsion 3.99.15 01.05.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: option Sp added to the TT menu: atoms can be selected by species as well.
   [file: ttag.f]

Version 3.99.14 05.04.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. Option Ss: if an XV file was read first, then relaxation flags are also read from the
   related fdf file and will be saved in the INPUT_FILE-relaxed.fdf file
   [files: input_tetr.f, bsse.f]
2. SIESTA relaxation flags for particular coordinates are read in correctly and printed
   out. It is not yet possible to specify them separately in the menus.
   [files: input_tetr.f, bsse.f, applica.f]

version 3.99.13 21.03.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. If atoms are already frozen at the time of entering the AF menu (for AFM), then after
   for the 1st time atoms of the tip are specified, the relaxation flags for the tip and surface
   are set automatically from those existed at the start of the menu. - just for convenience.
   Of course, the flag can be changed after that if needed.
   [file: move_tip.f]

version 3.99.12 17.03.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: The option 6 in the M menu (biulding the surface by Miller indices) has been 
   expanded into a separate menu and renamed as Sr: it is possible now to construct a 
   crystallographic unit cell to specify the Miller indices on it rather than on the 
   original cell. So, if the extension matrix for the current cell is known, then one 
   specifies it with Su, chooses the option Mi to give Miller indices, and the direction 
   noraml to the plane is worked out. Then, the option CP constructs the surface plane 
   required by choosing the smallest 1st and 2nd lattice vectors to lie within the plane. 
   Alternatively, the normal to the plane can be specified directly, if known. 
   [files: change.f, change_tools.f]
2. Visualisation options in Cl were collected together resulting in a light reorganisation
   of the Cl menu.
   [file: cluster.f]
3. NEW: it is possible in Cl to add terminating H atoms at the actual positions of the atoms
   they replace by setting the automatic distance option in Hd.
   [file: cluster.f]
4. NEW: one can save in option Cl the geometry of a cluster in one of the acceptable formats 
   like SIESTA or VASP. 
   [file: cluster.f, change_tools.f]

version 3.99.11 13.03.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: for convenience, geom.xyz file is written automatically in menus B, Pc, M, PE and AF 
   of the main menu after the size of the breeding box is changed via Bb.
   [files: change.f, lattice.f, lattice_space.f, move_atoms.f, move_tip.f] 
2. NEW: a new option B0 is added to the menus B, Pc, M. PE and AF to nullify the
   breeding box; also, the menus appearance has been changed by putting together
   menu options related directly to the visualisation. 
   [files: change.f, lattice.f, lattice_space.f, move_atoms.f, move_tip.f] 

version 3.99.10 4.03.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a bug in initialisation of frozen atoms in M menu fixed
   [file: change.f]

version 3.99.9 25.01.2009
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a variable ch was not defined; fixed.
   [file: ttag.f]

version 3.99.8 18.12.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a bug fixed with the lists lengths; routines tag_400() and ttag_400() removed
   [files: ttag.f, tools.f, change.f]

version 3.99.7 9.12.2008
^^^^^^^^^^^^^^^^^^^^^^^^^

1. one can either normalise or not the IR intensity (V3 menu). It is useful
   if, say, the IR intensities at different T are to be compared. 
   [file: make_fcm.f] 

version 3.99.6 25.11.2008
^^^^^^^^^^^^^^^^^^^^^^^^^

1. a new averaging option in calculating the IR intensity: when all polarisation directions
   are averaged, keep the angle of the propagation direction with the Z axis fixed, otherwise,
   average over all remaining directions (a cone around the Z axis). New menu options in V3.
   [file: make_fcm.f] 

version 3.99.5 30.10.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a more careful reading of forces from siesta output file was realised
   since it appeares that sometimes siesta puts rubbish between and on lines
   of forces
   [file: get_forces.f]

version 3.99.4 09.09.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a bug in a printing statements for k-points in options Vs and V2 fixed
   [files: crystal_vibr.f, eig_vibr.f]

version 3.99.3 05.07.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. a bug in using Born charges fixed; now C60 IR spectrum is calculated c orrectly
   with essentially four picks only; this example is included into my TETR distribution
   [files: make_fcm.f, atom_info.inc]

version 3.99.2 02.07.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. Some important modifications in the IR spectrum calculation
   [files: make_fcm.f]

version 3.99.1 04.06.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a complete averaging over all directions of the polarisation vector are
   implemented in the IR intensity routine. This is useful for calculating IR
   intensity for a gas of molecules when their orientations in space are
   completely random
   [files: make_fcm.f]

version 3.99 16.05.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: Born charges properly implemented in IR intensity calculation (menu V3)
   (file format for charges is of SIESTA; however, the calculations does not
   depend on the code as long as the format is the same; VASP format will be
   implemented later, when available)
   [files: tetrag1.f, make_fcm.f]

version 3.98.3 27.02.2008
^^^^^^^^^^^^^^^^^^^^^^^^^
1. element La is added
   [file: mendeelev.inc]
2. vscalve moved in the right position within the common block
   [file: tetrag1.inc]

version 3.98.2 5.12.2007
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: H option (termination with H atoms) has been added to the M menu to facilitate
   construction of terminating H atoms in surface supercell calculations.
   [files: change.f, change_tools.f]
2. a bug in cluster.f fixed.
   [file: cluster.f] 

version 3.98.1 4.12.2007
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: a more general tagging mechanism is added to the Cl and M menus (as TT)
   which allows choosing atoms, in addition to the previous option by numbers, by inside/outside 
   of a sphere and/or inside of a rectangular box.
   [files: tools.f, ttag.f, change.f, cluster.f]
2. R and Z regimes in the Cl menu are now redundant and have been removed.
   [file: cluster.f]
3. NEW: previos tagging option T in AF option was replaced by calling the general tagging 
   routine (as in TT option, see 1).
   [file: move_tip.f]

version 3.98 14.11.2007
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: in V3 the three DOS for the three methods of calculating the FCM (see 3.97.9 above) 
   can be previewed at the same time (new option Pr); the temporary option in V3 (in 3.97.9)
   has been removed.
   [file: make_fcm.f]
2. some annoying screen writing when the FCM is generated have been removed
   [file: eig_vibr.f]
3. a bug in V3 (option Sg) fixed
   [file: make_fcm.f]
4. NEW: energy interval for the DOS in V3 can be specified (new option EB)
   [files: make_fcm.f, tools.f]

version 3.97.9 13.11.2007
^^^^^^^^^^^^^^^^^^^^^^^^^
1. NEW: it is possible to choose how the force constant matrix is made symmetric: either
   by calculating the average between (i,j) and (j,i) elements (the only possibility available
   previously), taking the whole matrix from the upper-right triangle, or from the left-bottom
   triangle (both V2 and V3). This allows for the comparative DOS with the three option to be
   plotted manually (by running V3->Ei->D1 in each case, renaming files dos.dat and then plotting 
   them together)
   [files: eig_vibr.f, make_fcm.f]

version 3.97.8 30.10.2007
^^^^^^^^^^^^^^^
1. a bug in showing frozen atoms and saving a file with some atoms frozen (VASP)
   [file: change.f, applica.f]
2. a bug in locating file sym_for_siesta.info fixed.
   [file: lattice_space.f]
3. annoying 'proceed (y/n)' removed in M
   [file: chnage.f]
4. precision with which coordinates of atoms are printed into the fdf file is increased 
   (SIESTA only).
   [file: applica.f]
5. a bug in get_forces: even for vibrations, it should still look for the last
   occurence of the string preceding the forces
   [file: get_forces.f]

version 3.97.7 28.10.2007
^^^^^^^^^^^^^^^
1. extended list of frozen atoms to 400 characters; format change in Bb option of M
   [files: change.f, tools.f]
2. all atoms in the system are dumped in a file atoms.xyz once Co is used in M and AF.
   [file: change_tools.f] 

version 3.97.6 24.10.2007
^^^^^^^^^^^^^^^

1. bugs in the cluster routine (option Cl of the main menu) associated with the check 
   on the memory usage fixed
   [file: cluster.f]
2. NEW: two regimes (Z- and R-regimes) introduced to generate atoms in the cluster (option
   Cl of the main menu); atoms are added untill criteria of the two regimes (or one of them)
   are satisfied. Helps to build the cluster of certain shape.
   [file: cluster.f]

version 3.97.5 19.07.07
^^^^^^^^^^^^^^^

1. a bug in option Vs fixed (thanks for Nikolas who noticed the problem!)
   [file: mol_vibr.f]

version 3.97.4 11.05.2007
^^^^^^^^^^^^^^
1. NEW: IR intensity is implemented within the V3 menu
   [files: tetrag1.f, make_fcm.f]
2. a bug in get_forces fixed (thanks to Natalia)
   [files@ get_forces.f]

version 3.97.3 12.04.2007
^^^^^^^^^^^^^^
1. NEW: get_forces routine reads the final (last) forces in the VASP/SIESTA output file
   (i.e. final forces of the atomic relaxation, not just the first ones as before)
   [file: get_forces.f]
2. NEW: atomic forces are read in by get_forces in the run_AFM script and the tip
   force is calculated and saved within the directory structure; an info file with
   all forces is also created for each lateral position; the syntax of get_forces
   has also been changed to faciliate these new functionalities; 
   [file: get_forces.f, collect_forces]
3. NEW: Tip height is specified within the AF option (the new option Z); the value
   corresponding to the difference in height between the highest surface and
   the lowest tip atoms is suggested. The value is used in the AFM script as the
   actual tip height when collecting forces and saving in files
   [file: move_tip.f]
4. A bug fixed in reading fixed atoms ifrom SIESTA fdf file (related to order of
   atoms)
   [file: input_tetr.f]  
5. NEW: get_forces checks if the structural relaxation successfully finished
   and the tip force is only printed out if this is so; otherwise, an ERROR
   message is given; the generated script contains a check of finished
   relaxation, it will exit if the relaxation has not finished
   [file: get_forces.f, move_tip.f]
6. A bug fixed in writing SIESTA input with the Ss option
   [file: base.f]
7. Empty lines not printed into the fdf SIESTA files anymore
   [files: bsse.f, applica.f]
8. A bug in reading SIESTA forces by get_forces fixed (the format of forces is
   apparently different depending on whether these are the final forces or not).
   [file: get_forces.f]
9. AFM script has been modified to take account of the fact that SIESTA XV
   files are not produced if there was no change in geometry, in which
   case Ss option will not work.
   [file: move_tip.f] 
10.AFM script has been modified to disable UseSaveData in SIESTA before going
   to the next lateral point and enable it before going to the next vertical
   point as SIESTA turned out to be crashing otherwise.
   [file: move_tip.f] 

version 3.97.2 4.03.2007
^^^^^^^^^^^^^^
1. some little changes in handling ',' in cutstr; the number of words is
   also increased from 30 to 100.
   [files: tools_strings.f, change.f, build_spacegroup.f, crystal_vibr.f, 
           lattice_space.f, eig_vibr.f, input_tetr.f, move_tip.f,
           make_fcm.f mol_vibr.f  tools.f]
2. Tagging is taken into a separate routine
   [files: tools.f, change.f, move_tip.f, cluster.f]
3. NEW: reading/writing of the constraints box from/to SIESTA fdf file;
   fixed atoms are checked immmediately in the M menu and shown
   [files: input_tetr.f, applica.f, change.f]  
4. NEW: one can choose the atoms to be fixed in the M menu
   [file: change.f, tools.f]
5. NEW: new options FT, FS and S are added to the AF menu (AFM script)
   to choose fixed atoms in the tip (FT), surface (FS) and to save the
   input file (S).
   [file: move_tip.f, tools.f]

version 3.97.1 4.03.2007
^^^^^^^^^^^^^^
1. character '\' was replaced with char(92) since pgf90 did not like it;
   little code char_search written to help to find the appropriate char(i)
   [files: bsse.f, move_tip.f, char_search.f]
2. 0.0 vertical displacement added in the AFM script (was a bug)
   [file: move_tip.f]

version 3.97 21.02.2007
^^^^^^^^^^^^^^
1. NEW: AFM option in the main menu (option AF) which creates a shell-script
   for running tip on the 3D grid with respect to the surface (the script
   creates directories, files, etc., not tetr in this case)
   [files: move_tip.f, tetrag1.f, afm.inc, Makefile]

version 3.96.3 20.02.2007
^^^^^^^^^^^^^^
1. AFM script developed
   [files in directory AFM]
2. AFM option has been started
   [files: move_tip.f, tetrag1.f, afm.inc, Makefile]

version 3.96.2 19.02.2007
^^^^^^^^^^^^^^

1. Comma introduced (alongside usual spaces) as a delimiter in tag lists; this
   is needed to faciliate porting string commands to tetr in scripts; all the
   parts in the code using tagging and lists received corrected instrcutions
   [files: tools_string.f, cluster.f, change.f, crystal_vibr.f, lattice_space.f, 
    make_fcm.f, mol_vibr.f]
2. a bug in write_final_siesta fixed (Err not defined)
   [file: bsse.f]
3. work on AFM script started
   [files in directory AFM]

version 3.96.1 16.02.2007
^^^^^^^^^^^^^^

1. a bug in Ss fixed (did not print the system label)
   [files: bsse.f]

version 3.96 12.02.2007
^^^^^^^^^^^^

1. NEW: option Ss added in the main menu to combine siesta  fdf and XV files into one
   INPUT_FILE-relaxed.fdf file; useful for creating a single fdf file after relaxation
   containing all the same options and the new geometry (e.g. to move on with vibrations)
   [files: tetrag1.f, bsse.f, tetrag1.inc]

version 3.95 07.01.2007
^^^^^^^^^^^^

1. a bug in 'reading the rest in siesta file' corrected
   [files: input_tetr.f, siesta.inc]
2. NEW: siesta writes k-points and weights within the DOS option of KP 
   into a special block BandPoints 
   [files: applica.f, tetrag1.f]

version 3.94h16 18.12.2006
^^^^^^^^^^^^^^^
1. Finished B2 in M: writes input siesta files and the script BSSE_script.run
   which contains completely automatic calculation of the BSSE correction
   [files: bsse.f]
2. NEW: At the same time, the density (RHO file) can also be saved; this is asked
   when the script is being created
   [files: siesta.inc, input_tetr.f, bsse.f]
3. Division in M into parts is made general for any code
   [file: change.f]
4. NEW: A separate option B3 in M for the difference dnensity script, directory structure
   and POSCAR files inside (both SIESTA and VASP)
   [files: siesta.inc, bsse.f]

version 3.94h15a 14.12.2006
^^^^^^^^^^^^^^^
1. NEW: Started B2 in M
   [files: change.f, change_tools, bsse.f, Makefile]

version 3.94h15 14.12.2006
^^^^^^^^^^^^^^^
1. NEW: Division of the system into "parts" is implemented in M for BSSE
   calculation with SIESTA
   [files: change.f, tetrag1.inc]

version 3.94h14 13.12.2006
^^^^^^^^^^^^^^^
1. tools have been written to check symmetry information (groups, irreps)
   [files: directory Symmetry]
2. error in irreps matrices and characters of C6h was found and corrected
   [file: symgrp.rep]
3. NEW: Stress symmetry option [St] added to Pc menu to check symmetry on the
   stress tensor; after that, this option was removed (the file with this
   option is in ./Stress)
   [file: lattice_space.f]
4. NEW: conditions on the stress tensor added to option Sf of Pc
   [file: lattice_space.f]
5. group S6 added to symgrp.rep file, not yet to other places.
   [file: symgrp.rep]

version 3.94h13 25.11.2006
^^^^^^^^^^^^^^^
1. NEW: option Sf added to Pc and M menus: fortran code for SIESTA constr.f routine to
   keep symmety in the system during geometry optimisation (symmetrise forces)
   [files: tools_strings.f, lattice_space.f, change.f, devise.f]
2. used character*(*) construction for all string tools instead of explicit
   specification 
   [files: devices.f, add_rem.f, change.f, cluster.f, coulomb.f, hat.f,
   lattice.f, lattice_space.f, make_fcm.f, move_atoms.f, tetrag1.f, applica.f,
    input_tetr.f, get_forces.f, tools_strings.f, eig_vibr.f, mol_vibr.f,
    crystal_vibr.f]
3. species 'XX' is introduced when the Mendelev's number is beyond 82;
   a warning is given; tetr does not change species to '  ' if not
   recognised, but instead keeps it as entered; when saving  SIESTA input
   file, a warning is given if species is not recognised
   [file: input_tetr.f, devices.f, applica.f]

version 3.94h11 18.11.2006
^^^^^^^^^^^^^^^
1. print statement fixed for the lattice vectors in the lattice [B] menu
   [file: lattice.f]
version 3.94h10 11.10.2006
^^^^^^^^^^^^^^^
1. Menu Vm,Vs,Vc: after an irrep is chosen, it is possible to deactivate it by
   choosing the same irrep the 2nd time; useful, if decided to run Au for all irreps
   [file: mol_vibr.f, crystal_vibr.f]
2. Portability problem fixed (e.g. a redundant option FE in V2 did not work)
  [mol_vibr.f, eig_vibr.f, crystal_vibr.f]


version 3.94h9 9.10.2006
^^^^^^^^^^^^^^
1. a bug fixed in inver2(); shuold have effect on reciprocal lattice vectors
   if the direct lattice vectors in 2D are not orthogonal (thanks to Tom)
   [file: tools.f]

version 3.94h8 13.6.2006
^^^^^^^^^^^^^^
1. R in M-menu was changed into Rt
   [file: change.f]
2. Change default to <Fractional> for the An option in the B menu; 
   title of menu 7 changed;
   a bug fixed (BJ was not generated for AJ in two places)
   [file: lattice.f]

version 3.94h7 9.5.2006
^^^^^^^^^^^^^^
1. an old bug fixed in writing xyz files (was sure I fixed it before...)
   [file: add_rem.f]

version 3.94h6 13.4.2006
^^^^^^^^^^^^^^
1. bugs fixes; options Mv, Rt work correctly now
   [file: lattice_space.f]

version 3.94h5 12.4.2006
^^^^^^^^^^^^^^
1. bugs in taging fixed
   [files: lattice_space.f, change.f]
2. added options Mv and Rt into Pc
   [files: lattice_space.f]
3. some other minor changes in Pc   
   [files: lattice_space.f]

version 3.94h4 5.4.2006
^^^^^^^^^^^^^^
1. tags added in [Pc] and bugs fixed related to tagging in [M]
   [file: lattice_space.f, change.f]
2. options Rm and Rn added to Pc
   [file: lattiec_space.f]

version 3.94h3 4.4.2006
^^^^^^^^^^^^^^
1. new options in [Pc] added (S,T)
   [file: lattice_space.f, devices.f, tetrag1.f]

version 3.94h1 31.3.2006
^^^^^^^^^^^^^^
1. Bugs in Pc fixed
   [file: lattice_space.f]

version 3.94h 29.3.2006
^^^^^^^^^^^^^^
1. Option Pc largerly rewritten
   [files: lattice_space.f, build_spacegroup.f, change.f, cluster.f,
   crystal_vibr.f, move_atoms.f, tetrag1.f, tetrag1.inc]

version 3.94g 15.3.2006
^^^^^^^^^^^^^^
1. Bugs related to file opening using tetr location variable fixed
   [files: lattice_space.f, build_spacegroup.f]

version 3.94f 14.3.2006
^^^^^^^^^^^^^^
1. Item [Ad] added to the Pc menu.
   [file: lattice_space.f]

version 3.94d 14.3.2006
^^^^^^^^^^^^^^
1. 2D space groups added and checked against the Tables; 2D option added to
   the Pc menu
   [files: group.list.intern, space.grp.intern, lattice_space.f, build_spacegroup.f]
2. some bugs corrected 
   [file: lattice_space.f]

version 3.94c 10.3.2006
^^^^^^^^^^^^^^
1. 3D space group generators were checked against the International Tables; 
   the fractional tranlsations are given with respect to the conventional cell;
   definitions of direct lattice vectors have been also changed appropriately
   [files: space.grp.intern, group.list.intern, build_spacegroup.f]
2. several options added to the main Pc menu to get information about the space 
   group (options Sy, Re, Ca)
   [files: lattice_space.f, wyckoff_int.f, pgroup.inc]

version 3.94a 13.11.2005
^^^^^^^^^^^^^^

1. replaced 'l' formats to logical variables with 'l1' as it gieves error
   by some compilers like g77
   [files: get_best_ai.f, eig_vibr.f]
2. a new option Pc added to the main menu (cell construction from the space
   group symbol)
   [files: lattice_space.f, build_spacegroup.f, pgroup.inc]
3. also added a check of the existance of two new files (space.gr.int,
   gropup.list.int) required for the Pc option to work (space group
   information)
   [file: hat.f]
4. corresponding changes in do_tar_improved, do_tar
   [file: do_tar_improved, do_tar]
4. cosmetic changes in change.f
   [file: change.f]

version 3.93a 18.7.2005
^^^^^^^^^^^^^^
1. a bug in make_fcm() when calculating log of rpoduct of frequencies for
   molecules fixed
   [file: make_fcm.f]
2. a completely new manual released - fully up-to-date!

version 3.93 13.7.2005
^^^^^^^^^^^^

1. a bug in the main routine (the call to move_atoms) - must have been there for a
   very long time!
   [file: tetrag1.f]
2. a new option UU added to move_atoms() [called by Mv from the main menu];
   also, when leaving the option Mv, the old geometry (at the entry) will be
   restored 
   [file: move_atoms.f]
3. the title of item 4 in the point group menu clarified
   [file: point_gr.f]
4. a bug in cluster() fixed
   [file: cluster.f]
5. routine specify_angle() completely rewritten
   [file: change.f, tools.f] 
6. option R of the M-menu was renamed into Rt
   [file: change.f]
7. option 5 from the M-menu removed
   [file: change.f]
8. routine calculating the Madelung potential has been substantially modified
   to accomodate the same logic as other tetr routines; new options Co, Sy added
   [file: coulomb.f]

version 3.92h  21.6.2005 [mainly bug fixing]
^^^^^^^^^^^^^
1. bugs in changing atomic masses in V3 -> Am fixed
   [file: make_fcm.f]
2. in calculating phonon DOS, imaginary frequencies are ignored
   [file: make_fcm.f]
3. two bugs in option V3 -> pD fixed, one being that one could choose a fixed
   atom that resulted in error in pdos() routine; not anymore
   [file: make_fcm.f]
4. Ge mass is added to the data base, all entries commented directly
   [file: mendeleev.inc]
5. a bug in routine distorted_xyz_all() fixed; it affected movie option Vs in
   V3 menu
   [file: make_fcm.f]
6. in option V3 -> Am it is now not possible to change the mass of a fixed
   atom as it does not make sense anyway  
   [file: make_fcm.f]
7. in option V3 -> Ei, the natural logarithm of a product of all real
   frequencies (in cm^-1) is printed out for the transition rate calculations
   [file: make_fcm.f]
8. in V3: is checked if the order of atoms is different from the input file,
   and if it is, a warning is printed at the top of the menu: it is important
   if atomic masses are changed (option Am) or projected DOS is calculated
   (option pD, then D2)
   [file: make_fcm.f]
9. in V3: a new option W is added that dumps atomic positions into a geom.xyz
   file;  this is useful if atomic numbering is different from the input file
   [file: make_fcm.f]

version 3.92g  13.6.2005
^^^^^^^^^^^^^

1. ITI is initialised to 0 at the beginning; if a geometry exists before
   entering the B option of the main menu (creating from scratch), then the
   existing geometry is kept in a buffer and can be recovered at the end of
   the construction process when going back (up) to the main mennu; as a
   result, two options to leave appear: P (proceed from the current one) and Q
   (quit, restore the previous one)
   [files: lattice.f, tetrag1.f]
2. a bug in tetrag1() fixed that affected the very first menu (codes) ( a
   variable read_c was not set correctly in the case of error)
   [file: tetrag1.f]
3. edited help after Vs->Au option
   [file: crystal_vibr.f]
4. reading the irrep numbers in the menus of Vm,Vc,Vs is done without using
   fancy routines (still are in tools_strings.f) - could not make them work
   properly anmyway - platform dependent still - this is still to be worked
   out someday!
   [files: mol_vibr.f, eig_vibr.f, crystal_vibr.f]

version 3.92f  13.6.2005
^^^^^^^^^^^^^
1. initialisation of the tagging array in change() done over its whole length;
   otherwise, some new atoms were randomly initialised to tagged (e.g. when
   Su)
   [file: change.f]

version 3.92e  13.6.2005
^^^^^^^^^^^^^
1. logical format (l,...) changed into (l1,...) for compatibility with some
   platforms 
   [files: mol_vibr.f, eig_vibr.f, crystal_vibr.f, make_fcm.f]
2. a better fix for the problem 2 of version 3.92c: it actually checks if a
   character consists of a set of numbers explicitly
   [files: mol_vibr.f, eig_vibr.f, crystal_vibr.f, tools_strings.f]
3. check of an existance of a file (required in hat() routine) appeared as platform
   dependent; has been fixed by using the inquire command instead
   [file: tools_strings.f]
4. Animation option An of the main menu works presently only for CASTEP, but
   was called for any code; fixed now.
   [file: tetrag1.f]

version 3.92d  13.6.2005
^^^^^^^^^^^^^

1. option 'via energy' in vibrations is disabled - there are some bugs left
   after many modifications in 'via forces' option, I do not feel those would
   actually be necessary to fix
   [files: mol_vibr.f, eig_vibr.f]
2. reading an integer out of a character seems to give sometimes zero rather
   than an error; put a fix for this, but not sure if it is ok in general.
   [mol_vibr.f, eig_vibr.f, crystal_vibr.f]

version 3.92c  Mon Jun 13 13:49:18 BST 2005
^^^^^^^^^^^
1. routine hat() modified to give a number of useful things including the
   position of the home directory of tetr; this routine was removed from
   tetrag1.f and is now a single file; from now on the enviromental variable
   $HOME_TETR must be set to the correct position of the tetr directory
   [files: hat.f, Makefile, tetrag1.f, tools_strings.f]
2. file system.inc moved into systema.inc to avoid confusion with function
   system in some cases
   [files: crystal_vibr.f, devices.f, do_irrep.f, eig_vibr.f, make_fcm.f,
           mol_vibr.f, orbita.f, tetrag1.f]
3. tetr is called from inside via $HOME_TETR/tetr
   [file: mol_vibr.f]
4. the script collect_forces is called for all relevant irreps from inside; no
   need then to run it manualy anymore; so far, this should only work for
   VASP; the script was also modified by attaching $HOME_TETR to get_forces;
   thus, no need to do soft links anymore! Great relief!
   [files: eig_vibr.f, make_fcm.f, collect_forces]
5. tables in options Sa of V3 are printed by components for convenience - was
   not actually done in the previous version
   [file: solve_vibr.f, make_fcm.f]
6. SIESTA was incorporated into the vibrational options: firstly, get_forces
   routine modified to determine automatically which code (so far, only VASP
   or SIESTA) is being used for forces; secondly, run_DFT_script script
   was modified accordingly to create an OUTCAR file from siesta standard
   output (the only place that contains forces).
   [files: collect_forces, get_forces.f, mol_vibr.f]
7. from now on, each version is to be assembled using 
       tmake  version#
   script rather than directly using make; this gives the version number and
   the build date into the hat.f file. Users must still use make without
   changing the hat.f file supplied.
   [files: hat.f, tmake, Makefile]
8. script collect_forces was enforced with a number of checks (existence of
   files, directories, OUTCAR files correctness)
   [file: collect_forces]
9. when reading siesta input file, the screen freezing ("hit ENTER when
   ready...")  was removed to facilitate running tetr from inside for the Au
   options of Vm/Vc/Vs
   [file: input_tetr.f]
10. a bug in writing input file name for siesta in run_DFT_script fixed; there
   was also a bug in writing the input siesta file into input_for.tetr file
   that was also corrected.
   [file: mol_vibr.f]

version 3.91 11.6.2005
^^^^^^^^^^^
1. a little bug in option [Fx] of vibration menu fixed
   [file: mol_vibr.f]

2. a MAJOR DEVELOPMENT initiated: option Vs of the main menu added that would do
   vibrations using internal translations of the supercell. Main advantage:
   every k-point (corresponding to the Gamma point of the reduced BZ) gives
   its own irrep, so that all vibrations will be characterised by k-points
   automatically.
   [files: tetrag1.f, crystal_vibr.f, devices.f, mol_vibr.f, do_irrep.f, eig_vibr.f,
           Makefile, orbita.f, tetrag1.inc, space.inc]

3. a default displacement in option Da of Vm/Vc/Vs menus changed from 0.02 to 0.01
   [file: mol_vibr.f]
4. a small bug that may affect precision in solve_vibr() fixed
   [file: solve_vibr.f]
5. increased dafault values in sym_par.inc
   [file: sym_par.inc]
6. diaginalisation of the dynamical matrix for the chosen irrep in option V2
   is performed automatically upon choosing (activating) the irrep, so that
   option Ei in V2 of the main menu was removed
   [file: eig_vibr.f]
7. a bug in option Su of M related to construction of supercell lattice vectors,
   fixed 
   [file: change.f]
8. tables in options Sv,Sa of V2,V3 are printed by components for convenience
   [file: solve_vibr.f]
9. when tetr in Vm,Vc,Vs is lanched from inside, all output is sent to the
   file [out] (before, some of it was still sent to the screen); this avoids
   some annoying error messages showing up on the screen
   [file: mol_vibr.f]
10. when reading irrep number in menu V2, a restriction on the max irrep number
   (= to 12) removed; it could be any number now; this is necessary for option
   Vs that allows for very large numbers of irreps possible
   [file: eig_vibr.f]
11. routine hat() changed to faciliate an automatic detection of the version
   number and the build date; it will also show the todays date every time
   tetr used 
   [file: tetrag1.f]

This version was checked on a number of examples in MM. Seems to work!
Options Vs and Vc give the same results.

version 3.81  5.6.2005
^^^^^^^^^^^
1. atomic displacements in phonon eigenvectors appear in the order of atomic 
   coordinates x,y,z for convenience (in tables of Ea and in the files N_MODES_#.res)
   [file: solve_vibr.f]
2. a bug in option Cm of the main menu corrected; also, some cosmetic changes
   in the table there
   [file: tetrag1.f]
3. a new option Rf added to the main menu option M (change) that allows correcting
   atomic positions relative to a reference file of any format. This is
   ussually needed for VASP users as VASP likes changing atomic fractional 
   coordinates during relaxation to fit between 0 and 1. This is NOT very 
   convenient e.g. for slab calculations.  This same option exists in
   do_param, but I thought it would be useful to have it in tetr as well. The 
   extra flexibility (does not mean of course that it is badly needed!) is
   that you can compare e.g. VASP file with that of SIESTA. 
   [files: change.f]
4. the heading to the mol_vibr.f file was updated
   [file: mol_vibr.f]
5. options 7 and 77 of the M menu (change) renamed as Ex and Su, respectively
   [file: change.f]
6. a small (and not very important) bug with translating relaxation flags when
   breeding the lattice using option Su in M of the main menu fixed
   [file: change.f]
7. yet another bug in option Su of the main menu M (change) corrected
   [file: change.f]
8. a bug in routine ask() fixed - do not know where it has come from! 
   [file:devices.f]

version 3.8  28.5.2005
^^^^^^^^^^^
1. some unexplained bug in do_input_scripts() corrected (with Da) - I changed
   Ds -> Da in the main menu in Vm/Vc after releasing the first stable version
   without checking; it should have gone all the way down to  do_input_scripts();
   [files: mol_vibr.f]

version 3.77  15.2.2005
^^^^^^^^^^^^
1. a bug in writing the vibr_info.dat file fixed.
   [files: mol_vibr.f, eig_vibr.f, make_fcm.f]
2. some other bugs fixed related to atom numbering in V3.
   [file: make_fcm.inc, atom_info.inc]

This is a stable working version that supports V3 in full including projected
DOS and movie.xyz option. What is now required is a manual, will do shortly.

version 3.76  15.2.2005
^^^^^^^^^^^^
1. V3 menu started to take shape; mass and DOS added.
   [files: tools.f, make_fcm.f]
2. projected DOS added.
   [files: tools.f, make_fcm.f]
3. a bug in closing the vibr_info.dat file fixed.
   [file: mol_vibr.f]

version 3.75  30.1.2005
^^^^^^^^^^^^
1. all useful tools are collected in a separate file devices.f
   [files: devices.f, tetrag1.f, tools.f, mol_vibr.f, change.f, cluster.f]
2. new file system.inc added with the variable 'system' to distinguish between
   LATTICE and MOLECULE when checking equivalentce.
   [files: mol_vibr.f, devices.f, do_irrep.f, orbita.f]
3. all routines asking for equivalence were replaced by a single logical
   ask_equiv() routine. 
   [files: many files]
4. option Vm replaces V1 in the case of molecules in the main program; a new
   option Vc added to do vibrations for crystals. In this case when checking for atoms
   equivalence in orbita(), pvrt0() and irina(), different tools are used:
   when system=' LATTICE', we use ask_equiv (i.e. comparison by lattice
   vectors); when system='MOLECULE', then vectors are compared explicitly.
   [files: many]
5. ICMPL array has been put back. It is needed if a group has 2 complex
   conjugate irreps that are artificially made into a 2D real reducible one. Is
   needed for a number of point groups. <- actually, it is not used at all!
   [files: do_irrep.f, pgroup.inc]
6. option Am in mol_vibr() is made as a menu to benefit from existing masses;
   [file: mol_vibr.f]
7. cleaning up of symmetry routines.
   [files: many]
8. Makefile updated.

IT IS A STABLE VERSION FOR MOLECULES! Option Vm should definitely work!

LATTICE option [Vc] has not yet been carefully tested, so that it may not work.

version 3.74  27.1.2005
^^^^^^^^^^^^
1. a bug in get_all_from_siesta() routine corrected (reading the keyword "LatticConstant").
  [file: input_tetr.f]

version 3.73  15.1.2005
^^^^^^^^^^^^
1. option V3 in the main menu added to calculate the vibrational frequencies
   with the old foce-constant matrix but different masses (e.g. isotope shift
   effect) - just a test part, restoring the whole fcm matrix from its
   symmetrical parts.
   [files: tetrag1.f, make_fcm.f]
2. small changes to save memory.
   [files: matrix.inc, eig_vibr.f]
3. better explanations when generating k-points for the BAND option.
  [file: applica.f]
4. BAND sub-option in the KP option: devision by zero avoided.
   [file: applica.f]

version 3.72  10.1.2005
^^^^^^^^^^^^
1. in the case of 4 displacements, both amplitudes can be chosen in V1
   [file: mol_vibr.f]
2. option Au in V1: asks about the type and name of the input file using the
   standard 'save' menu; thus, input_for.tetr file does not require editing
   and is executed from inside tetr.
   [files: mol_vibr.f, input_tetr.f]

version 3.71  5.1.2005 
^^^^^^^^^^^^
{this is a correctly working version: V1,V2 were checked on C defect in Si-cluster}

1. line*100 increased up to line*200 to allow for a generous force format in
   VASP. Thus was an important bug that affected forces read in by tetr.
   [files: change.f, cluster.f, eig_vibr.f, mol_vibr.f, input_tetr.f, tools_strings.f, get_forces.f]
2. a numerical prefactor to the frequencies in cm^-1 corrected.
   [file: eig_vibr.f]

version 3.7  3.1.2005
^^^^^^^^^^^^

1. a bug in posit2, posit5 and posit10 routines corrected.
   [file: tools_strings.f]
2. a bug in checking error when reading in non-diagonal elements of the force 
   constant matrix corrected.
   [file:  eig_vibr.f, tools.f]
3. printing of tables of eigenvlues/vectors in options Sv and Sa of the V2 menu
   is made by parts in the cases of large numbers of eigenvectors; in
   addition, the results are dumped into files EIGEN_irrep.res (option Sv) and
   N_MODES_irrep.res (option Sa) for further reference.
   [file:  eig_vibr.f, solve_vibr.f]

version 3.61  1.1.2005
^^^^^^^^^^^^

1. changed default of the relaxation amplitude to 0.02 for the option V1
(works better for VASP, it seems)
   [file: mol_vibr.f]
2. a bug in get_forces.f that cut the line from OUTCAR giving wrong z-forces
   [file: get_forces.f]
3. an automatic option [Au] in V1 is modified to have it done for all irreps
   at once; also, Gw and Sw options are alos inculded inside, so that it became
   really automatic.
   [file: mol_vibr.f]
4. a new code, MM, based on sci-fi, is written to test the V1,V2 options.
   [directory: MM]
5. some cosmetic changes in V1,V2 menus; in particular, dimension of irreps is
   shown in menus + little help is given on the screen after Au option.
   [files: mol_vibr.f, eig_vibr.f]

version 3.6  20.12.04
^^^^^^^^^^^^

1. [Cl] option: added menu option [W] to write geom.xyz file anyway
2. two new examples created (Si cluster and O defect in a Si cluster) to debug
   the V1 and V2 options.

version 3.54  13.12.04
^^^^^^^^^^^^

1. more general specification for fixing orbits in V1
   [files: mol_vibr.f]
2. minor change in do_irrep.f
3. new oprion [Au] in V1: 
   (a) to create an input file input_for.tetr for automatic
       generation of all geometry files for VASP/SIESTA by tetr for the given irrep:
       to be run as:  tetr < input_for.tetr)
       Asks about the code (v/s) and method (Energy/Force). The file should be
       edited for the VASP/SIESTA input file (relaxed geometry).
   (b) 1, 2 and 4 displacements are allowed (option [Nd])
   (b) a script run_DFT_script is created to run VASP/SIESTA automatically 
       on all these input files. Should work with vasp; some
       additional editing is necessary for SIESTA.
   (c) creates a directory superstructure for the vibrations calculations,
       e.g.:

       irrep_1
       irrep_1/d=-0.0100
       irrep_1/d=0.0100
       irrep_4
       irrep_4/d=-0.0100
       irrep_4/d=0.0100
    
       In this example, 2 irreps are used with 2 displacement amplitudes for each.  

   [files: mol_vibr.f]
4. longer file names (char*40) allowed
   [change.f, add_rem.f, input_tetr.f, applica.f, tetrag1.inc]
5. script collect_forces modified appropriately: several amplitudes are
   allowed. The file F_#.mat will contain all the data, its format is slightly
   different as well as shown in this H2O example for the irrep=1 for 4 amplitudes:

# amplitudes  4
#  1 1 irrep_1/d=-0.01000
    1    0.00000    0.00000    4.93278 0.00000000000000000000E+00 0.00000000000000000000E+00 0.33343599999999997685E+00
    2    0.76138    0.00000    0.53347 -.14358899999999998442E+00 0.00000000000000000000E+00 -.16671799999999999286E+00
    3    4.23862    0.00000    0.53347 0.14358899999999998442E+00 0.00000000000000000000E+00 -.16671799999999999286E+00
#  1 2 irrep_1/d=0.01000
    1    0.00000    0.00000    4.93456 0.00000000000000000000E+00 0.00000000000000000000E+00 -.33068700000000004202E+00
    2    0.76138    0.00000    0.51938 0.15691199999999998482E+00 0.00000000000000000000E+00 0.16534299999999999997E+00
    3    4.23862    0.00000    0.51938 -.15691199999999998482E+00 0.00000000000000000000E+00 0.16534299999999999997E+00
#  1 3 irrep_1/d=-0.01500
    1    0.00000    0.00000    4.93234 0.00000000000000000000E+00 0.00000000000000000000E+00 0.49668099999999997251E+00
    2    0.76138    0.00000    0.53699 -.21452499999999998792E+00 0.00000000000000000000E+00 -.24834000000000000518E+00
    3    4.23862    0.00000    0.53699 0.21452499999999998792E+00 0.00000000000000000000E+00 -.24834000000000000518E+00
#  1 4 irrep_1/d=0.01500
    1    0.00000    0.00000    4.93500 0.00000000000000000000E+00 0.00000000000000000000E+00 -.49980000000000002202E+00
    2    0.76138    0.00000    0.51586 0.23482199999999999739E+00 0.00000000000000000000E+00 0.24990000000000001101E+00
    3    4.23862    0.00000    0.51586 -.23482199999999999739E+00 0.00000000000000000000E+00 0.24990000000000001101E+00
#  2 1 irrep_1/d=-0.01000
    1    0.00000    0.00000    4.93367 0.00000000000000000000E+00 0.00000000000000000000E+00 -.27220499999999994145E+00
    2    0.75431    0.00000    0.52643 0.27747000000000001662E+00 0.00000000000000000000E+00 0.13610299999999999620E+00
    3    4.24569    0.00000    0.52643 -.27747000000000001662E+00 0.00000000000000000000E+00 0.13610299999999999620E+00
#  2 2 irrep_1/d=0.01000
    1    0.00000    0.00000    4.93367 0.00000000000000000000E+00 0.00000000000000000000E+00 0.26410000000000000142E+00
    2    0.76845    0.00000    0.52643 -.26221699999999996677E+00 0.00000000000000000000E+00 -.13205000000000000071E+00
    3    4.23155    0.00000    0.52643 0.26221699999999996677E+00 0.00000000000000000000E+00 -.13205000000000000071E+00
#  2 3 irrep_1/d=-0.01500
    1    0.00000    0.00000    4.93367 0.00000000000000000000E+00 0.00000000000000000000E+00 -.41542399999999997106E+00
    2    0.75077    0.00000    0.52643 0.41782799999999999940E+00 0.00000000000000000000E+00 0.20771199999999998553E+00
    3    4.24923    0.00000    0.52643 -.41782799999999999940E+00 0.00000000000000000000E+00 0.20771199999999998553E+00
#  2 4 irrep_1/d=0.01500
    1    0.00000    0.00000    4.93367 0.00000000000000000000E+00 0.00000000000000000000E+00 0.38852700000000002233E+00
    2    0.77199    0.00000    0.52643 -.39158700000000003171E+00 0.00000000000000000000E+00 -.19426299999999997680E+00
    3    4.22801    0.00000    0.52643 0.39158700000000003171E+00 0.00000000000000000000E+00 -.19426299999999997680E+00
# end 

   The first line gives the number of amplitudes used for each vector. Then
   each block starts from the heading line, e.g.

#  1 1 irrep_1/d=-0.01000

   that gives: vector number, amplitude number, directory for this irrep and
   the amplitude.

6. correspondingly, the new format F_#.mat file is read in in the routine
   read_F_matrix(). Depending on the number of amplitudes used (1,2 or 4),
   different expressions are used for the calculation of the Hessian matrix:
   (a) if 1, then it is correct to the 1st order
   (a) if 2, then it is correct to the 2nd order
   (a) if 4, then it is correct to the 4nd order

version 3.53  15.11.04
^^^^^^^^^^^^

1. cosmetic changes in the LATTICE menu.
   [file: lattice.f]
2. cosmetic change in routine mol_vibr
   [file: mol_vibr.f]
3. position of the molecule in the centre of mass is calculated with real
   (instead of unit) masses for option V1.
   [file: mol_vibr.f]
4. a bug in V2 option: since the matrix G_mat was destroyed after calling
   diagonalisation (option Ei), a repeated call of Ei gave different results.
   Corrected.
   [file: solve_vibr.f]
5. options V1 and V2: when writing movie.xyz file for a movie of the given 
   vibrational mode, the whole 360 degrees period is written which is more
   convenient for previewing.
   [files@ mol_vibr.f, eig_vibr.f]
6. option V2: file tmp.tmp is to be deleted after used by gnuplot.
   [file: eig_vibr.f]
7. a bug with label 33 corrected.
   [file: mol_vibr.f]
8. comments starting from ## can be put arbitrarily in F_?.mat and E_?.mat files
   (e.g. the value of amplitude used for distorting geometry)
   [file: eig_vibr.f]
9. option V2: a number of bugs in routine read_F_matrix() corrected. 
   [file: eig_vibr.f]
10. to facilitate the V2 option with the algorithm Force, a script 
                            collect_forces 
   and a separate routine (used by the script)
                            get_force 
   were added. These are to be used to create automatically F_#.mat files out
   of the corresponding OUTCAR files obtained using VASP. You will need to
   edit the script (and probably the file get_force.f) if another DFT code is
   used. Note that get_force is compiled at the same time as tetr.

       To make this work, follow this procedure:
   (a) in the V1 menu, choose irrep #; create a directory irrep_#;
   (b) create a geometry file (as described in detail above) for the given
       value of the amplitude (option Ds) and the 1st generalised coordinate
       (i.e. use the diagonal choice '1 1' in option Vn for the pair of vectors);
   (c) run the DFT code and move the OUTCAR to OUTCAR_1_ampl, where ampl is
       the value of the amplitude used; move the file to a directory irrep_#.
   (d) repeat for all vectors associated with the given irrep. For instance,
       if ampl=0.01 and there are 3 vectors in the given irrep=1, you should now 
       have in the directory irrep_1 three files OUTCAR_1_0.01, OUTCAR_2_0.01
       and OUTCAR_3_0.01.
   (e) run the script collect_forces. It will create the file F_1.mat in the
       directory irrep_1. Make sure that the amplitude is not very large so
       that the difference in non-diagonal elements of the force constant matrix
       obtained using different generalised coordinates is not significant (a
       warning will be given).
   (f) repeat for any other irrep.

11. The routine find_string() was modified in accordance with Intel compiler
    requirements. As a result, there is a separate routine for each length of
    the string. 
    [files: get_forces.f, input_tetr.f, tools_strings.f]
12. Ooption V2: when the forces are read in from F_#.mat file, available
    elements before symmetrisation are shown even if not all OUTCAR files are
    available, so that the complete force constant matrix (FCM) cannot be
    constructed. This is useful for finding an appropriate distortion
    displacement in V1, as it allows to check if the available part the FCM is
    symmetircal or not. 

version 3.52  8.11.04
^^^^^^^^^^^^

1. bug in the routine [specify_angle] fixed: it did not set the variable
   'order' correctly if only 1 angle is chosen and also if the default order
   is accepted in the case of two or three rotations.
   [file: change.f]
2. fixing of orbits in V1 menu (option Sa) are shown by either Y or N (instead
   of T or F).
   [file: mol_vibr.f]
3. known problem: V1 gives atomic coordinates in a different order WITHOUT
   changing their relaxation flags. This should not be considered a big
   problem since relaxation is not required anyway when calculating phonons.
4. a variable iErr was removed from the call of DirLatt (not used).
   [file: lattice.f]

version 3.51  21.10.04
^^^^^^^^^^^^

1. bug fixes concerning fixed orbits: W_all matrix was not initialised for
   these orbits.
   [Files: di_irrep.f, mol_vibr.f]
2. reference to original atomic numbers (as in the original geometry file) is
   made in all tables in options V1 and V2 as 'old#'
  [Files: symgenv.inc, mol_vibr.f, do_irrep.f, do_cond.f, eig_vibr.f ]
3. option Sx added to V1,V2 menus to 'show'/'not show' fixed atoms when 
   displaying generalised coordinates or normal modes.
  [Files: mol_vibr.f, eig_vibr.f,solve_vibr.f]
4. a more geneal format for the files F_#.mat added (algorithm Forces):
   forces should be the last three columns in each block. This is the case
   in most DFT codes in which forces are shown. With this option in place, one
   can simply cut and paste the lines with forces from e.g. the VASP or SIESTA
   output files into the appropriate F_#.mat file.
5. atomic masses are entered automatically (at least for the first half of the
   Table) from mendeleev.inc; consequently, some changes in V1 were required
   and in some other routines where atomic masses were asked. 
   [Files: change.f, cluster.f, mol_vibr.f, tetrag1.f, do_cond.f, do_irrep.f]
6. Input atomic masses (option Am in the menu V1) is moved down the menu to
   the 'general settings' if masses are known; otherwise, it stays as the
   first option.
7. check on the boundary of W_all with respect to the number of vectors added.
   [Files: do_irrep.f, eig_vibr.f]
8. Errors in the Makefile (missing dependencies) corrected.
9. 2 bugs in restore_geometry
  [File: change.f]

20.10.2004 version 3.5
^^^^^^^^^^

1. upper boundary (N0KD) for number of species introduced.
   [Files affected: most.]
2. group info has been taken from symgenv.cmn to pgroup.inc;
   symgenv.cmn renamed into symgenv.inc.
   [Files affected: most.]
3. options Sb and S of the main menu changed their position
   [File: tetrag1.f]
4. MAJOR DEVELOPMENT: options V1 and V2 of the main menu (vibrations) has been
   completely rewritten. New features: 
     - allows fixing atoms in orbits
     - interface for previewing of transformations and normal coordinates
     - movie xyz files for viewing vibrations and generalised coordinates
     - force constant matrix in terms of generalised coordinates (linear 
       combinations of displacements) is calculated either:
       (a) algorithm Energy: by interpolating several total energies with 
           a porabola (more expensive to use), or
       (b) algorithm Force: by using atomic forces (less expensive).

 HOW IT WORKS
==============

Algorithm Energy:
^^^^^^^^^^^^^^^^^
V1. This option allows construction of symmetry adapted displacements (linear
combinations). This is done for each orbit separately. [Orbits are sets of
atoms in the system which transform into each other by group operations (only
point group symmetry is actually implemented). The whole system thus will
break down into non-overlapping sets of orbits.] Note that some orbits 
contribute only to particular irreducible representations of the group. 

If some orbits are fixed (e.g. outer orbits of a cluster or molecule), then the
total number of degrees of freedom is equal to 3*N, where N is the number of
atoms in other orbits. In this case 3 translations and 3 rotations are not
removed. If, however, no orbits are fixed (e.g. a molecule), then one has to
remove translations and rotations, so that total number of degrees of freedom
is 3*N-5 (linear molecule) or 3*N-6 (non-linear), where N is the total number
of atoms in the molecule. This is done by orthogonalising the symmetry adapted
displacements to conditions corresponding to 3 translations and either 2
(linear) or 3 (non-linear) rotations. This way the whole set of generalised
coordinates is constructed for each irreducible representation (irreps). Note
that the kinetic energy is terms of generalised velocities contains an
additional matrix, which is called G-matrix. It serves as the mass for these
corrdinates and is a square matrix.

The basic idea is that the total vibrational energy of the system is a
quadratic form with respect to the generalised coordinates (GC) and the
corresponding force-constant matrix (FCM) is diagonal with respect to different
irreps and their row indices. That is why it is advantageos to use the group 
theory here, as it significantly reduces the cost, especially if there is a lot
of symmetry elements.

In order to calculate elements of the FCM,
one can displace atoms in such a way as to excite a particular GC. This
allows calculation of the diagonal elements of the force constant matrix with
respect to this GC. However, some irreps may contain more than one GC. In this
case there will also be non-diagonal elements to be determined, e.g. (i,j). 
This is done by exciting two GC's, namely i and j. Therefore, the main
objective of V1 is to construct such atomic distortions which excite either
one or two particular GC's. 

First, you should enter atomic masses (option Am) and then decide if there
are any fixed orbits (option Fx). After that you do the actual calculation
(option Ir). Then all the irreps for which GC's exist, will be displayed by
numbers. The menu will show the irrep number, name and the number of GC's it
contributes to. Some irreps may not contribute at all. Choose one irrep. The results
can be previewed either by Go (symmetry adapted displacements before
orthogonalising to traslational/rotational constraints) or by Sa (after
orthogonalisation if required) which gives the final GC's. Save the G-matrix 
(option Gw) and the final (orthogonal) transformation matrix (option Sw) which
relates the GC's with actual atomic displacements. 

If in the given irrep there is only one GC, choose its amplitude (the actual
magnitude of the GC, in A) using the option Ds and then save (option S) the
distorted geometry. As in other main menu options, you can save in various
formats (SIESTA, VASP, xyz, etc.). Use the geometry file to calculate the
total energy (no ionic relaxation!). Then choose another amplitude, save the
geometry and calculate the DFT energy, etc. Remember, that you also know the
energy for the zero amplitude (relaxed geometry). Save the energies in a file
E_#.mat with # being the irrep number. Its structure:

# 1 1 
amplitude1  energy1
amplitude2  energy2
0.0         energy
amplitude3  energy3
....... etc.

# end

The number of lines here is arbitrary between 3 and 10.

If there are more than one GC for the given irrep, then you should repeat the
above procedure as follows:

 (a) separately for each GC, choose equal GC numbers in the option Vn; save the geometry
     file and calculate the energy; repeat for several amplitudes;
 (b) choose two different GC's (i<j) in the Vn option; again, each time save
     the geometry and run the DFT code to get the total energy; repeat for
     several amplitudes. Run for each pair (i,j) with i<j (or j<i).

Energies and amplitudes are saved in a file E_#.mat with the following
structure with # being the irrep number (in the example below only 2 GC's for this irrep
are assumed):

# 1 1 
amplitude1  energy1
amplitude2  energy2
0.0         energy
amplitude3  energy3
......... etc.

# 2 2
amplitude1  energy1
amplitude2  energy2
0.0         energy
amplitude3  energy3
......... etc.

# 1 2 
amplitude1  energy1
amplitude2  energy2
0.0         energy
amplitude3  energy3
......... etc.

# end

Each pair must appear once. The order of pairs is not important. The number
of amplitude-energy lines within each pair is between 3 and 10. Put the line '# end'
at the end of your data.

Repeat for another irrep. You are done. 

Files created: 

   - G_1.mat , G_2.mat, etc. for all irreps which contributes to the
     GC's. Contain elements of the G-matrices.
   - W_1.mat, W_2.mat, etc. - contain elements of the transformation matrices
   - E_1.mat, E_2.mat, etc. - energies and amplitudes for each irrep
   - vibr_info.dat - essential information about the system

V2. Use option FE to enable the Energy algorithm.

The eigenvalue/eigenvector problem which gives final vibartional
frequencies and normal coordinates (linear combination of GC's) is solved here
for each irrep separately. At the beginning, the info from V1 is read in, all
the mentioned above files are found and displayed in the menu against each
irrep which contributes to the GC's. You choose an irrep from the menu and G-
and E-files are read in. If there are no errors, then You are invited to solve
the eigenproblem (option Ei). If successful, new options appear:

   Sv - show eigenvalues/vectors
   Sa - show actual normal modes of vibrations (which are linear combinations
        of GC's) within the given irrep as linear combination of actual alotic
        displacements
   Vs - create a movie xyz-file to display the given normal mode.

Note that if either G- or E-files exist, but were read in with errors, the
corresponding irrep becomes unaccessible. Note also that if an irrep is 2D or 3D, 
then from each solution (eigenvector) one creates 2 or 3 vectors according to other 
rows of the irrep.

Algorithm Force:
^^^^^^^^^^^^^^^^
This algorithm is much cheaper than the previous one as it requires much less
distorted geometries to be created and thus much less DFT runs. Care should be taken, however,
in choosing GC's amplitudes, they should not be too large. 

V1. It works in the same way as above. The main difference is in that you should
create only "diagonal" distortions, i.e. use only equal GC numbers in the Vn option
for each irrep. For each saved geometry run your DFT code (no relalxation!) and put
the atomic forces into a file F_#.mat (# - irrep number). This file should consist of
blocks for each GC entering the given irrep, and the whole file should end with the line

# end

The structure of each block is as follows:

# i ampl
fx1 fy1 fz1
fx2 fy2 fz2
fx3 fy3 fz3
fx4 fy4 fz4
......

where i - GC number, ampl - the value of the GC amplitude used in V1 to create the distorted
geometry, and fx,fy,fz - forces (in eV/A) for all atoms in the system obtained for this geometry;
they should appear in the same order as in the DFT output (which should follow the same order as 
in the input file created by V1). 

For instance, if irrep 3 has 2 GC's, you should create only two distortions by exciting these 
two GC's one after another, and thus run the DFT code only twice. Two sets of forces should then
appear in the file F_3.mat, e.g. as in the example below (5 atoms in the system is assumed):

# 2 0.05
 0.0   0.1  -0.1
-0.1   0.0   0.1
-0.05 -0.05 -0.02
 0.05 -0.05  0.02
-0.05 -0.05  0.02

# 1 0.04
 0.0  -0.1   0.1
 0.1   0.0  -0.1
 0.05  0.05  0.02
 0.03 -0.05  0.01
-0.03  0.04  0.01

# end

The order of blocks is arbitrary.

Repeat this procedure for all irreps suggested by V1. In each case save the transformation 
matrix (option Sw) alongside the G-matrix (option Gw), both are compulsory for this
algorithm.

V2. The Force option is the default and is shown as such by the FE option in the 
menu. You should then find a menu with irreps numbers showing all the files available.
Only those irreps will be shown for which all necessary files are available. The further
actions are similar to the Energy algoritm: choose the irrep, solve the eigenproblem
(option Ei) and then either preview the solutions (option Sv), normal coordinates (option 
Sa) or create a movie.xyz file for a normal mode.

12.9.2004 version 3.5
^^^^^^^^^

1. a bug in change.f (affected also cluster.f) concerning the order of
   rotations which was predefined as around x,y,z (option [R] in change.f and
   [Rt] in cluster.f); to correct, the order of elementary rotations is now to 
   be specified; the coresponding menus changed.
2. option [Hs] added to {addf_rem.f, change.f, cluster.f, lattice.f,
   movce_atoms.f} to be able to disable/enable H atoms to be written to the xyz file
   (affected calls: create_xyz in change.f, dump_xyz in cluster.f, create_film_xyz in add_rem.f,
    write_in_box in add_rem.f)
   Other affected routines: applica.f

14.4.2004 version 3.40
^^^^^^^^^

1. a bug in change.f concerning showing tagged atoms in 'Co' corrected
2. a new option 'Sb' introduced in the main menu for saving an xyz file
   of atoms in a box running across the adjacent cells of the system - 
   useful for visualisation/papers, etc.
   [files: add_rem.f, tetrag1.f]
3. menu option [Co] rewritten
   [files: change.f, lattice.f move_atom.f]

20.01.2004 version 3.39
^^^^^^^^^^
change in cluster.f

1. option mH: negative displacement is allowed as well (was a bug?)

20.01.2004 version 3.38
^^^^^^^^^^
changes in cluster.f

1. a bug in choosing nearest neighbours (nn) is corrected (did not work for
   complex lattices like SiO2)
2. while choosing nn, a shprerical belt of a certain width is allowed;
   this width is now in the settings of the cluster menu (option Nd)
   and thus can now be changed; default = 0.1
3. Cc option: a distance from the 1st atom in the cluster is added to
   the printed table for convenience.

4.11.2003 version 3.37
^^^^^^^^^
changes in lattice.f and change.f

1. lattice.f: a bug is fixed
2. change.f:  a bug is fixed 
3. applica.f: a bug is fixed 
 
3.11.2003 version 3.36
^^^^^^^^^

changes in change.f, applica.f and input_tetr.f

1. applica.f: added species symbols to the vasp CONTCAR file
   on the title line for convenience;
2. input_tetr.f: correspondingly, the title in the vasp input file
   is shown on the screen when it is read in;
2. change.f: added more support for rotation (option [R]). It is
   now possible to choose 3 points (e.g. atoms within the tagged list) and then
   the rotation is calculated so that these atoms are in either of the
   XY, XZ or YZ planes (sub-options Pz, Py and Px, respectively). 
   Correspondingly, if this option is used, the central point for
   the rotation is chosen in the centre of the triangle formed by
   the three points. This is especially convenient if, say, a molecule
   above a surface is to be rotated.

19.6.2003 version 3.35
^^^^^^^^^
changes in change.f and cluster.f: 

1. more general tagging by atoms and by lists of atoms; 
2. corrected some undangerous bugs related to tagging
3. tagging is shown when invoking Cc (cluster) or Co (change) options
   for convenience.

3.06.2003  version 3.34
^^^^^^^^^
1. simple changes in tetrag1.f, input_tetr.f, applica.f
(+ added siesta.inc) to read and save irrelevant info in siesta input
file;

2. when SAVE, this info is then written to the siesta file as well, 
so that the final input file produced can be used straight away
(mind constraints though since the order of atoms in the file may be different:
tetr wants them to be ordered in species!)

3. a bug related to tagging of atoms added from another file (option
[Ad]) in change.f fixed.

4. atoms after move (option [Mv]) and rotate (option [R]) in change.f
   remain tagged if were tagged before moving.

5. when a siesta file is read,  a warning is given that atoms in the
output file may have a different order - in species.

30.5.2003   version 3.33
^^^^^^^^^
1. in change.f: added option [44] in the menu for
   clustering atoms around a given point

2.5.2003   version 3.32
^^^^^^^^
1. in tetrag1.f, option [Cm] in { subroutine compare() } :

   1.1 can compare geometries with atoms chosen using different
       translations (as VASP is notorious doing wrong things with
       geometry!)

   1.2 marks with * atomic displacements larger than thresh=0.1

9.4.2003
^^^^^^^^^

1. general cell -> supercell transformation in change.f

2. in cluster.f:

   2.1 save in name.mol format the current situation

   2.2 read in existing name.mol file
