Record of changes leading up to merge of BSC branch, including initial
re-organization, and mesh-optimization and fdf work.

(From January 19, 2007)

------------------------------------
330 Alberto Garcia	  2011-02-03
Consolidated BSC logs; removed tests, old fdf dir

BSC.CHANGES now contains a complete record of the changes
in the BSC series of branches, since early 2007.

removed:
  Docs/Grid-Work.CHANGES
  Src/fdf.old/
  Tests/h2o_jacobi/
  Tests/load_1/
  Tests/load_on/
  Tests/load_particle/
renamed:
  Docs/KNOWN.ISSUES => Docs/KNOWN.ISSUES.BSC-patch
modified:
  Docs/BSC.CHANGES
  Docs/MERGE.LOG

------------------------------------
329 Alberto Garcia	  2011-02-03
Add KNOWN.ISSUES and MERGE.LOG

To prepare for the merge.

------------------------------------
328 Alberto Garcia	  2011-02-02
Repackage mesh routines

By putting the mesh and meshphi modules in their own files it has been
possible to consolidate most of the classic "*mesh" routines in the
meshsubs.F file. The new BSC functionality is confined to
moremeshsubs.F (distribution-related routines) and the "communication"
modules schecomm, meshcomm, and m_dscfcomm.

removed:
  Src/distriphionmesh.F
  Src/initatommesh.F
  Src/initmesh.F
  Src/phionmesh.F
  Src/setupextmesh.F
added:
  Src/mesh.F
  Src/meshphi.F
renamed:
  Src/dscfcomm.F => Src/m_dscfcomm.F
  Src/meshmatrix.F => Src/meshdscf.F
modified:
  Src/Makefile
  Src/dfscf.f
  Src/dhscf.F
  Src/meshsubs.F
  Src/rhoofd.F
  Src/siesta_end.F
  Src/vmat.F
  Src/m_dscfcomm.F
  Src/meshdscf.F

------------------------------------
327 Alberto Garcia	  2011-01-07
Sync to trunk: intialize pointers; timer call

* Several pointers were used without nullification in routine copyfile
in file moreParallelSubs.F90.

* A "turn-off" call to timer was needed in cdiag in case of early
  termination.

modified:
  Src/cdiag.F
  Src/moreParallelSubs.F90

------------------------------------
326 Alberto Garcia	  2011-01-07
Remove direct writes to debug unit. Remove BSC timing framework

* In the BSC development version, the DEBUG preprocessing directive
controls whether a sort of running commentary of the program is
written to a set of debug files. This framework has been left in place
for now, but some stray direct writes to the debug unit (23 by
default) have been removed in several routines.

* The "tiempo" module and all related fossil calls have been removed.

* Removed the experimental slepc diagonalization routine, which had
  been overlooked in the previous cleaning pass.
 
removed:
  Src/slepc_diagon.F
modified:
  Src/siesta_init.F
  Src/siesta_move.F
  Src/timer.F90



------------------------------------
325 Alberto Garcia	  2010-12-01
Explicitly nullify pointers in several places

During the wholesale conversion of allocatables to
pointers in some routines some of the pointers were
left in an undefined state. The declarations have
been changed to use the f95 " => null()" construct.

Note: This version includes a minimal fixing of
      moremeshsubs. There might be other issues
      involving intent(out) derived types 
      with pointer components

( + removal of fossil walltime.o from Makefile)

modified:
  Src/Makefile
  Src/cgvc.F
  Src/dynamics.f
  Src/grdsam.F
  Src/m_iorho.F
  Src/moremeshsubs.F
  Src/mulliken.F
  Src/zmatrix.F

------------------------------------
324 Alberto Garcia	  2010-12-01
Work around bugs in Intel compilers: FoX generics, k-grid

* Work around a bug in Intel12 compiler in k-grid setup

A dummy internal write is used to re-focus the compiler
treatment of a few integer variables.

modified:
  Src/find_kgrid.F
  Src/kgrid.F
  Src/kgridinit.F

* Avoid use of generics in declarations in FoX format routine

The use of generic functions in declaration statements was confusing
the Fortran compiler (version >= 11). They have been replaced by calls
to the specific versions.

modified:
  Src/FoX/fsys/fox_m_fsys_format.F90

------------------------------------
323 Alberto Garcia	  2010-11-26
Fix setting of applied electric field in parallel

Due to a programming error, the user-specified electric
field was not correctly set in non-master nodes.

Thanks to Alexander Vozny for the bug report.

modified:
  Src/m_efield.F

------------------------------------
322 Alberto Garcia	  2010-11-24
Remove non-finished iterative diagonalization code

The Jacobi-Davidson (including slepc) code has been
removed as it is not ready for merging. A number of
auxiliary files have been deleted.

removed:
  Src/cg.F
  Src/cholesky.F
  Src/deflatedmv.F
  Src/domain_decom.F
  Src/gmres.F
  Src/jacobi_davidson.F
  Src/lenstr.F
  Src/matrixop.F
  Src/mmio.F
  Src/precond.F
  Src/printmatrix.F
  Src/pspltm1.F
modified:
  Src/Makefile
  Src/Sys/atto-pgf95-openmpi.make
  Src/compute_dm.F
  Src/hsparse.F
  Src/initparallel.F
  Src/parallelsubs.F
  Src/siesta_end.F
  Src/siesta_options.F90
  Src/write_subs.F
  Util/Denchar/Src/Makefile

------------------------------------
Start of interim branch bsc-grid+fdf
------------------------------------

------------------------------------
321 Alberto Garcia	  2010-11-24
Write electronic temperature while processing options 

modified:
 Src/siesta_options.F90

------------------------------------
320 Alberto Garcia	  2010-11-23
Timing routine output. Positions of neighbors in BONDS file

* Clarify the output of the timing routine

The timing routine now prints zeros instead of NaNs in the
communications section if the variable MPI_TIMING is not defined, and
an informational note.

modified:
  Src/m_timer.F90

* Modify bonds routine to print real locations of neighbors

In routine bonds (called at the beginning and at the end of the
program) we now print the real location of the neighbor atom in space,
and not, as in earlier versions, the location of the equivalent
representative in the unit cell.

modified:
  Src/bonds.f

------------------------------------
319 Alberto Garcia	  2010-11-17
Fine tuning of Util compilation

Some minor details needed fixing:

- New dependencies when BSC_CELLXC is defined
- "default" targets need to appear before inclusion of arch.make

removed:
  Util/TBTrans/MPI/
modified:
  Src/Makefile
  Util/Contrib/APostnikov/Makefile
  Util/Gen-basis/Makefile
  Util/Optimizer/Makefile

------------------------------------
318 Alberto Garcia	  2010-11-16
Fix compilation of Utils

The major remaining issues were:

- New-style fdf calls

- Proper treatment of "private" copies of fdf, MPI, etc

- The macro __FILE__ expanded to a very long string in the fdf
  routines. A new macro THIS_FILE has been defined instead.

Some issues might still remain. Notably, the dependency lists are very
cumbersome.

removed:
  Util/Denchar/Src/fdf/.dummy_dir
  Util/Gen-basis/fdf/.dummy_directory
  Util/TBTrans/Libs/
  Util/TBTrans/Libs/.dummy_directory
  Util/TBTrans/MPI/.dummy_dir
  Util/VCA/fdf/.dummy_directory
  Util/Vibra/Src/fdf/.dummy_directory
added:
  Util/Denchar/Src/timer_local.f
modified:
  Src/fdf/fdf.F90
  Src/fdf/io_fdf.F90
  Src/fdf/parse.F90
  Util/Denchar/Src/Makefile
  Util/Denchar/Src/denchar.f
  Util/Denchar/Src/local_reinit.f
  Util/Denchar/Src/readpla.f
  Util/Denchar/Src/readsts.f
  Util/Gen-basis/Makefile
  Util/Helpers/Makefile
  Util/TBTrans/Makefile
  Util/TBTrans/m_tbt_options.F90
  Util/TBTrans/mkqgrid.f
  Util/VCA/Makefile
  Util/Vibra/Src/Makefile
  Util/Vibra/Src/fcbuild.f
  Util/Vibra/Src/klines.f
  Util/Vibra/Src/recoor.f
  Util/Vibra/Src/vibrator.f

------------------------------------
317 Alberto Garcia	  2010-11-12
Merge 3.0 fixes: ps reparametrization, getopts, ioncat, atm manual

* Cosmetic fixes in Gen-basis/{ioncat,ionplot.sh}

modified:
  Util/Gen-basis/ioncat.f
  Util/Gen-basis/ionplot.sh

* Fix test in m_getopts

A double if test gives problems with some compilers when
bounds checking is in effect.

modified:
  Src/m_getopts.f90

* Improved grid for re-parametrization of pseudopotentials

When the option Reparametrize.Pseudos is in effect, the program
resamples the pseudopotential data into a new logarithmic grid with
parameters chosen so that the grid-point separation at the typical rcs
for orbitals is small enough (of the order of 0.01 bohr). The previous
choice of parameters resulted in grid-point separations of the order
of 0.005 bohr near the origin, which apparently is not fine enough for
s orbitals, leading to oscillations in the gradient near the origin.

A new set of default parameters has been chosen to provide a finer
grid spacing (1.e-5 bohr) near the origin and 0.01 bohr around r=10
bohr. This results in grids with around 10000 points, which is still
manageable.

( Also, a few extra diagnostic files are produced if the option
  Write.Ion.Plot.Files is in effect, and the .psdump file now
  contains the core charge )

modified:
  Src/atmparams.f
  Src/atom.f
  Src/basis_specs.f
  Src/pseudopotential.f
  Docs/siesta.tex

* Update atom manual

- Include a mention of the "fractional atomic number" capability.

- Update the link to Jose Luis Martins' version of the atom program, and
  the contact information in the README file.

modified:
  Pseudo/atom/Docs/atom.tex
  Pseudo/atom/README

------------------------------------
316 Alberto Garcia	  2010-11-12
Fix import of mpi module in matrixop + new .make files

Use 'mpi_siesta' instead of 'mpi'.

Added new .make files in Src/Sys.

added:
  Src/Sys/atto-pgf95-openmpi.make
  Src/Sys/intel10-openmpi.make
  Src/Sys/intel11-openmpi.make
  Src/Sys/nano-intel10-mvapich.make
  Src/Sys/pgf95-pgimpi.make
modified:
  Src/Sys/nano-intel-mpi.make
  Src/matrixop.F

------------------------------------
315 Alberto Garcia	  2010-11-12
Remove calls to printmemory()

The 'alloc' subsystem no longer calls the 'memory' accounting routine,
so any information printed by 'printmemory' is misleading. The calls
have now been commented out.

modified:
  Src/setup_H0.F
  Src/siesta_end.F
  Src/siesta_forces.F
  Src/siesta_init.F
  Src/siesta_move.F

------------------------------------
314 Alberto Garcia	  2010-10-29
Disabled asynchronous grid communications by default

* The asynchronous code in moremeshsubs.F introduced in revno 301
gives wrong results for the forces in GGA calculations.  This code has
been disabled by default, and should not be used until it is fixed. It
can be enabled by defining

ASYNCHRONOUS_GRID_COMMS

at compile time.

* Fixed a syntax bug in a BSC_CELLXC block in dhscf.F

* Made grdsam into a module

* Added a new test mgc-force, to quickly check forces with GGA

added:
  Tests/mgc-force/
  Tests/mgc-force/makefile
  Tests/mgc-force/mgc-force.fdf
  Tests/mgc-force/mgc-force.pseudos
modified:
  Src/Makefile
  Src/dhscf.F
  Src/final_H_f_stress.F
  Src/grdsam.F
  Src/moremeshsubs.F
  Tests/Makefile


------------------------------------
313 Alberto Garcia	  2010-10-25
Fix fdf- and parse-related bugs in zmatrix processing

There were two significant bugs in the read_zmatrix routine, caused
by the switch to the new parsing framework:

-- Routine fdf_bsearch was attempting to match whole tokens, when
   the intent was simply to find substrings (as in 'mol', 'frac', etc)
   The fix involves the creation of a new routine fdf_substring_search
   which uses the 'index' intrinsic. An unwelcome side effect is that
   the zmatrix keywords *have* to be written in lowercase.

-- The matching mechanism for token class ('i', 'r', 'n', etc) was not
   powerful enough to represent mixtures of real numbers and symbols, as
   it is needed in a typical line of the zmatrix format. Thus new 'virtual'
   token codes have been introduced:

   'x' matches anything
   's' matches i, r, or n
   'j' matches i or n

   These join 'v', which already stood for 'integer or real' ('value').

Other minor bugs involved moving the block pointer when printing the
line (now done printing pline%line directly) and not using '.not.' in 
a few logical tests.

modified:
  Src/fdf/fdf.F90
  Src/fdf/parse.F90
  Src/zmatrix.F

------------------------------------
312 Alberto Garcia	  2010-10-22
Clarify file-name conventions in new fdf in reinit

Change the name of the process-specific scratch files to
a more meaningful 'fdf_input.XXX'.

Note that these files could be made obsolete by a proper
serialization-broadcast-deserialization of the new fdf data structure.

------------------------------------
311 Alberto Garcia	  2010-10-21
Fixes: optical, pulay, cosmetics. BS energy, HSX file (--> trunk 361)

*  Improved documentation of VDW-KBM functional
  
  (J. Soler)
  
  modified:
    Docs/siesta.tex
    Src/SiestaXC/atomxc.F90
    Src/SiestaXC/cellxc.F90
    Src/SiestaXC/siestaxc.F90
    Src/SiestaXC/vdwxc.F90
    Src/SiestaXC/xcmod.f90

*  (Admin) Incorporate logs of recent patches from 3.0 branch
  
  The siesta-3.0 branch can be considered as a sort of "bug-fix" branch
  for "trunk". Hence, periodic merges are needed. This merges
  have up to now been done in a "cherry-picking" manner, since 3.0
  contains other material that is not supposed to go into trunk. This
  has the unfortunate feature that the patch logs are not incorporated
  into the trunk, and a "bzr missing" command will keep reporting
  spurious differences.
  
  The logs of all the recently applied patches, corresponding to 3.0
  patches up to 3.0-rc2, have now been incorporated by doing a normal
  merge followed by "bzr revert ." to remove all file changes (changes
  already incorporated in local revnos from 349 up to this one).  This
  has the effect of marking those patches in siesta-3.0 as "known" to
  this branch, and will simplify the porting of future patches from the
  3.0 branch. Note that the patch logs do not appear in "bzr log" unless
  the "-n0" option is used. This is desirable, as a casual user might
  find the output confusing.
  
  Note that revno 355 in trunk already incorporated (without
  explicit mention in the commit log, due to an oversight) the relevant
  3.0 patches up to 3.0-rc1.
  
*  Fixes for portability (pulay, MD rewind, reshape)
  
  * In m_pulay, some compilers evaluated both sub-clauses of an "and"
    expression, even if the first was .false.. This led to a division by
    zero in a mod operation. The expression has been replaced by more
    robust code.
  
  * The MD file repositioning code in iomd.f gave problems in some
    systems. It has been removed, and substituted by an explicit
    'position="append"' clause in the open statement.
  
  * In SiestaXC/mesh3d.F90, work around a gfortran bug in the reshape
    intrinsic by specifying a zero lower bound. The bug only appears
    if bounds checking is in effect.
  
  modified:
   Src/m_pulay.F90
   Src/iomd.f
   Src/SiestaXC/mesh3d.F90

*  Cosmetic fixes (larger fields in atm files, vibra manual)
  
  * Use larger output fields for atm diagnostic files
  
  The atm program generates, among others, the files FOURIER_QMAX and
  ECONF_DIFFS, which contain information useful for optimization
  runs. The output fields were quite tight and sometimes
  overflowed. They have beeen made larger.
  
  modified:
    Pseudo/atom/prdiff.f
    Pseudo/atom/wrapup.f
  
  * Clarify the meaning of the supercell options in the Vibra manual
  
  New wording to make it clear that the supercell options refer
  to the number of augmentation shells around the unit cell.
  
  modified:
    Util/Vibra/Docs/vibra.tex

*  Compute and print band-structure energy. Updates to Util/COOP/mprop
  
  * The band-structure energy Ebs = Tr(DM*H) is now computed at every 
    iteration and printed at the beginning and end of the SCF cycle, both
    in the output file and in the CML file. The calculation is done in  
    compute_dm, so DM is the "output DM" from the diagonalization of H.
  
  * The mprop program has been updated to output the integrated
    band-structure energy as a function of energy as a third column in
    the integrated-dos file. The " -n " option has been documented.
  
  * Creation of Util/COOP/Docs, and addition of some notes on the units
    and meaning of the COOP and COHP curves.
  
  added:
    Util/COOP/Docs/
    Util/COOP/Docs/UnitsAndMeaningOfCurves.txt
    Util/COOP/Tests/README
  modified:
    Src/Makefile
    Src/compute_dm.F
    Src/m_energies.F90
    Src/write_subs.F
    Util/COOP/README
    Util/COOP/main_vars.f90
    Util/COOP/mprop.f90
    Util/COOP/subs.f90

*  Make the HSX format the default for H,S files
  
  The old HS format was highly inefficient, as each piece of data was
  written to its own record. In addition, it only contained information
  about the inter-orbital vectors Xij if k-points were used in the
  calculation.
  
  The new HSX file format was introduced at the time of the first
  COOP/COHP implementation. It is more tightly packed, and the real
  arrays (H, S, and Xij) are written in single-precision.
  
  The HSX format is now the default in Siesta (TranSiesta has its own
  format).
  
  The programs hsx2hs and hs2hsx in Util/HSX are provided to facilitate
  the transition. Note however that an HS file written by Siesta during
  a Gamma-only calculation will not contain information about the
  inter-orbital vectors Xij, and hs2hsx will refuse to create an HSX
  file from it.
  
  See Util/HSX/README for more details.
  
  The file iohs.F has been moved to Util/HSX from the main source
  directory.
  
  added:
    Util/HSX/hs2hsx.f90
    Util/HSX/hsx2hs.f90
    Util/HSX/makefile
  renamed:
    Src/iohs.F => Util/HSX/iohs.F
  modified:
    Docs/siesta.tex
    Src/Makefile
    Src/setup_hamiltonian.F
    Util/HSX/README
    Util/HSX/hsx_m.f90

*  Hook to output the initial charge density
  
  If the fdf variable SaveInitialChargeDensity is "true", the program
  generates a RHO_INIT (and a RhoInit.grid.nc file if netCDF is compiled
  in) containing the charge density used to start the first
  self-consistency step, and it stops. Note that if an initial density
  matrix (DM file) is used, it is not normalized. This is useful to
  generate the charge density associated to "partial" DMs.
  
  modified:
    Docs/siesta.tex
    Src/dhscf.F
    Src/setup_hamiltonian.F
    Src/siesta_options.F90

*  Fixes and new functionality in Pulay mixing
  
  * The "kick" functionality intended to "shake" periodically the Pulay
  mixing procedure was incorrectly implemented. This has now been fixed,
  with the added feature that the Pulay history is completely reset
  after a kick.
  
  * Additionally, support has been added to specify whether the first
  density-matrix residual of the SCF cycle and the first residual after
  a kick are included in the Pulay history. It can be argued that in
  these cases the "output" DM might be significantly different from the
  "input" DM. To preserve backwards compatibility, these residuals are
  kept in the Pulay history unless the fdf variable
  
        DM.Pulay.Avoid.First.After.Kick
  
  is set to "true" in the input file.
  
  * The above changes have forced a temporary disabling of the "Pulay on
    file" feature, which will be re-implemented in a form that works
    well in parallel.
  
  * Updated the manual.
  
  (A. Garcia)
  
  renamed:
    Src/m_pulay.F => Src/m_pulay.F90
  modified:
    Src/mixer.F
    Src/siesta_options.F90
    Src/m_pulay.F90
    Docs/siesta.tex

*  Fixes and improvements in the optical spectra code
  
  * Fixed a bug in optical.F: the call to subroutine kgridinit nwas
    causing problems and providing results that were not compatible any
    longer with those of subroutine kgrid.
  
  * Modified call to subroutine transition_rate: wmin and wmax passed to
    subroutine so that only the relevant transition probabilities are
    explicitly calculated.
  
  * Added a new test (Tests/si-optical) to exercise the optical code.
  
  (Daniel Sanchez Portal)
  
  added:
    Tests/Reference-xml/si-optical.xml
    Tests/Reference/si-optical.out
    Tests/si-optical/
    Tests/si-optical/makefile
    Tests/si-optical/si-optical.fdf
    Tests/si-optical/si-optical.pseudos
  modified:
    Docs/CHANGES
    Src/optical.F
    Src/transition_rate.F


------------------------------------
310 Alberto Garcia	  2010-10-20
Updates and fixes to the TranSiesta/tbtrans code (--> trunk-352)
  
  This patch includes bug fixes (in TranSiesta and tbtrans), a cleanup
  involving removal of dead code, proper declarations of variables, and
  a new prototype test framework for TranSiesta and tbtrans.
  
  1. Fixed the issues related to the density matrix in a TS run, due to the
  changes in new_dm.F
    
  * The new module m_ts_iodm.F is the equivalent of m_iodm.F, created to
  handle .TSDE files. These, are just like .DM files but where the Escf
  sparse matrix and the Fermi Energy are written at the end of the
  file. The makefile was modified in order to include this module.
  
  * The new_dm module now has a cleaner Transiesta related structure.
  The possibility of doing a "continuation run" (where a .TSDE file is
  read and the run starts with a TS calculated density matrix), is
  handled by calling the routine read_dynamic_ts_dm.  Since Transiesta
  also stores and reads Escf, the variable EDM_tmp has been created and
  is used in the same way as D_tmp.  The routine change_sparsity is also
  used for Escf. But these parts of the code have not been tested yet,
  since it would require a change in the sparsity., by atomic
  rearrangements.
    
  
  added:
    Src/m_ts_iodm.F
  modified:
    Src/Makefile
    Src/new_dm.F
  
  
  2. Changed the way mixH or mixDM are internally handled. Added a
  global_vars module.
  
  * Created the module m_ts_global_vars.f90 that contains the TS
  variables that are accessed in different parts of the code and are not
  passed as dummy arguments.
  
  * Considerable changes were made in the way the possibility of mixing
  either the density matrix or the hamiltonian is handled internally.
  The VIn and VOut pointers are still used, but now, instead of
  allocating some memory and copying the values of Dscf (H) to them,
  they directly point to either the Dscf and Dold matrices OR to H and
  HOld. The latter vector is allocated only whe mixH=.true., and this
  implies that in this case more memory will be required since Dold is
  also allocated because it is used in other parts of the code.  In any
  case, this leads to a smaller amount of allocated memory. The coding
  is clearer also, specially at the siesta_forces routine.
  
  
  added:
    Src/m_ts_global_vars.f90
  modified:
    Src/Makefile
    Src/compute_dm.F
    Src/dhscf.F
    Src/m_ts_iodm.F
    Src/m_ts_options.F90
    Src/mixer.F
    Src/new_dm.F
    Src/scfconvergence_test.F
    Src/setup_hamiltonian.F
    Src/siesta_forces.F
    Src/state_init.F
    Src/write_subs.F
  
  3. Cleaning of m_ts modules; set grid variables to be defined with
  grid_p; and smaller changes.
  
  * Removed unused variables and dummy arguments (all m_ts modules).
  Also specified what is used from each module with the idiom "use
  MODULE, only:"
  
  * For the TSVHFix and TSvoltage2 subroutines (m_ts_in_siesta.F90
  module), fixed the precision of the "v" variable (real space
  potential) to be grid_p.
  
  * The following cosmetic declaration changes were made:
  
  real*8 --> real(dp)
  complex*16 --> complex(dp)
  double precision --> real(dp)
  
  where "dp" comes from the precision module.
  
  * IOnode was incorrectly set to be node=1, now it is node=0
    (m_ts_in_siesta.F)
  
  * Removed the initH variable from several routines. (new_dm,
  scfconvergence_test, setup_hamiltonian,siesta_forces)
    
    
  modified:
    Src/compute_dm.F
    Src/m_ts_contour.F
    Src/m_ts_electrode.F90
    Src/m_ts_in_siesta.F
    Src/m_ts_io.F90
    Src/m_ts_options.F90
    Src/m_ts_scattering.F
    Src/new_dm.F
    Src/scfconvergence_test.F
    Src/setup_hamiltonian.F
    Src/siesta_forces.F
  
  4. Assortment of changes/fixes in TBTrans.
  
  * The original version of TBTrans (by M. Brandbyge) was not
  parallelized.  Some of the original properties computed by tbtrans
  (the transmission function and the pdos) have been "ported" to work
  also in the parallelized version of the code, but some have not. Those
  who have not, have been, for now, deleted (atompdos, coop and NetCDF
  related things).
  
  * The transmission function is now multiplied by two in the
  case of non spin-polarized calculations. As a consequence, the
  computed current is multiplied too.
  
  * The printed value of the pdos (averaged over all the k-points), when 
  running in parallel with more than one node, was not correct: only the values 
  coming from the node=0 were being printed. This has been fixed.
  
  * Some smaller changes were done on the way the results are written in the output 
  files (e.g. including blank lines in between values for each k-point, so that 
  the file can be directly plotted with xmgrace).  Also changed the name of the 
  routine "Tsiokp" (m_tbt_kpoints.F90) to "get_kp_on_node" since it represents 
  better what it really does.
  
  removed:
    Util/TBTrans/atompdos.F
    Util/TBTrans/coop.f
    Util/TBTrans/OutputRegionData.F
    Util/TBTrans/OutputRegionData.NoLowdin.F
    Util/TBTrans/netcdfwrite.F
  modified:
    Util/TBTrans/Makefile
    Util/TBTrans/m_tbt_gf.F90
    Util/TBTrans/m_tbt_kpts.F90
    Util/TBTrans/m_tbt_options.F90
    Util/TBTrans/tbtrans.F
  
  5. Created a test directory (ts_fast) to test TranSIESTA and
  TBTrans. (F.D.Novaes/A.Garcia)
  
  * An automatic test for transiesta and tbtrans can be run by going to 
  the $OBJDIR/Tests directory, and typing:
  
    make ts
  
  and to clean:
  
    make clean_ts
  
  For now, only the tests contained in the ts_fast directory will be
  executed, and more tests with similar structure will be added in the
  near future.  The script first runs the electrode calculation, then
  the scattering region calculation and finally tbtrans. If during any
  of these steps there is an error message sent to stderr, the script
  will stop and the following step will not start. The error message is
  printed to an output file (err_elec.out or err_scat.out or
  err_tbt.out). It only creates the "completed" file if it reaches the
  end.
  
  Parallel compilations can be tested by changing to the ts_fast directory 
  and (for example) typing:
   
    make TS="/opt/openmpi.gcc.gfortran/bin/mpirun -np 2 ../../../transiesta"
  
  By default, tbtrans will be (re)compiled using the arch.make located
  in the $OBJDIR.  To use an already compiled version of tbtrans (again,
  inside the ts_fast directory) type:
    
    make TBT=/some/path/to/tbtrans
  
  NOTE: Since the compilation of tbtrans is automatic and unattended,
  you will need to specify in your arch.make the linear algebra libraries
  needed for tbtrans in your system. For example:
  
    TBTRANS_LINALG=linalg.a # Or maybe only: zgeev_lapack.a zgesv_lapack.a
  
  * The functionality for the TS tests is kept in the new file scrip_ts.mk.
  
  added:
    Tests/script_ts.mk
    Tests/ts_fast/
    Tests/ts_fast/H.psf
    Tests/ts_fast/elec.fast.fdf
    Tests/ts_fast/makefile
    Tests/ts_fast/scat.fast.fdf
    Tests/ts_fast/script.sh
  modified:
    Tests/Makefile

------------------------------------
309 Alberto Garcia	  2010-10-20
Assorted fixes: cxa in InitAtomMesh, target stress, ...  (--> trunk-351)

* Fix for out-of-box atoms in meshsubs
  
  In InitAtomMesh, during the calculation of the relative position of an
  atom with respect to the grid, make sure we consider the equivalent
  position inside the cell, even if the atom is outside.
  
  (Possible problem detected by P. Ordejon, fixed by J. Soler)
  
  modified:
    Src/initatommesh.F

* Port several small patches from 3.0 branch up to 3.0-rc2
  
  * Fix initialization of target_stress in some cell-only relaxations
    
  When using the RelaxCellOnly option in tandem with Broyden relaxation,
  the target stress was not properly initialized.
  
  (Thanks to Marcos Verissimo Alves for pointing out the bug and fix)
  
    modified:
      Src/cell_broyden_optim.F
  
  * Print value of dipole if applying correcting field
    
  If the SlabDipoleCorrection option is active, print the computed
  value of the total system dipole at every iteration, to help
  diagnose possible problems.
  
  Added note in the manual warning about the use of non-corrected
  density matrices with this option.
    
    modified:
      Src/Makefile
      Src/dhscf.F
      Docs/siesta.tex
      Src/m_efield.F
  
  * Correction of error in siesta.tex (as discovered by J. Junquera)
  
  The FDF labels DM.Energy.Tolerance and DM.Harris.Tolerance
  were wrongly stated as "real" instead of "real energy", and their
  default value stated with no units when its units are eV.
  
    modified:
      Docs/siesta.tex

------------------------------------
308 Alberto Garcia	  2010-10-20
Tentative fix for DM reuse bug (--> trunk-349)

In some cases the re-use of the DM after a geometry change led to
large values of ddmax and instabilities in SCF convergence. The
tentative cause was the re-allocation of Dscf right after the call to
hsparse for the new geometry, and before new_dm, combined with a
"sparsity pattern change" in-place. When the re-allocation is deferred
to new_dm, and the plain "change_sparsity" routine is used, the
problem seems to disappear. 

Thanks to Oswaldo Dieguez for his sleuthing work.

More testing is needed to close the bug definitively.
  
Modified:
  Src/Makefile
  Src/new_dm.F
  Src/state_init.F

------------------------------------
307 Alberto Garcia	  2010-10-20
New FoX version, new vdw symbols, assorted fixes (--> trunk-348)

*  Use DEBUG_XC preprocessor symbol to wrap SiestaXC debugging (J. Gale)
  
   * Comments wrapped by ! DEBUG in several SiestaXC routines (and in
     related sections of siesta_init and siesta_end) have been replaced
     by #ifdef DEBUG_XC ... #endif so that the writing of debugging files
     can be turned off easily at compile time.
  
     Note that this has forced the change in file extension of a few
     files in Src/SiestaXC, with concommitant changes in the makefiles.
  
  renamed:
    Src/SiestaXC/atomxc.f90 => Src/SiestaXC/atomxc.F90
    Src/SiestaXC/cellxc.f90 => Src/SiestaXC/cellxc.F90
    Src/SiestaXC/fft3d.f90 => Src/SiestaXC/fft3d.F90
    Src/SiestaXC/fftr.f90 => Src/SiestaXC/fftr.F90
    Src/SiestaXC/siestaxc.f90 => Src/SiestaXC/siestaxc.F90
    Src/SiestaXC/vdwxc.f90 => Src/SiestaXC/vdwxc.F90
  modified:
    Src/SiestaXC/lib-arch.make
    Src/SiestaXC/lib-makefile
    Src/SiestaXC/makefile
    Src/SiestaXC/mesh3d.F90
    Src/siesta_end.F
    Src/siesta_init.F
    Src/SiestaXC/atomxc.F90
    Src/SiestaXC/cellxc.F90
    Src/SiestaXC/fft3d.F90
    Src/SiestaXC/fftr.F90
    Src/SiestaXC/siestaxc.F90
    Src/SiestaXC/vdwxc.F90

*  Make sure that units are closed with io_close (J. Gale)
  
   * 'Close' replaced by call to 'io_close' in several routines to
     prevent luns overload.
  
   * Unused declarations of io_assign and io_close removed from diagon.F
     and ksv.f
  
   (Julian Gale)
  
   modified:
     Src/diagon.F
     Src/ksv.f
     Src/m_timer.F90
     Src/moreParallelSubs.F90
     Src/write_orb_indx.f90

*  Support for LMKLL and KBM vdW functionals in ATOM (A. Garcia)
  
   The pseudopotential generation program now accepts the "vl" xc code to
   request the Lee et al. (LMKLL) version of the vdW functional
   (arXiv:1003.5255v1 (2010)), and the "vk" xc code for the vdW
   parametrization of Klimes et al. (KBM) (JPCM 22, 022201 (2009)).
  
   The id strings in .xml pseudo files are, respectively,
   'Lee-et-al--LMKLL', and 'Klimes-et-al--KBM'. For consistency, the id
   string for the Dion functional has been extended to
   'Dion-et-al--DRSLL'
  
   The ATOM manual has been updated, and the version number set to
   3.3.1.
  
   Obsolete xc routines (pre-SiestaXC) have been removed from the
   Pseudo/atom directory.
  
  removed:
    Pseudo/atom/blypxc.f
    Pseudo/atom/ggaxc.f
    Pseudo/atom/ldaxc.f
    Pseudo/atom/pw92xc.f
    Pseudo/atom/pzxc.f
    Pseudo/atom/revpbexc.f
    Pseudo/atom/rpbexc.f
  modified:
    Docs/CHANGES
    Pseudo/atom/Docs/atom.tex
    Pseudo/atom/Makefile
    Pseudo/atom/pseudoXML.f
    Pseudo/atom/velect.f
    version.info

*  Updated makefile dependencies (J. M. Soler)
    
  modified:
    Src/Makefile
    Src/SiestaXC/makefile

*  Added parametrization of Klimes et al for vdW-DF (J. M. Soler)
    
  modified:
      Docs/siesta.tex                  ! Added VDW/KBM
      Src/SiestaXC/Testers/test1.f90   ! Call to B88 GGA exchange
      Src/SiestaXC/atomxc.f90          ! Added VDW/KBM comment
      Src/SiestaXC/cellxc.f90          ! Added VDW/KBM comment
      Src/SiestaXC/ggaxc.f             ! Added Becke-88 exchange routine
      Src/SiestaXC/siestaxc.f90        ! Added VDW/KBM comment
      Src/SiestaXC/vdwxc.f90           ! Call to B88 exchange
      Src/SiestaXC/xcmod.f90           ! Call to vdw_set_author for KBM

*  Documentation completed on LMKLL flavour of vdW-DF (J. M. Soler)
    
  modified:
    Docs/siesta.tex
    Src/SiestaXC/siestaxc.f90
    Src/SiestaXC/vdwxc.f90

*  A bug corrected in testers (J. M. Soler)
    
  modified:
      Src/SiestaXC/Testers/test2.f90  ! Avoid using DRSLL & LMKLL together
      Src/SiestaXC/Testers/test3.F90
      Src/SiestaXC/Testers/test4.F90

*  Added the vdW functional flavour of K.Lee et al, arXiv:1003.5255v1 (2010) (J.M. Soler)
    
  modified:
      Src/SiestaXC/Testers/test1.f90  ! Added PW86
      Src/SiestaXC/Testers/test2.f90  ! Added VDW/LMKLL
      Src/SiestaXC/Testers/test3.F90  ! Added VDW/LMKLL
      Src/SiestaXC/Testers/test4.F90  ! Added VDW/LMKLL
      Src/SiestaXC/atomxc.f90         ! Call to vdw_exchng
      Src/SiestaXC/cellxc.f90         ! Call to vdw_exchng
      Src/SiestaXC/ggaxc.f            ! Added PW86 and PW86R exchange functionals
      Src/SiestaXC/vdwxc.f90          ! Added vdw_exchng and vdw_set_author
      Src/SiestaXC/xcmod.f90          ! Call to vdw_set_author

*  Update FoX to version 4.1.0 (A. Walker)
    
    Version 4.1.0 of FoX, used to produce our XML output was released 
    on 2010-02-09. This patch updates the version shipped with Siesta 
    to this version. 
  
    Changes that affect Siesta are that the build process for FoX can
    now take advantage of possible parallelization (make -j), we can 
    ask FoX to generate an abort signal if it kills the process and 
    the inclusion of work arounds for compiler bugs in recent versions 
    of the pgi compiler. Some of these changes existed in an (unrelased)
    version of FoX shipped with Siesta since revision 320.
   
    modified:
        Src/FoX/FoX-config.in
        Src/FoX/LICENSE
        Src/FoX/Makefile
        Src/FoX/common/FoX_common.F90
        Src/FoX/configure
        Src/FoX/wxml/FoX_wxml.f90
        Src/FoX/wxml/m_wxml_core.F90
        version.info

------------------------------------
306 Alberto Garcia	  2010-10-20
Avoid extrapolation of DM during geometry optimization (--> trunk-339)

  When performing a geometry optimization (CG, Broyden, etc) (idyn=0 in
  the code), there might be sudden jumps in the geometry (e.g., at the
  end of a line-minimization) that render a extrapolation of the DM
  risky. Hence DM extrapolation is turned off in this case.
  
  One might argue that DM re-use should be avoided too.
  
  For "CG" (idyn==0) calculations, the default is not to extrapolate
  the DM (unless requested by explicitly setting
  'DM.AllowExtrapolation' to "true"). The previous step's DM is reused.
  
  modified:
    Docs/siesta.tex
    Src/new_dm.F


------------------------------------
305 Alberto Garcia	  2010-10-20
Assorted fixes, info on orbital indexes, vacuum level (--> trunk-337)

* Small fixes (J.M. Soler)

    modified:
      Src/SiestaXC/debugxc.f90   ! Corrected file name in closeDebugOutputFile
      Src/SiestaXC/ggaxc.f       ! Added spin bounds in array copy
      Src/SiestaXC/mesh3d.F90    ! Added several checks for range of iDistr
      Src/fermid.F               ! Removed a duplicated printout

*  Corrected call to MPI_AllReduce in SiestaXC/Testers/test4.F90 (J.M. Soler)
    
    modified:
      Src/SiestaXC/Testers/test1.f90  ! Increased number of densities tried
      Src/SiestaXC/Testers/test4.F90  ! Corrected call to MPI_AllReduce

*  MPI_grid_real kind adapted to new standard (J.M. Soler)
    
    modified:
      Src/MPI/mpi.F   ! MPI_grid_real=DAT_double unless def GRID_SP

*  A bug corrected by J.D.Gale in the am05 functional (J.M. Soler)
    
    modified:
      Src/SiestaXC/Testers/makefile   ! Copy ../*.mod
      Src/SiestaXC/am05.f90           ! Bug corrected
      Src/SiestaXC/ggaxc.f            ! Corrected call to am05wbs

*  Two minor bugs in SiestaXC 
    
    modified:
      Src/SiestaXC/Testers/test3.F90  ! Add MPI_Finalize
      Src/SiestaXC/Testers/test4.F90  ! Add MPI_Finalize
      Src/SiestaXC/lib-makefile       ! Add am05.o

*  Include AM05 functional in SiestaXC/Testers (J.M. Soler)
    
    The recently-added AM05 functional has been added to those tested by the
    SiestaXC/Testers.
    
    modified:
      Src/SiestaXC/Testers/test1.f90
      Src/SiestaXC/Testers/test2.f90
      Src/SiestaXC/Testers/test3.F90
      Src/SiestaXC/Testers/test4.F90

*   Two mesh-related bugs (From J.M.Soler)
    
    In routine phiOnMesh, function 'size' was used with unassociated pointers.
    This is a bug, although most compilers tolerate it. Unrelated to this,
    in routine divideBox1D, the limits of the first and last boxes was not
    correctly initialized.
    
    modified:
      Src/SiestaXC/mesh3d.F90  ! Initialize partBox(1,1) and partBox(2,nParts)
      Src/meshsubs.F           ! Check pointer associations

*   Bug correction in mesh3d (From J.M.Soler)
    
    A case not taken care of, in routine sameMeshDistr, created an
    out-of-bounds condition that was noticed by J.D.Gale and others.
    Also, a use statement was added for MPI routines in m_mpi_utils.
    
    modified:
      Src/SiestaXC/mesh3d.F90  ! Bug corrected in sameMeshDistr
      Src/m_mpi_utils.F        ! Added use statement for MPI routines
      Src/meshsubs.F           ! Variable JDGdistr saved and initialized

*   Print vacuum level(From J.M.Soler)
    
    The vacuum level, defined as the effective potential at grid points with
    zero density, is printed in the standard output. This is done whenever
    there are such points and either SaveElectrostaticPotential or
    SaveTotalPotential are true. This will be useful to calculate the work 
    function of a surface.
    
    added:
      Src/vacuum_level.f90      ! Computes the vacuum level
    modified:
      Docs/siesta.tex           ! Document side effect of SaveTotalPotential
      Src/Makefile              ! Add vacuum_level.o. Update dependencies
      Src/dhscf.F               ! Call vacuum_level and print it
      Src/moreParallelSubs.F90  ! Make public miscAllReduceInt

*   New GGA functionals with PBE form and parameters from Capelle et al (J.M. Soler)
    
    The four new functionals, with author labels PBE(JsJrLO), PBE(JsJrHEG), 
    PBE(GcGxLO), and PBE(GcGxHGE), have the PBE functional form, but use
    modified values for parameters beta, mu, and kappa. 
    Refs: L.S.Pedroza et al, PRB 79, 201106 (2009)
          M.M.Odashima et al, J. Chem. Theory Comp. 5, 798 (2009)
    
    modified:
      Src/SiestaXC/ggaxc.f     ! New functionals implemented
      Src/SiestaXC/xcmod.f90   ! Increased length for XCfunc and XCauth strings
      Src/atom.f               ! Let xc_check continue even if func. not known
      Src/read_xc_info.F       ! Increased length for XCfunc and XCauth strings

*   Write orbital indexes  (From J.M.Soler)
    
    To assist users in interpreting files like (label).DM and (label).HS, a new
    file called (label).ORB_INDX is written with info on the orbital index order.
    
    added:
      Src/write_orb_indx.f90   ! Writes (label).ORB_INDX
    
    modified:
      Src/Makefile             ! Added write_orb_indx.o + Dependencies updated
      Src/atmfuncs.f           ! Orbital symmetry names completed up to g orbitals
      Src/compute_dm.F         ! Added call to write_orb_indx
      Docs/siesta.tex          ! Docs

*  Name of functional updated in AM05XC to correctly be AM05 (From J. Gale)
  
  modified:
    Src/SiestaXC/ggaxc.f

* Make preprocessor blocks for BSC_CELLXC more concise in dhscf.F (A.G.)

  


------------------------------------
304 Alberto Garcia	  2010-10-20
Changes to the default precision of grid magnitudes (-->trunk-322)

The grid functions (charge densities, potentials, etc) are now in
double precision by default. The 'phi' array that holds the values of
the basis orbitals on the real-space grid is kept in single precision.

The following pre-processing symbols at compile time control the 
precision selection:

#ifdef GRID_SP
    integer, parameter :: grid_p = sp
    integer, parameter :: phi_grid_p = sp
#elif defined(GRID_DP)
    integer, parameter :: grid_p = dp
    integer, parameter :: phi_grid_p = dp
#else
    integer, parameter :: grid_p = dp
    integer, parameter :: phi_grid_p = sp
#endif

GRID_DP will lead to a sizable memory increase, as 'phi' is the main
user of memory on the grid. On the other hand, the gains in accuracy
are negligible, as the operations over 'phi' are accumulated in double
precision variables.

GRID_SP recovers the old Siesta default. It will not free much
memory, and it will show some numerical differences.

modified:
  Docs/siesta.ind
  Docs/siesta.tex
  Src/meshsubs.F
  Src/precision.F
  


------------------------------------
303 Alberto Garcia	  2010-10-19
Merged some precision changes in m_ts* modules
  
* R. Grima had already fixed the precision of the "v" variable (real
  space potential) to be grid_p in the TSVHFix and TSvoltage2
  subroutines (m_ts_in_siesta.F90 module).

* F.D. Novaes had made more cosmetic changes to declarations, which
  have been merged from the trunk:
  
    real*8 --> real(dp)
    complex*16 --> complex(dp)
    double precision --> real(dp)

* The argument list of routine "transiesta" has been shortened.

------------------------------------
302 Alberto Garcia	  2010-10-18
Merge of SiestaXC + timer, alloc, FoX, fixes --> trunk-320

* New siestaXC library including van der Waals functional

Implementation of the non local van der Waals density functional 
of Dion et al (PRL 92, 246401 (2004), PRL 103, 096102 (2009)).

All the exchange-correlation routines have been placed in a library
called siestaXC, whose unique entry point is module m_siestaxc. The
sources are in subdirectory Src/SiestaXC, whose makefile allows to
create a self-contained distribution in file siestaXC.tgz, that can
be used in programs other than siesta. The library sources that are
used by siesta also outside the library (like alloc.F90) remain in
Src, and are copied by SiestaXC/makefile into siestaXC.tgz.

The library is used to compile siesta itself, with a scheme similar
to that used for MPI, fdf and FoX. Pseudo/atom has been also adapted
to use the siestaXC library.

The implementation of the non local van der Waals density functional
has led to a whole rewritting of cellxc and a major one of atomxc.
File xc has been splitted in m_atomxc, m_ldaxc, and m_ggaxc, which
are now modules. The VDW-specific routines are in module m_vdwxc.

The new parallelization of cellxc has led to several new modules, of
which mesh3d is the largest one. It allows new distributions of mesh
points among processors, that can change dynamically. Other relevant
modules are fftr, for 3-D FFTs of real functions. fft3d has changed
to allow (complex) 3-D FFTs using the new distributions of mesh points.
Module mesh1d provides radial (1-D) mesh utilities. Module m_debugXC
writes reports debugXC.node$$ with details of mesh distributions.

NOTE: The BSC version of cellxc (including its unique "LINEAR" parallel
distribution) has been kept in the code, and it is enabled at compile
time by defining the BSC_CELLXC pre-processor symbol.

(Jose Soler (UAM), with help by Alberto Garcia (ICMAB), Rogeli Grima
(BSC) , and Jose Maria Cela (BSC))

* The new m_timer module, together with changes in MPI/mpi_siesta, allows
the profiling of MPI communication times, for each routine that calls 
timer, after compiling with -DMPI_TIMING. Routine timer itself remains 
external, but it uses m_timer operationally.

* The full accounting and reporting of allocated arrays is now done in
module alloc, and printed in (SystemLabel).alloc. The old 'memory'
routine now passes information to alloc for this accounting, rather
than the other way around. Therefore, the 'total' allocation sizes
given by memory routine are no longer complete, though they are still
printed.

* Incorporate some of J. Soler's documentation and conciseness changes
  to meshsubs (but note that the distribution of the indexp array had
  already been implemented separately by Rogeli Grima).

* Partially merged J. Soler's changes for a correct accounting of
array allocation. Both the 'name' and 'routine' arguments should be
identical (including case sensitivity) in the corresponding calls to
re_alloc and de_alloc of an array.  The two arguments are combined
into an internal name as trim(routine)//' '//name, so that
(name='rho',routine='dhscf') is equivalent to (name='dhscf rho'). This
is the name printed in the allocation report. NOTE: Rogeli Grima had
been making similar changes. To avoid a painful merging, most of the
detailed changes by J. Soler have been temporarily left out, pending
another review.

* The (mainly obsolete) 'nodes' option for basis orbital generation was
producing orbitals with one excess radial node (i.e. one and two nodes
for double zeta, instead of zero and one node). Corrected.

* Clarification of the use of *_last geometry information (A. Garcia)

The variables xa_last (formerly xalast), ucell_last, and scell_last
are used to hold the information related to the last geometry for
which the electronic structure has been computed. This is necessary
since the "siesta_move" routine updates the geometry after every step.
By using the "*_last" variables instead of "xa", "ucell", and "scell",
we make sure that "siesta_analysis", when calculating the
polarization, optical properties, etc, uses the coordinates actually
used to compute the electronic structure.

The *_last variables are set at the beginning of "siesta_move", before
the actual displacements. Due to a bug in the program, however, this
was being done only at the final scheduled step ('fincoor'), instead
of inconditionally after every step. Thus they could be used undefined
if, for example, a relaxation finishes before the scheduled number of
steps (which is typical).

While fixing this bug, it became apparent that some other sections of
"siesta_analysis" are using the "predicted" coordinates (the output of
coordinates in various formats) instead of the last "used"
coordinates. This can be considered a feature or a bug.

Similarly, the computation of the spin polarization uses a density
matrix that is actually the result of a mixing after the last SCF
step.

(Fix prepared by A. Garcia after the discovery of the bug by J. Gale)

* Support for the Armiento and Mattson's  functional added (From J. Gale)

Support for the AM05 functional has been added to routines in SiestaXC 
and Pseudo. This is done using the AM05 subroutines distributed by 
Armiento and Mattson, under the terms of the conditions contained within 
the header to their software allowing modification and redistribution 
provider the original copyright header remains. 

A new module, am05, contained within the file SiestaXC/am05.f90, has been 
added containing the code from Armiento and Mattsson. Within ggaxc.f90 
a wrapper has been added, am05xc, to pass the variables from ggaxc to 
am05 subroutines and handle the return arguments appropriately. 

In the atom program the two-letter symbol "am" has been added for AM05.
In SIESTA the GGA Authors are "AM05".

A test of the AM05 functional added in h2o_am05.

* Add support for PBESol XC functional (J. Gale)

* Update FoX library and add XML.AbortOnErrors and XML.AbortOnWarnings
  (From A. Walker)

It is sometimes useful for warnings or errors generated by the FoX
libary to result in an abort to generate a core dump or stack trace to
see where in Siesta the call causing the error is being made. It is
now possible to turn on this behaviour at runtime using two new fdf
boolean tags:

 XML.AbortOnErrors  XML.AbortOnWarnings

Both are boolean and default to .false. (which mirrors the current
stopping behaviour).

These features have been made possible by an update in the FoX library
that adds an interface to allow errors and warnings to result in an
abort signal. In the update there is also a fix to work around a PGI
bug for the overloaded wxml interfaces (aparently not used in Siesta)
and a change to the prng to avoid using initalised data in prng_init.

* Other fixes:

Pass FPP_FLAGS to MPI makefile (for MPI_TIMINGS)
Fix intent of g2max in dhscf. Put vmat in a module
Wrap output in timer when MPI_TIMINGS is off 
Use (possibly empty) array section of eold in call.
Fix array actual arguments in ambiguous interfaces

------------------------------------
301 Alberto Garcia	  2010-09-30
Fine-tuning of grid load-balancing and communications

(By Rogeli Grima)

* The load heuristics for the quadratic and "linear" distributions have
been changed to take into account the fact that "vacuum" points do
take some processing time.

* To alleviate communication bottlenecks while changing distributions,
asynchronous mpi sends and receives are used. This means that special
buffers have to be allocated. Asynchronous communications are used by
default, unless the SYNCHRONOUS preprocessor variable is set at compile
time.

* Other relevant changes: 
 
  -- Use eight-byte integers for memory counters
  -- Insertion of some trace markers, with extra mpi barriers, in 
     a few places.

This version still contains code to implement prototype
Jacobi-Davidson iterative diagonalization (with and without the use of
the SLEPC library).

Detail of changes (most relevant):

dhscf:        removal of debugging and some timing sections. Other cosmetics.
alloc:        better name handling for memory accounting
memory:       use 8-byte integers for counters.
memoryinfo:   use 8-byte integers for counters.
cellxc:       insert trace markers
compute_dm:   remove debug sections related to slepc.
diagon:       add debug markers

distriphionmesh: change load heuristics for the quadratic and "linear"
                 distributions. Allocate asynchronous-comms buffers.
fft3d:        use timing
initmesh:     make ntp into an 8-byte integer.
initparallel: add debug sections.
mneighb:      use timing

moremeshsubs: add support for asynchronous communications. Rename
              meshDistr variable to distr.
poison:       better declaration of variables. Traces (barriers?)
rhoofd:       turn into .F file to add MPI barriers for traces.
siesta_cmlsubs: avoid the use of 'str' from FoX.
siesta_forces:  use mpi_finalize directly instead of "bye" if 'h_setup_only'.
siesta_init:  traces 
slepc_diagon: reorganization.
timer:        cosmetics
vmat:         turn into .F file to add MPI barriers for traces.

modified:
  Src/alloc.F90
  Src/cellxc.F
  Src/compute_dm.F
  Src/deflatedmv.F
  Src/dhscf.F
  Src/diagon.F
  Src/distriphionmesh.F
  Src/fft3d.F
  Src/initatom.f
  Src/initmesh.F
  Src/initparallel.F
  Src/jacobi_davidson.F
  Src/memory.F
  Src/memoryinfo.F
  Src/mneighb.f
  Src/moremeshsubs.F
  Src/ordern.F
  Src/overfsm.f
  Src/poison.F
  Src/rhoofd.F
  Src/setup_H0.F
  Src/siesta_cmlsubs.F90
  Src/siesta_forces.F
  Src/siesta_init.F
  Src/slepc_diagon.F
  Src/timer.F
  Src/vmat.F
  Src/write_subs.F

------------------------------------
300 Alberto Garcia	  2010-09-29
Updates to fdf and dhscf (grdsam, doping)

* Make fdf_single and fdf_double accept integers
  (fixed version, including call to 'values')

* Define proper kind parameters in fdf/prec.F90

* Increase width of ik field in OCCS file

* Re-implement the doping feature in the uniform distribution

In this way it is much easier, since we can refer directly to the
points at which rhoatm is different from zero, without having to use
any indexes. In fact, this could be done in any distribution, as long
as both rho and rhoatm are distributed in the same way.

* Fix grdsam by adding a call to dhscf_init

Still some more cleanup possible: remove samesh check.

removed:
  Src/doping.F
added:
  Src/doping_uniform.F
modified:
  Src/Makefile
  Src/dhscf.F
  Src/diagk.F
  Src/diagk_file.F
  Src/fdf/fdf.F90
  Src/fdf/prec.F90
  Src/grdsam.F

------------------------------------
299 Alberto Garcia	  2010-02-22
Merge of SLEPC work by Rogeli Grima (in progress)

New routines to use the SLEPC library for diagonalization.

Note that some sections depend on the use 
of the _SLEPC_ preprocessor symbol.

(Extra timing stills depends on __PPC970__)

added:
  Src/slepc_diagon.F
modified:
  Docs/Grid-Work.CHANGES
  Src/Makefile
  Src/compute_dm.F
  Src/domain_decom.F
  Src/gmres.F
  Src/initparallel.F
  Src/jacobi_davidson.F
  Src/siesta_forces.F
  Src/siesta_init.F
  Src/siesta_options.F90
  version.info


------------------------------------
298 Alberto Garcia	  2010-02-22
Clarify timing in dhscf

The timing tags in dhscf were wrong. Now there is a new set for
DHSCF_Init.

------------------------------------
297 Alberto Garcia	  2010-02-19
More data on sizes. Optional stop after H setup. Cleanup

* If the fdf variable "H-Setup-Only" is "true", the program will stop
  after setting up the hamiltonian in the first iteration, just before
  diagonalization. This is useful to benchmark the new grid routines.

* Removed dead code in InitMesh

* Several mesh routines now print data about sizes.

* Temporarily deactivated the "doping" option and the "grid cell sampling"
  option.

modified:
  Src/dhscf.F
  Src/doping.F
  Src/grdsam.F
  Src/initmesh.F
  Src/phionmesh.F
  Src/setupextmesh.F
  Src/siesta_forces.F
  Src/siesta_options.F90

------------------------------------
296 Alberto Garcia	  2010-02-19
Merged work by Rogeli Grima on mesh routines, with some bug fixes

(Work in progress)

There were some bugs in dhscf and in moremeshsubs, found after
painstakingly commenting the flow of the program.

* dhscf and dhscf_init have been merged in a true module m_dhscf, still
  in file dhscf.F. 

* The mesh initialization part is now done *unconditionally* in
  dhscf_init, i.e, after *every* geometry change, even if the change
  does not involve a cell change. The reason is to avoid complexity,
  since now the mesh parallel distributions will depend on the
  detailed atomic positions even if the cell does not change.
  Besides, the relative cost of a "mesh only" initialization is
  negligible.  The only real observable effect would be a printout of
  "initmesh" data at every geometry iteration.

* The variables "nm" and "nsm" are no longer imported in 'moremeshsubs'
  from module m_dhscf. In fact, nmeshg from module mesh is used instead
  of nm (which is abused as an argument in several routines).

* Routine distMeshData (real version) had a bug when running in serial
  mode and asked to "keep" the clustering or sequential character: it 
  did not copy the input to the output array.

* The change in distribution of the 'drho' array did not take into
  account the spin dimension.

Remaining known bugs:

 - grdsam needs to call dhscf_init before calling dhscf
 - the doping routine needs to be called in the quadratic dist
 - the calculation of the Berry-phase polarization in the first
   iteration of test 'born_spin' is wrong.

  */* Inclusion of original logs in Rogeli's branch:

-------------------------------------------------------------
2010-02-17  Alberto Garcia     siesta-bsc-290-rogeli-5-ag-3
More instances of symbolic constants 

Used symbolic constants in calls to initatommesh and setupExtMesh in
dhscf.

modified:
  Src/dhscf.F

-------------------------------------------------------------
2010-02-17  Alberto Garcia     siesta-bsc-290-rogeli-5-ag-2
Use symbolic constants for Mesh distribution handling

Defined integer parameters UNIFORM, QUADRATIC, and LINEAR
in moremeshubs.F to represent the three distributions in current use, and
imported and used them in those routines that deal with different distributions.

modified:
  Src/dhscf.F
  Src/distriphionmesh.F
  Src/forhar.F
  Src/initmesh.F
  Src/moremeshsubs.F

-------------------------------------------------------------
2010-02-16  Alberto Garcia     siesta-bsc-290-rogeli-5-ag-1
Cosmetic changes for portability

A block of code in timer.F, and the routine in "walltime.c" are only
meant for a PPC970 machine. A preprocessor test has been added (and
note that the relevant macro definition should be included in
arch.make, and not in the actual code).

A debugging preprocessor block is not processed in mneighb.f due to the
file extension. Rather than changing it, the debug statement has been made
unconditional.

The computation of a real parameter in gmres.F overflowed due to the
use of an integer base in an exponentiation. The base is now real.

(+ Warning Note in moremeshsubs.F)

modified:
  Src/Makefile
  Src/gmres.F
  Src/mneighb.f
  Src/moremeshsubs.F
  Src/timer.F
  Src/walltime.c

-------------------------------------------------------
2010-02-22  Alberto Garcia     siesta-bsc-290-rogeli-6
Snapshot Feb22 -- More slepc work

-------------------------------------------------------
2010-02-12  Alberto Garcia     siesta-bsc-290-rogeli-5
More comments in mesh routines

Rogeli has added more comments and clarified the structure
of the modules.

(Snapshot taken at 6:30pm Feb. 12. Mesh-related only)

modified:
  Src/dhscf.F
  Src/distriphionmesh.F
  Src/initatommesh.F
  Src/initmesh.F
  Src/meshsubs.F
  Src/phionmesh.F
  Src/setupextmesh.F

removed:
  Src/REJS/

-------------------------------------------------------
2010-02-11  Alberto Garcia     siesta-bsc-290-rogeli-4
End of implementation of distributed indexp

Rogeli has fixed the initialization of ne via extMeshBox and removed
some mpi barriers in dhscf.

(Snapshot taken at 1pm Feb. 11. Work finished late in Feb 5, according
to Rogeli).

(Some extra Jacobi-Davidson updates as of Feb 11 not incorporated)

modified:
  Src/dhscf.F
  Src/initatommesh.F
  Src/moremeshsubs.F

-------------------------------------------------------
2010-02-10  Alberto Garcia     siesta-bsc-290-rogeli-3
Implementation of distributed indexp (work in progress)

Rogeli has taken the ideas of Jose Soler regarding the distributed
indexp and implemented a 'per-distribution, per-processor' extended mesh
and associated index arrays.

Some issues of re-initialization upon atomic movements are still pending.

Some other cosmetic changes, mostly regarding debugging.
(Except in dhscf, where a few uses of "reord" have changed)

(Snapshot taken in the afternoon of Feb. 5)



2010-01-27  Alberto Garcia
Some cosmetic changes to make it compile

* Gmres: eps definition caused overflow
* Wrapped powerpc assembler code in timer.F

--------------------------------------------------
2010-01-26  Alberto Garcia
Jan 26-2010 update: Some docs; Cosmetics. Matrix io...

Snapshot of state of Rogeli's code on Jan 26, 2010.

Incomplete log:

* Some documentation of grid routines.

* Updates to Jacobi-Davidson.

* Matrix market io (mmio)

* Cosmetics, including retabbing of molecular mechanics and other
  routines.

* Addition of a "reset" routine in module radial.f


------------------------------------
295 Alberto Garcia	  2010-01-25
Update to m_efield and doping modules.

Bring in the in-line documentation in synch with siesta-3.0

=======================================================================

** CHANGES ALONG bsc-trunk

-------------------------------------------------------------------------
2009-11-24  17:55 GMT Alberto Garcia <albertog@icmab.es>    bsc-trunk-294
Restructuring of CML modules  + test script fixes

* After the modularization of efield and doping, the CML subsystem
caused strange compiler errors. They have been resolved by explicit
use of "public" qualifiers and the "private" statement in siesta_cml
(which now contains the interface to all the low-level routines, and
wraps FoX completely) and by a simplification of siesta_cmlsubs.

* Some scripts in Tests/Scripts still referred to the old "Src"-style
siesta executable.

(Some work still to be done on the new fdf module)

-------------------------------------------------------------------------
2009-11-24  17:35 GMT Alberto Garcia <albertog@icmab.es>    bsc-trunk-293
Synch to trunk-300

Other bugfixes:

- Correction in TBTrans makefile to restore the main VPATH
- Makefile for Genbasis needed some work.

Main changes from merge:

TranSiesta updates. Assorted fixes and cleanup. Update outputs and banner.

* Make local copy of reinit in Util/Denchar
* Add comment to the manual re: MeshSubDivisions
* Put unit of current in tbtrans. Updated outputs in Tests/transiesta
* Merge changes to TS code by F. Novaes
* Change Copyright dates. Now they are of the form 1996- 
* Remove xmlparser/Test directory. Remove test-xml fossils
* Update out and xml reference files. Update Tests/Makefile
* Fix script.mk and Tests/partial/script.sh

-------------------------------------------------------------------------
2009-11-24  17:10 GMT Alberto Garcia <albertog@icmab.es>    bsc-trunk-292
Synch to trunk-299

Other bug fixes:  

- Variable nsd was used without initialization in dhscf_init.
- Assorted changes in tbtrans to move it closer to new fdf compliance.
- Changes in TOPSRC macro in Vibra and TBtrans makefiles to avoid
  long lines in the __FILE__ macro in the new fdf module.

- Durint the introduction of the new code by P. Ordejon to treat slabs
  with net dipole and charged slabs, new, more modular,
  implementations of "efield" and "doping" have been prepared by
  A. Garcia.

- Note that the fdf calls in the Utils are still not completely up to date.
  (Notably, the fdf_block calls and the MPI unwrapping)

Other noteworthy changes from the merge:

* The manual has been thoroughy re-sectioned, and some obscure points
clarified.

* Fix of the long-standing "mis-feature/bug" in the generation of
  perturbative polarization orbitals. The fix is turned off by
  default, unless the variable PAO.OldStylePolOrbs is set to
  ".false.".  (See manual.)

* Changes to streamline compilation, and new version of
  the arch.make template in Src/Sys/DOCUMENTED_TEMPLATE.make
  There are minor changes needed in arch.make files:

  -  Use of NETCDF_INCFLAGS instead of simply INCFLAGS
  -  Deprecation of the use of DEFS in favor of FPPFLAGS

* Simplification of TranSiesta compilation:

      The target "transiesta" in the makefile defines its
      own -DTRANSIESTA pre-processor flag, so the user does
      not need to worry about it.
      
      Additionally, the makefile checks whether the last
      compilation taking place in the building directory
      was a "plain siesta", or a "transiesta", and complains
      in case of a mismatch. 

* Removal of all remaining mentions to the "Src" directory in the
  automated tests in Tests.

-------------------------------------------------------------------------
2009-10-17  16:50 GMT Alberto Garcia <albertog@icmab.es>    bsc-trunk-291
Synch to trunk-296

NOTES: Utils such as Denchar do not compile yet, as they still use
the old fdf block interface.

-------------------------------------------------------------------------
2009-10-17  13:45 GMT Alberto Garcia <albertog@icmab.es>    bsc-trunk-290
Merged transiesta code, pending complete tests (re-done)

Merged TS code in Src (Rogeli, with some help from Frederico and Alberto)

(This is a re-commit, with preservation of original file ids. 
in following copies (now  "bzr add"'ed with the --ids-from option))

Tests (copied by AG from latest trunk)
TBTrans (copied by AG from trunk-292)

Some cosmetic changes by AG (zgesv_lapack addition, etc)

Note that actual testing of the transiesta module has been minimal.
A subsequent patch will probably be needed.

(+ Added g95 macosx .make file)

-------------------------------------------------------------------------
2009-08-26  10:45 GMT Alberto Garcia <albertog@icmab.es>      bsc-289
Synch with trunk (2.6.32)

* Documentation updates. Building and cosmetic fixes
* Speed-up of density-matrix building in diagk

removed:
  Src/filter/
  Src/filter/README
  Src/filter/ba-6s-orb.dat
  Src/filter/core.dat
  Src/filter/f2kcli.F90
  Src/filter/m_filter.f90
  Src/filter/m_getopts.f90
  Src/filter/makefile
  Src/filter/test_filter.f90
  Src/filter/ti-3p-orb.dat
  Src/filter/ti-4p-orb.dat
  Src/write_subs_energies.F
  Src/write_subs_positions.F
  Src/write_subs_pressure.F
added:
  Docs/ExtraDocs/
  Docs/ExtraDocs/00_README_FIRST
  Docs/ExtraDocs/Analysis_Tools
  Docs/ExtraDocs/Basis_Generation
  Docs/ExtraDocs/CML_Output
  Docs/ExtraDocs/Code_RoadMap
  Docs/ExtraDocs/Compilation
  Docs/ExtraDocs/Eggbox_Effect
  Docs/ExtraDocs/File_Formats
  Docs/ExtraDocs/Geometry_Optimization
  Docs/ExtraDocs/Molecular_Dynamics
  Docs/ExtraDocs/OrderN_Operation
  Docs/ExtraDocs/Parallel_Operation
  Docs/ExtraDocs/SCF_Convergence
  Docs/ExtraDocs/Scripting_Utilities
  Docs/release.notes_3.0
  Src/Confs/README
  Src/Sys/DOCUMENTED-TEMPLATE.make
  Util/DensityMatrix/read_dm.m
  Util/DensityMatrix/read_dmhs.m
  Util/Grid/README
  Util/HSX/README
  Util/MD/README
  Util/Scripting/eggbox_checker.py
  Util/test-xml/
  Util/test-xml/README
  Util/test-xml/compare_m.f90
  Util/test-xml/corresponding_node.f90
  Util/test-xml/flib_dom.f90
  Util/test-xml/fox-makefile
  Util/test-xml/m_compare_tol.f90
  Util/test-xml/m_dom_attribute.f90
  Util/test-xml/m_dom_debug.f90
  Util/test-xml/m_dom_document.f90
  Util/test-xml/m_dom_element.f90
  Util/test-xml/m_dom_error.f90
  Util/test-xml/m_dom_namednodemap.f90
  Util/test-xml/m_dom_node.f90
  Util/test-xml/m_dom_nodelist.f90
  Util/test-xml/m_dom_parse.f90
  Util/test-xml/m_dom_types.f90
  Util/test-xml/m_dom_utils.FoX.f90
  Util/test-xml/m_dom_utils.f90
  Util/test-xml/m_strings.f90
  Util/test-xml/makefile
  Util/test-xml/string_utilities.f90
  Util/test-xml/test.f90
modified:
  Docs/siesta.ind
  Docs/siesta.tex
  Src/FoX/fsys/fox_m_fsys_abort_flush.F90
  Src/FoX/wcml/m_wcml_molecule.F90
  Src/Makefile
  Src/Sys/README
  Src/Sys/nolibs.make
  Src/atomlwf.F
  Src/denmat.F
  Src/denmatlomem.F
  Src/diagk.F
  Src/f2kcli.F90
  Src/m_filter.f90
  Src/md_out.F90
  Src/mixer.F
  Src/new_dm.F
  Src/siesta_move.F
  Src/xmlparser/f2kcli.F90
  Util/COOP/Makefile
  Util/Denchar/Src/Makefile
  Util/DensityMatrix/README
  Util/DensityMatrix/makefile
  Util/Macroave/Docs/macroave.tex
  Util/Macroave/Src/Makefile
  Util/Macroave/Src/permute.F
  Util/Scripting/README
  Util/VCA/README
  Util/Vibra/Src/Makefile
  Util/WFS/makefile
  Util/pdosxml/makefile
  Util/pseudo-xml/makefile
  version.info

-------------------------------------------------------------------------
2009-08-13  16:45 GMT Alberto Garcia <albertog@icmab.es>	bsc-288
Synch with trunk (except TranSiesta) (redone)

Merged all the missing patchlogs from the trunk as of Aug 11, except
those dealing with TranSiesta and COOP. The COOP funcionality was
merged by hand afterwards. [fixed file-ids on Oct 17]

Comments:

* Remaining bugs and shortcomings:

- The Jacobi-Davidson subsystem is still not completely finished.
  The metis library is needed to compile the program even for the
  serial version (See Src/Sys/nano-intel-mpi-cdf.make for an example
  of how to include it).

- Exc for non-collinear spin shows differences.
- fdf update in Zmatrix does not work well.
- The old fdf is still used in some of the Util programs
- A temporary array is produced in fermid for non-coll spin calculations.
- Some references to Rogeli's debugging scaffolding might
  not be completely resolved for all programs.
- CML: the mesh-cutoff info might be out of order in the XML file.

removed:
  Src/Sys/eth-hreidar-mpi.make
  Src/Sys/lahey-lam.make
  Src/Sys/lahey-mpich.make
  Src/Sys/lahey-nolibs.make
  Src/Sys/lahey.make
  Src/Sys/osfdxml-mpich.make
  Src/Sys/osfdxml.make
  Src/Sys/osfdxmlcdf.make
  Src/Sys/pgf90-lam.make
  Src/Sys/pgf90-mpich.make
  Src/Sys/pgf90-nolibs.make
  Src/Sys/pgf90.make
  Src/Sys/sgi-altix.make
  Src/Sys/sgi.make
  Src/Sys/sgi64-cdf.make
  Src/Sys/sgi64-lam-cdf.make
  Src/Sys/sgi64-lam.make
  Src/Sys/sgi64-mpi_fermat.make
  Src/Sys/sgi64-mpich-cdf.make
  Src/Sys/sgi64-mpich.make
  Src/Sys/sgin32-mpi.make
  Src/Sys/sun-nolibs.make
  Src/Sys/t3e.make
  Src/denchar.F
  Src/extrapol.F
  Src/filter.f90
  Src/filter_subs.f
  Src/initdm.F
  Src/m_denchar_geom.f
  Src/m_denchar_init.F
  Src/m_denchar_io.F
  Src/m_denchar_neighb.f
  Src/m_denchar_work.f
  Tests/Reference-xml/pb_filter_all.xml
  Tests/Reference-xml/pb_filter_basis.xml
  Tests/Reference-xml/pb_filter_pcc.xml
  Tests/Reference-xml/pb_filter_vna.xml
  Tests/Reference/pb_filter_all.out
  Tests/Reference/pb_filter_basis.out
  Tests/Reference/pb_filter_nopcc.out
  Tests/Reference/pb_filter_pcc.out
  Tests/Reference/pb_filter_vna.out
  Tests/Reference/var_cell_filter.out
  Tests/au-surface/
  Tests/au-surface/au-surface.fdf
  Tests/au-surface/au-surface.pseudos
  Tests/au-surface/makefile
  Tests/bsc-Makefile
  Tests/bsc-compare.sh
  Tests/bsc-test.mk
  Tests/pb_filter_basis/
  Tests/pb_filter_basis/makefile
  Tests/pb_filter_basis/pb_filter_basis.fdf
  Tests/pb_filter_basis/pb_filter_basis.pseudos
  Tests/pb_filter_nopcc/
  Tests/pb_filter_nopcc/makefile
  Tests/pb_filter_nopcc/pb_filter_nopcc.fdf
  Tests/pb_filter_nopcc/pb_filter_nopcc.pseudos
  Tests/pb_filter_pcc/
  Tests/pb_filter_pcc/makefile
  Tests/pb_filter_pcc/pb_filter_pcc.fdf
  Tests/pb_filter_pcc/pb_filter_pcc.pseudos
  Tests/pb_filter_vna/
  Tests/pb_filter_vna/makefile
  Tests/pb_filter_vna/pb_filter_vna.fdf
  Tests/pb_filter_vna/pb_filter_vna.pseudos
  Tests/std-Makefile
  Tests/std-compare.sh
  Tests/std-test.mk
  Tests/var_cell_filter/
  Tests/var_cell_filter/makefile
  Tests/var_cell_filter/var_cell_filter.fdf
  Tests/var_cell_filter/var_cell_filter.pseudos
  Tests/var_cell_stress/
  Tests/var_cell_stress/makefile
  Tests/var_cell_stress/var_cell_stress.fdf
  Tests/var_cell_stress/var_cell_stress.pseudos
  Util/Denchar/README-Source
  Util/pdosxml/f2kcli.F90
added:
  Obj/
  Obj/README
  Src/FoX/ *Dir
  Src/Sys/macosx-gfortran64-atlas.make
  Src/Sys/macosx-openmpi.make
  Src/Sys/marenostrum-mpi-64.make
  Src/Sys/marenostrum-mpi-netcdf-64.make
  Src/Sys/nano-intel-mpi-cdf.make
  Src/Sys/nano-intel-mpi.make
  Src/Sys/nano-intel-serial.make
  Src/Sys/nano-pgf95-serial.make
  Src/Sys/pgf95-macosx32.make
  Src/compute_norm.F
  Src/filter/
  Src/filter/README
  Src/filter/ba-6s-orb.dat
  Src/filter/core.dat
  Src/filter/f2kcli.F90
  Src/filter/m_filter.f90
  Src/filter/m_getopts.f90
  Src/filter/makefile
  Src/filter/test_filter.f90
  Src/filter/ti-3p-orb.dat
  Src/filter/ti-4p-orb.dat
  Src/kpoint_pdos.F90
  Src/m_filter.f90
  Src/m_hsx.F
  Src/m_iodm.F
  Src/m_sparse.F
  Src/write_subs_energies.F
  Src/write_subs_positions.F
  Src/write_subs_pressure.F
  Tests/Makefile
  Tests/Pseudos/N.psf
  Tests/Reference-xml/pb_filter_cutoff.xml
  Tests/Reference-xml/pb_filter_tol.xml
  Tests/Reference-xml/si64_coop.xml
  Tests/Reference-xml/si_pdos_kgrid.xml
  Tests/Reference/h_chain.out
  Tests/Reference/n_chain.out
  Tests/Reference/pb_filter_cutoff.out
  Tests/Reference/pb_filter_tol.out
  Tests/Reference/si64_coop.out
  Tests/Reference/si_coop.out
  Tests/Reference/si_pdos_kgrid.out
  Tests/Scripts/nano.pbs
  Tests/Scripts/nano4.sh
  Tests/fe_cohp/
  Tests/fe_cohp/fe_cohp.fdf
  Tests/fe_cohp/fe_cohp.pseudos
  Tests/fe_cohp/makefile
  Tests/fe_noncol_kp/
  Tests/fe_noncol_kp/fe_noncol_kp.fdf
  Tests/fe_noncol_kp/fe_noncol_kp.pseudos
  Tests/fe_noncol_kp/makefile
  Tests/fen/
  Tests/fen/fen.fdf
  Tests/fen/fen.pseudos
  Tests/fen/makefile
  Tests/h2o_coop/
  Tests/h2o_coop/h2o_coop.fdf
  Tests/h2o_coop/h2o_coop.pseudos
  Tests/h2o_coop/makefile
  Tests/h_chain/
  Tests/h_chain/h_chain.fdf
  Tests/h_chain/h_chain.pseudos
  Tests/h_chain/makefile
  Tests/h_chain2/
  Tests/h_chain2/h_chain2.fdf
  Tests/h_chain2/h_chain2.pseudos
  Tests/h_chain2/makefile
  Tests/n_chain/
  Tests/n_chain/makefile
  Tests/n_chain/n_chain.fdf
  Tests/n_chain/n_chain.pseudos
  Tests/pb_filter_tol/
  Tests/pb_filter_tol/makefile
  Tests/pb_filter_tol/pb_filter_tol.fdf
  Tests/pb_filter_tol/pb_filter_tol.pseudos
  Tests/pd_ice/pd_ice.pseudos
  Tests/si64_coop/
  Tests/si64_coop/makefile
  Tests/si64_coop/si64_coop.fdf
  Tests/si64_coop/si64_coop.pseudos
  Tests/si_coop/
  Tests/si_coop/makefile
  Tests/si_coop/si_coop.fdf
  Tests/si_coop/si_coop.pseudos
  Tests/si_pdos_kgrid/
  Tests/si_pdos_kgrid/makefile
  Tests/si_pdos_kgrid/si_pdos_kgrid.fdf
  Tests/si_pdos_kgrid/si_pdos_kgrid.pseudos
  Tests/test.mk
  Util/CMLComp/
  Util/CMLComp/README
  Util/CMLComp/ccViz
  Util/COOP/    *Dir
  Util/Denchar/Src/   *Dir
  Util/DensityMatrix/README
  Util/DensityMatrix/dmfilter.f90
  Util/Grid/average_x.m
  Util/Grid/average_z.m
  Util/HSX/
  Util/HSX/hsx_m.f90
  Util/Optimizer/  *Dir
  Util/Projections/  *Dir
  Util/SCF/README
  Util/SCF/g_dm.py
  Util/SCF/g_dm3.py
  Util/SCF/g_els_out.py
  Util/SCF/g_hh.py
  Util/SCF/g_hist.py
  Util/Scripting/cutoff.py
  Util/WFS/
  Util/WFS/makefile
  Util/WFS/readwfx.f
  Util/WFS/wfs2wfsx.f
  Util/WFS/wfsnc2wfsx.f90
  Util/WFS/wfsx2wfs.f
  Util/pseudo-xml/Fe.xml
  Util/pseudo-xml/io.f
  Util/pseudo-xml/makefile
  Util/pseudo-xml/pseudopotential.f
  Util/pseudo-xml/sys.f90
  Util/pseudo-xml/xml2psf.f90
  Util/pseudo-xml/xml2psf_helper.f
renamed:
  Pseudo/atom/makefile => Pseudo/atom/makefile-old
  Pseudo/atom/makefile-xml => Pseudo/atom/Makefile
  Src/Sys/marenostrum-mpi.make => Src/Sys/marenostrum-mpi-32.make
  Src/pseudo-xml => Util/pseudo-xml
  Tests/h3po4_atomlists_1 => Tests/h3po4_1
  Tests/h3po4_atomlists_1/h3po4.fdf => Tests/h3po4_1/h3po4_1.fdf
  Tests/h3po4_atomlists_1/h3po4.pseudos => Tests/h3po4_1/h3po4_1.pseudos
  Tests/h3po4_atomlists_2 => Tests/h3po4_2
  Tests/h3po4_atomlists_2/h3po4.fdf => Tests/h3po4_2/h3po4_2.fdf
  Tests/h3po4_atomlists_2/h3po4.pseudos => Tests/h3po4_2/h3po4_2.pseudos
  Tests/h3po4_atomlists_3 => Tests/h3po4_3
  Tests/h3po4_atomlists_3/h3po4.fdf => Tests/h3po4_3/h3po4_3.fdf
  Tests/h3po4_atomlists_3/h3po4.pseudos => Tests/h3po4_3/h3po4_3.pseudos
  Tests/pb_filter_all => Tests/pb_filter_cutoff
  Tests/pb_filter_all/pb_filter_all.fdf => Tests/pb_filter_cutoff/pb_filter_cutoff.fdf
  Tests/pb_filter_all/pb_filter_all.pseudos => Tests/pb_filter_cutoff/pb_filter_cutoff.pseudos
  Tests/pd_h2o => Tests/pd_ice
  Util/Vibra/Vibra => Util/Vibra/Src
  Util/pdosxml/pdos.f90 => Util/pdosxml/pdosxml.f90
  Util/readwf.f => Util/WFS/readwf.f
modified:
  Docs/siesta.ind
  Docs/siesta.tex
  Pseudo/atom/Docs/atom.tex
  Pseudo/atom/README
  Pseudo/atom/prdiff.f
  Pseudo/atom/pseudoXML.f
  Pseudo/atom/velect.f
  Pseudo/atom/xc.f
  Src/Libs/blas.f
  Src/MPI/mpi.F
  Src/Makefile
  Src/Sys/README
  Src/Sys/cscs-cray-mpi.make
  Src/Sys/cscs-cray.make
  Src/Sys/cscs-ibm-blanc.make
  Src/Sys/finisterrae.make
  Src/Sys/gfortran-netcdf.make
  Src/Sys/marenostrum-mpi-netcdf-32.make
  Src/alloc.F90
  Src/atmfuncs.f
  Src/atom.f
  Src/atomlwf.F
  Src/bands.F
  Src/basis_io.F
  Src/basis_specs.f
  Src/broyden_optim.F
  Src/cdiag.F
  Src/cgvc.F
  Src/chemical.f
  Src/chempot.F
  Src/coor.F
  Src/dhscf.F
  Src/diag2g.F
  Src/diag2k.F
  Src/diagg.F
  Src/diagk.F
  Src/diagk_file.F
  Src/diagkp.F
  Src/diagon.F
  Src/dynamics.f
  Src/efield.F
  Src/electrostatic.f
  Src/hsparse.F
  Src/initmesh.F
  Src/iodm_netcdf.F90
  Src/iodmhs_netcdf.F90
  Src/ioeig.f
  Src/iohs.F
  Src/ioncat.f
  Src/iowfs_netcdf.F90
  Src/jacobi_davidson.F
  Src/kpoint_grid.F90
  Src/m_spin.F90
  Src/meshsubs.F
  Src/mixer.F
  Src/mulliken.F
  Src/new_dm.F
  Src/obj_setup.sh*
  Src/ordern.F
  Src/outcell.f
  Src/pdos.F
  Src/post_scf_work.F
  Src/projected_DOS.F
  Src/pseudopotential.f
  Src/radial.f
  Src/redcel.F
  Src/remove_intramol_pressure.f90
  Src/scfconvergence_test.F
  Src/setup_hamiltonian.F
  Src/siesta_analysis.F
  Src/siesta_cml.f90
  Src/siesta_cmlsubs.F90
  Src/siesta_init.F
  Src/siesta_options.F90
  Src/sparse_matrices.F
  Src/state_analysis.F
  Src/state_init.F
  Src/struct_init.F
  Src/sys.F
  Src/timer.F
  Src/version.F90
  Src/write_subs.F
  Src/writewave.F
  Src/xc.f
  Src/xmlparser/makefile
  Tests/Reference-xml/ag.xml
  Tests/Reference-xml/batio3.xml
  Tests/Reference-xml/benzene.xml
  Tests/Reference-xml/bessel.xml
  Tests/Reference-xml/born.xml
  Tests/Reference-xml/born_spin.xml
  Tests/Reference-xml/ch4.xml
  Tests/Reference-xml/constant_volume.xml
  Tests/Reference-xml/fe.xml
  Tests/Reference-xml/fe_broyden.xml
  Tests/Reference-xml/fe_clust_noncollinear.xml
  Tests/Reference-xml/fire_benzene.xml
  Tests/Reference-xml/floating.xml
  Tests/Reference-xml/force_2.xml
  Tests/Reference-xml/graphite_c6.xml
  Tests/Reference-xml/h2o.xml
  Tests/Reference-xml/h2oZ.xml
  Tests/Reference-xml/h2o_basis.xml
  Tests/Reference-xml/h2o_dos.xml
  Tests/Reference-xml/h2o_findp_bug.xml
  Tests/Reference-xml/h2o_op_broyden.xml
  Tests/Reference-xml/h2o_orderN.xml
  Tests/Reference-xml/h2o_radialgrid.xml
  Tests/Reference-xml/h2o_reparam.xml
  Tests/Reference-xml/md_anneal.xml
  Tests/Reference-xml/md_nose.xml
  Tests/Reference-xml/md_npr.xml
  Tests/Reference-xml/md_pr.xml
  Tests/Reference-xml/md_verlet.xml
  Tests/Reference-xml/mgco3.xml
  Tests/Reference-xml/oxyn.xml
  Tests/Reference-xml/ptcda.xml
  Tests/Reference-xml/si2x1h.xml
  Tests/Reference-xml/si64.xml
  Tests/Reference-xml/si_bandpoints.xml
  Tests/Reference-xml/si_coop.xml
  Tests/Reference-xml/sih.xml
  Tests/Reference-xml/sih_fire.xml
  Tests/Reference-xml/sih_op_broyden.xml
  Tests/Reference-xml/sinw.xml
  Tests/Reference-xml/var_cell.xml
  Tests/Reference-xml/zmatrix.xml
  Tests/ag/ag.fdf
  Tests/benzene/benzene.fdf
  Tests/fe_clust_noncollinear/fe_clust_noncollinear.fdf
  Tests/fire_benzene/fire_benzene.fdf
  Tests/h2o/h2o.fdf
  Tests/h2oZ/h2oZ.fdf
  Tests/h3po4_1/makefile
  Tests/h3po4_2/makefile
  Tests/h3po4_3/makefile
  Tests/pb_filter_cutoff/makefile
  Tests/pd_ice/makefile
  Tests/ptcda/ptcda.fdf
  Tests/si_bandpoints/si_bandpoints.fdf
  Tests/zmatrix/zmatrix.fdf
  Util/Denchar/Docs/CHANGES
  Util/Denchar/Docs/denchar.tex
  Util/DensityMatrix/cdf2dm.f90
  Util/DensityMatrix/dm2cdf.f90
  Util/DensityMatrix/makefile
  Util/Grid/cdf_fft.f90
  Util/Grid/grid2cube.f
  Util/Grid/libfft.f
  Util/Grid/makefile
  Util/README
  Util/Scripting/Siesta/Interface.py
  Util/Vibra/Src/Makefile
  Util/Vibra/Src/vibrator.f
  Util/pdosxml/README
  Util/pdosxml/m_pdos.f90
  Util/pdosxml/makefile
  Util/pseudo-xml/README
  version.info
  Pseudo/atom/makefile-old
  Pseudo/atom/Makefile
  Src/Sys/marenostrum-mpi-32.make
  Tests/h3po4_1/h3po4_1.fdf
  Tests/h3po4_2/h3po4_2.fdf
  Tests/h3po4_3/h3po4_3.fdf
  Tests/pb_filter_cutoff/pb_filter_cutoff.fdf
  Util/pdosxml/pdosxml.f90



-------------------------------------------------------------------------
2009-08-11  17:45 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.9
Do not stop after Jacobi-Davidson process

modified:
  Src/jacobi_davidson.F

-------------------------------------------------------------------------
2009-08-11  17:45 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.8
Fix initialization error for sparse indexes

numhold and listhptrold were wrongly zeroed
in state_init. They are managed in extrapol.

modified:
  Src/state_init.F

-------------------------------------------------------------------------
2009-08-11  14:05 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.7
Remove Lanczos code. Assorted fixes. Still problems

Removed Lanczos code.

Other changes:

* resetMesh is now called just before the call to InitMesh
* boxIntersection taken out of MPI #ifdefs.

NOTES: 

- Metis is needed even in serial compilations.
- The code runs, except when doing geometry iterations with
  full SCF (Harris is fine).

removed:
  Src/lu_factorization.F
  Src/modi_lanczos_m.F
  Src/superlu.F
  Src/superlu_c2f_wrap.c
modified:
  Docs/CHANGES
  Src/Makefile
  Src/compute_dm.F
  Src/dhscf.F
  Src/domain_decom.F
  Src/initparallel.F
  Src/iogrid_netcdf.F90
  Src/jacobi_davidson.F
  Src/moremeshsubs.F
  Src/siesta_end.F
  Src/siesta_forces.F
  Src/spher_harm.f
  Src/state_init.F

-------------------------------------------------------------------------
2009-08-11  10:20 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.6
Update with Rogeli's code up to Aug 11 2009

Assorted changes. Among them:

* Use of 'reset' routines to deallocate arrays in certain modules.

  RESET_NEIGHBOUR_ARRAYS()
  RESET_SPHER_HARM( )
  RESET_RADFFT( )
 
  and also, (this is from siesta_end):

      use m_pulay,         only : resetPulayArrays
      use moreMeshSubs,    only : resetMeshDistr
      use densematrix,     only : resetDenseMatrix
      use sparse_matrices, only : resetSparseMatrices
      use m_fixed,         only : resetFixedPointers
      use band,            only : reset_bands
      use domain_decom,    only : resetDomainDecom

  It is not clear that these are harmless...

* Change of name qsort --> myqsort (system conflict)

* Cosmetic changes in several routines.

* Changes in fdf.F90 to clean the filename production, and
  to satisfy certain compilers.

* Insertion of "nullify" statements in arw.f and several other routines.

* Change of #ifdef MPI for tests on 'nodes' in several places (such as
  dhscf). This was done to make sure that the code worked in all cases
  (serial, MPI with np=1, parallel, etc).

* Introduce extra pointers to array sections to help compilers avoid
  the creation of temporary arrays. (eg, fsrc and fdat in dhscf).

* Replace f90 array operations by explicit do loops in some places.
 Eventually, these will be replaced by call to BLAS.

NOTE: The Lanczos code is going to be abandoned. It will be removed in
the next patch.

added:
  Src/Sys/marenostrum-lanczos.make
  Src/Sys/mn-openmp.make
  Src/cg.F
  Src/lu_factorization.F
  Src/modi_lanczos_m.F
  Src/superlu.F
  Src/superlu_c2f_wrap.c
modified:
  Docs/CHANGES
  Src/Makefile
  Src/alloc.F90
  Src/arw.f
  Src/atmfuncs.f
  Src/atom.f
  Src/atomlwf.F
  Src/bands.F
  Src/basis_io.F
  Src/basis_types.f
  Src/bonds.f
  Src/cdiag.F
  Src/cell_broyden_optim.F
  Src/cell_fire_optim.F
  Src/chempot.F
  Src/compute_dm.F
  Src/coor.F
  Src/debugmpi.F
  Src/densematrix.f
  Src/dfscf.f
  Src/dhscf.F
  Src/diagon.F
  Src/distriphionmesh.F
  Src/dnaefs.f
  Src/domain_decom.F
  Src/dscfcomm.F
  Src/dynamics.f
  Src/eggbox.F
  Src/electrostatic.f
  Src/fdf/fdf.F90
  Src/fdf/parse.F90
  Src/fdf/utils.F90
  Src/fft3d.F
  Src/filter.f90
  Src/filter_subs.f
  Src/final_H_f_stress.F
  Src/fire_optim.F
  Src/fixed.F
  Src/forhar.F
  Src/get_target_stress.f
  Src/gmres.F
  Src/grdsam.F
  Src/hsparse.F
  Src/initmesh.F
  Src/initparallel.F
  Src/iogrid_netcdf.F90
  Src/jacobi_davidson.F
  Src/kinefsm.f
  Src/ksv.f
  Src/m_dhscf.F
  Src/m_diagon.F
  Src/m_iostruct.f
  Src/matel.f
  Src/matrixop.F
  Src/memory.F
  Src/meshmatrix.F
  Src/meshsubs.F
  Src/mneighb.f
  Src/molecularmechanics.F90
  Src/moremeshsubs.F
  Src/naefs.f
  Src/nlefsm.f
  Src/old_atmfuncs.f
  Src/optical.F
  Src/ordern.F
  Src/overfsm.f
  Src/overlap.f
  Src/pdos.F
  Src/phionmesh.F
  Src/phirphi.f
  Src/phirphi_opt.f
  Src/phonon.F
  Src/poison.F
  Src/post_scf_work.F
  Src/precond.F
  Src/printmatrix.F
  Src/proximity_check.F
  Src/pseudopotential.f
  Src/pspltm1.F*
  Src/qsort.F
  Src/radfft.f
  Src/radial.f
  Src/rdiag.F
  Src/redcel.F
  Src/reinit.F
  Src/reord.f
  Src/rhoofd.F
  Src/scfconvergence_test.F
  Src/schecomm.F
  Src/setup_hamiltonian.F
  Src/shaper.f
  Src/siesta.F
  Src/siesta_analysis.F
  Src/siesta_end.F
  Src/siesta_forces.F
  Src/siesta_init.F
  Src/siesta_options.F90
  Src/sparse_matrices.F
  Src/spher_harm.f
  Src/state_analysis.F
  Src/state_init.F
  Src/struct_init.F
  Src/timer.F
  Src/vmat.F
  Src/vmb.F
  Src/write_subs.F
  Src/writewave.F
  Src/wxml/m_wxml_array_str.f90
  Src/wxml/m_wxml_buffer.f90
  Src/wxml/m_wxml_core.f90
  Src/wxml/m_wxml_dictionary.f90
  Src/wxml/m_wxml_elstack.f90
  Src/xc.f
  Src/zm_fire_optim.F
  Src/zmatrix.F

-------------------------------------------------------------------------
2008-10-12  17:50 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.5
Fix processing of InitSpin block. Avoid writing DM nc files by default

The InitSpin block was read correctly, but a superfluous check for the
number of lines made it crash sometimes. The check has been removed.

When the Jacobi-Davidson method is used, the local-to-global assigment
of orbitals used in the netCDF DM routines needs to be re-examined.
Write.DM.NetCDF and Write.DMHS.NetCDF are .false. by default now.

Arrays involved in gather operations have been allocated (to zero-size)
in non-master nodes in the netCDF routines. This avoids crashes when
running with full checks.

modified:
  Src/initdm.F
  Src/iodm_netcdf.F90
  Src/iodmhs_netcdf.F90
  Src/siesta_options.F90

-------------------------------------------------------------------------
2008-10-08  16:50 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.4
Fixed array bounds issue in fdf library

Some compilers had trouble with the assigment to
bufferFDF in routine fdf_SendInput. The limits
of the assignment have now been made explicit.

The MAX_LENGTH parameter is now imported from the fdf
utils module by both fdf and parse.

(Also: added a rule in .bzrignore to ignore .mod files)

added:
  .bzrignore
modified:
  Src/fdf/fdf.F90
  Src/fdf/parse.F90
  Src/fdf/utils.F90

-------------------------------------------------------------------------
2008-09-29  14:35:00 GMT Alberto Garcia <albertog@icmab.es>	bsc-2.8.3
Fixed a bug with arrays listhptrold and numhold (Rogeli)
-------------------------------------------------------------------------
r4 | bsc21017 | 2008-09-19 16:25:39 +0200 (Fri, 19 Sep 2008) | 11 lines

Fixed a bug with arrays listhptrold and numhold.  These arrays were
allocated in siesta_init with the same size as listhptr and numh. If
we run with 'jacobi' as a solution method, the size of listhptr and
numh is modified, so the size of listhptrold and numhold should
change too.

Cosmetic change in domain_decomposition.

modified:
  Src/siesta_init.F
  Src/state_init.F
  Src/domain_decom.F

----------------------------------------------------------------------
2008-09-12  14:45:00 GMT Alberto Garcia <albertog@icmab.es>	 2.8.2
Bug fixes by Rogeli: Drho reorder, Vna init (SVN 2-3)

Fixed a bug in the function NeutralAtomOnMesh.  Array Vna only should
be reset when we don't need to compute Gradients.  Vna is also
defined as an inout variable to avoid problems under some
architectures.
  
This bug shows up in test "batio3".
  
modified:
  Src/meshsubs.F

Fixed a bug in the sequential code of dhscf
Array Drho needs to be reordered before calling cellxc.
  
modified:
  Src/dhscf.F

----------------------------------------------------------------------
2008-09-12  14:30:00 GMT Alberto Garcia <albertog@icmab.es>	 2.8.1
Incorporate proper patchlogs from trunk merge

A previous big merge from trunk was carried out without explicitly
incorporating the patchlogs ("merge records"). They have now been
added to facilitate the synching.

Version tags have now a "siesta-bsc-2.8" prefix.

----------------------------------------------------------------------
Sep 9, 2008 

Accept integers or reals in (super)cell specification

The original code by Raul demanded reals for lattice
specification and supercell description (through the
use of fdf_breals). Now the reading is done with
fdf_bvalues, so integers are accepted as well.

modified:
  Src/redcel.F

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

Sep 1st, 2008 
Merge of changes by Rogeli on svn 

    Removal of matmul calls in dynamics.f
    moremeshsubs.F can now be compiled in MN with no temporaries + cosmetic changes


modified:
  Src/atom.f
  Src/dhscf.F
  Src/diagg.F
  Src/diagon.F
  Src/dynamics.f
  Src/efield.F
  Src/fdf/fdf.F90
  Src/fdf/parse.F90
  Src/fdf/sample.F90
  Src/grdsam.F
  Src/meshmatrix.F
  Src/moremeshsubs.F
  Src/phionmesh.F
  Src/radial.f
  Src/rdiag.F
  Src/reinit.F
  Src/setup_H0.F
  Src/writewave.F

------------------------------------------------------------
Merge of changes along development trunk (siesta-devel--reference--2.5),
except COOP (patch 1) (will re-implement it using netCDF technology) and
TranSiesta (the merge needs to be reviewed by F. Novaes).

The following log has been automatically generated by bzr in an auxiliary
directory, but note that the patchlogs themselves are not part of the bsc bzr branch
yet.

  Include pending merge patchlogs.
    ------------------------------------------------------------
    revno: 192.1.67
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Tue 2008-07-08 13:46:50 +0000
    message:
      Patches by A. Walker: undefined variables and pointers, intents
      Fixes found using the full-checks mode of the NAG fortran compiler.
      The original names of the patch files are retained for reference.
      
      * NAG-01-null.patch -- makes various undefined pointers disassociated
      (in fft3d.F, dfscf.f, pseudopotential.f, hsparse.f, optical.F,
      writewave.F and zmatrix) and wraps a pointer declaration that is only
      used under -DMPI with the ifdef in optical.F.
      
      * NAG-02-intent.patch -- attempts to deal with a couple of issues with
      the intent of variables. Intent(out) results in the variable being
      undefined at the start of the called subroutine (and in the caller, if
      it is not changed). In vmb.F there is a call to fixed with a couple of
      variables being used in two places (on intent(in) and another
      intent(out)) - I don't know what the strictly correct behavior is in
      this case, but under NAG this results in the intent(in) variable being
      undefined in fixed. I've worked around this with a pair temporary
      variables. The alternative is to rework the interface to fixed using
      intent(inout). The second issue is similar and in meshsubs.f: Vna
      ended up undefined if gradient was true. I've dealt with this by
      setting Vna to 0.0, but a reworking using intent(inout) may also be a
      better solution.
      
      * NAG-03-dhfcs.patch -- deals with a couple of pointers in
      dhscf.F. These need to have the save attribute or they will be
      undefined rather than disassociated on the second and subsequent
      calls. I've also added a comma to a data block.
      
      * NAG-04-filter.patch Changes the dimensions of f0 from nr to n so to
      avoid a mismatch in array dimensions of x in the call to the
      interpolation function at line 169. As far as I can tell this is the
      correct fix: yold is known at the xold positions and ynew will be
      calculated at the xnew positions, so ynew (which is f0) should be of
      the same dimensions as xnew (which is x), and yold (f) should be of
      the same dimensions as xold (r).
      
      * NAG-05-init -- In dynamics.f initialize magv and magf in the uphill
      case. In forhar.f initialize stressl array. In m_cell.f initialize
      celli as it is used in the case of a zmatrix molecule without a cell
      before the box size is calculated. In m_kinetic.F90 initialize
      thermostat parameters.
      
      ** Other fixes:
      
      * Avoid referencing s%rc and s%lambda for polarization orbitals
        in basis_specs_transfer.
    ------------------------------------------------------------
    revno: 192.1.66
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 22:49:11 +0000
    message:
      Minor cosmetic fixes to avoid compilation warnings
      *   Fix cycle statement in m_denchar_work.f
      
      *   Fix cycle statements in pdos routines -- warning in atomlwf.F
      
      *   Some debugging support for KB generation
      
      If Atom.Debug.KB.Generation is "true", 'AtomLabel-KBproj'.index
      files are produced showing the non-interpolated projectors.
      
      *   Fixes for NAG compiler contributed by Toby White:
      
      chempot: intent of mu in numb routine.
      writewave: remove references to paste routine
      fft3d.F: explicit array-ness of trigs in calls to setup routines.
    ------------------------------------------------------------
    revno: 192.1.65
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 22:40:22 +0000
    message:
      Fixed bug affecting MP occupation smearing.
      Fixed a bug (reported by Francois Willaime of CEA/Saclay)
      which affected calculations in metals using the Hermite-Gauss
      broadening scheme proposed by Methfessel and Paxton
      (OccupationFunction MP).
      
      The following test on state occupancy was performed:
      
      if (qe.gt.occtol)
      
      where qe is the state occupancy, and occtol, the tolerance (set to
      10**-12 by default).  If one uses the Methfessel-Paxton smearing, qe
      may take negative values and this test therefore yields wrong results.
      
      The bug has be fixed by replacing the test by 
      
      if (abs(qe).gt.occtol)
      
      in all diag*.F routines.
        ------------------------------------------------------------
        revno: 162.1.42
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Fri 2008-04-11 15:04:26 +0000
        message:
          Fixed bug affecting MP occupation smearing
          Fixed a bug (reported by Francois Willaime of CEA/Saclay)
          which affected calculations in metals using the Hermite-Gauss
          broadening scheme proposed by Methfessel and Paxton
          (OccupationFunction MP).
          
          The following test on state occupancy was performed:
          
          if (qe.gt.occtol)
          
          where qe is the state occupancy, and occtol, the tolerance (set to
          10**-12 by default).  If one uses the Methfessel-Paxton smearing, qe
          may take negative values and this test therefore yields wrong results.
          
          The bug has be fixed by replacing the test by 
          
          if (abs(qe).gt.occtol)
          
          in all diag*.F routines.
        ------------------------------------------------------------
        revno: 162.1.41
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:34:33 +0000
        message:
          Changes to the Order-N section by Pablo Ordejon
          The calculation of the chemical potential to start the O(N) process
          has been updated.
        ------------------------------------------------------------
        revno: 162.1.40
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:33:55 +0000
        message:
          Better MPI communication in writewave. Denchar warning
          Point-to-point instead of collective operations used.
          
          Added warning about non-parallelization of denchar.
        ------------------------------------------------------------
        revno: 162.1.39
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:33:24 +0000
        message:
          Fix dimension of dpr in pdosg. Clarify names of variables in pdos.
          In pdosg, dpr was wrongly dimensioned to no_l (modern notation) instead of no_u.
          
          More work is needed in the naming of variables.
        ------------------------------------------------------------
        revno: 162.1.38
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:20:41 +0000
        message:
          Fix index in write statement in iohs in parallel
          (This is similar to the bug fix for 2.0.1, but applying to
          other array).
        ------------------------------------------------------------
        revno: 162.1.37
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:20:09 +0000
        message:
          Origin shift was applied after possible coordinate scaling
          In routine coor, the origin shift was applied after the section in
          which the coordinates are re-scaled (from Ang to Bohr, or from fractional
          to cartesian, etc). However, it is clear in the manual that the shift
          vector is in the same units and format as the input coordinates.
          
          The shift is now applied right after reading the coordinate block.
          
          NOTE: This does not apply to the Zmatrix routine, which has *its own*
          conventions for origin shift, neither to coordinates read from an XV
          file or a Struct file.
        ------------------------------------------------------------
        revno: 162.1.36
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:19:34 +0000
        message:
          Initialize a variable before using it in Src/kgridinit.F
          Changes:
                          Initialize "genlogic" to .false. before it's used.
          
          Modified files:
          
                          Src/kgridinit.F
        ------------------------------------------------------------
        revno: 162.1.35
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:18:55 +0000
        message:
          New .make files and scripts. Update reference outputs
          * Updated intel .make files.
          * New sge script.
          * Updated reference outputs
        ------------------------------------------------------------
        revno: 162.1.34
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:18:14 +0000
        message:
          Fix tag in MPI send/receive in mulliken
          * The undefined variable 'io' was used as tag... changed to itot, the
          orbital index.
          
          * Trimmed mpibuff before writing.
        ------------------------------------------------------------
        revno: 162.1.33
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:15:56 +0000
        message:
          Wrap several I/O operations for MPI. Other parallel fixes
          * The calls to io_close in iohs.F were not restricted to the master node.
          
          * Wrap output in broyden_optim.F
          
          * Fix allocation of temporary array in savepsi in parallel
          
          Some nodes might not have any occupied orbitals assigned to them, so
          one has to be careful in the allocation of a buffer array in MPI.
          Allocate using the dimensions on the master node.
          
          * Add 'show_distribution' routine to warn (for now) the user
            when there are nodes which do not handle any orbitals.
          
          * Add experimental 'compare' target to Makefile.
          
          * Add 'born_spin' test.
        ------------------------------------------------------------
        revno: 162.1.32
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:14:40 +0000
        message:
          Fix units in Util/Optical/optical. Bug fix in writewave.F
          (Daniel Sanchez)
          
          Optical.f is a program to analyze the file .EPSIMG and obtain the
          optical properties. A unit conversion was done from eV to Ry instead
          of to Ha.
          
          (Julian Gale)
          
          The code in writewave.F has been cleaned up a bit and a fix for a bug
          appearing in parallel execution has been fixed.
        ------------------------------------------------------------
        revno: 162.1.31
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2008-01-20 19:13:18 +0000
        message:
          Fix for k-point update when kgrid_cutoff is used. Vol2 fix.
          The user can specify a kgrid_cutoff or a Monkhorst-Pack grid
          to determine the k-point sampling. 
          
          If a MP grid is specified and there are unit-cell changes during the
          calculation, the k-point set does not change (in fractional
          reciprocal-lattice coordinates). The sampling accuracy changes
          implicitly.
          
          On the other hand, the k-point set should change in principle if a
          kgrid_cutoff has been given and the cell volume changes, but due to a
          programming error the k-point grid was fixed after the first
          iteration.
          
          The error affects variable-cell calculations specifying a
          kgrid_cutoff.
          
          The k-point grid used for achieving self-consistency is now
          re-computed inside the geometry loop if:
          
          The calculation is a cell-optimization one (i.e., if MD.VariableCell
          is .true.), or if it is a "siesta-server" run. This is the old default.
          
          Additionally, if the user sets the fdf flag "ChangeKgridInMD" to
          .true., the grid will be recomputed also during MD runs that potentially
          change the unit cell: Parrinello-Rahman, Nose-Parrinello-Rahman, and
          Anneal.
          
          A user might want to avoid sudden changes in the k-point set
          while performing molecular dynamics runs or cell optimizations,
          notably if the calculations are not very well converged. In that
          case a MP grid, and not a kgrid_cutoff, should be specified.
          
          A related problem that has been fixed in this patch is the 
          possible overriding of the user's MP displacement specification after
          the first iteration.
          
          There is no backwards compatibility after this bugfix. To recover the
          old behavior when a kgrid_cutoff was specified, the user should check
          the old output, extract the information about the MP grid generated
          automatically by the program, and put it in an MP block.
          
          * Initialize vol2 correctly in m_check_supercell.f
          The bug could lead to different paths for supercell creation,
          causing small numerical differences.
          
          * New test: born
        ------------------------------------------------------------
        revno: 162.1.30
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Tue 2006-12-19 16:19:08 +0000
        message:
          Siesta-2.0.1 fix release
        ------------------------------------------------------------
        revno: 162.1.29
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Tue 2006-12-19 16:10:36 +0000
        message:
          Fix error in findp. Allow user control of fix
          A programming error has been fixed in routine findp, which is used in
          the automatic generation of multiple-zeta orbitals with the split-norm
          method.  The fix leads to slightly different basis orbitals, leading
          to small differences in energies and other magnitudes.
          
          In order to make it easier to compare with previous calculations,
          a new symbol, PAO.Keep.Findp.Bug, is now read. If .true., the old
          code in findp is enabled.
          
          * New test:
          
            h2o_findp_bug
        ------------------------------------------------------------
        revno: 162.1.28
        committer: Alberto Garcia <albertog@icmab.es>
        timestamp: Sun 2006-12-17 15:58:47 +0000
        message:
          Fixes for NAG compilation 
          * NAG compiler on Mac:  f90_unix_proc module needed 
            in fsiesta.f90. This file had to be renamed to 
            fsiesta.F90
          
          * Added new Src/Confs/macosx-nag-cdf.sh file.
    ------------------------------------------------------------
    revno: 192.1.64
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 18:20:31 +0000
    message:
      Remove residual (k,-k) pairs of k-points
      The original algorithm sometimes left pairs of k-points related
      by inversion. A new routine "trim_kpoint_list" in find_kgrid.F
      now takes care of them.
      
      A file NON_TRIMMED_KP_LIST is created with the "raw" list produced
      by the first part of the process, for debugging purposes.
      
      NOTE: Some pairs are *still* not removed properly. A fix is in the works.
      
      Credits: Eduardo Machado (CEA) implemented a preliminary version
               modifying the original algorithm.
      
      * Write KP file unconditionally (regardless of WriteKpoints setting)
    ------------------------------------------------------------
    revno: 192.1.63
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 18:13:14 +0000
    message:
      Assorted geometry-related cosmetic fixes
      * Do not pretend to update zmatrix info during MD runs
      
      The zmatrix form of structural information is only kept up
      to date when performing geometry relaxations. In molecular
      dynamics runs, only the cartesian coordinates are updated, and
      the zmatrix variables are kept frozen at their initial values.
      
      This is potentially confusing, so a warning is now issued and
      the zmatrix "updates" are no longer printed.
      
      * Fix shape script in Utils/MD
      
      * Compute bond information for all server steps
      
        If the server option is used, the program will compute the bond-length
        information at every step. 
      
        The first file has now extension ".BONDS_INITIAL", and every successive 
        one, simply ".BONDS". The final one is still "SystemLabel.BONDS_FINAL".
      
      * More flexibility and error detection in reading of atomic coordinates
      
      (Patch by Andrew Walker)
      
      In coor.F, new logic has been implemented to detect malformed input lines
      in the AtomicCoordinatesAndAtomicSpecies block. As a by-product, comments
      and blank lines can now be present in the block.
      
      
      (Unrelated)
      
      * Temporarily move xml-pseudopotential to xmlparser directory
        The file is not ready for production, but could interfere with the
        automatic dependency analysis.
    ------------------------------------------------------------
    revno: 192.1.62
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 18:00:10 +0000
    message:
      Generalized SCF convergence criteria. Optional enforcement
      New criterion for SCF convergence based on the Harris energy. This
      is useful if only energies are needed, as the Harris energy tends
      to converge faster than the Kohn-Sham energy.
      
      This new criterion joins the two already implemented:
      
      - The standard criterion is based on the convergence of the density
      matrix, with the relevant parameter being DM.Tolerance.
      
      - Optionally, one can require that the total energy changes are
      also below a prescribed tolerance:
      
      DM.RequireEnergyConvergence T
      
      In this case, DM.EnergyTolerance is the total-energy tolerance
      
      The new criterion is requested by
      
      DM.RequireHarrisConvergence  T
      
      DM.HarrisTolerance is the harris-energy tolerance (default 1e-4 eV)
      
      (Note that DM convergence is not needed in this case).
      
      The user is responsible for using the correct energies in further
      processing, e.g., the Harris energy if the Harris criterion is used.
      
      To help in basis-optimization tasks, a new file BASIS_HARRIS_ENTHALPY
      is provided, holding the same information as BASIS_ENTHALPY but using
      the Harris energy instead of the Kohn-Sham energy. 
      
      
      The energy criteria are implemented using "convergers", new objects
      defined and implemented in m_convergence.f90. It is probably overkill
      as of now, but it can be enhanced to provide new functionality.
      
      
      *  Added Andrew Walker's patch for convergence enforcement
      
      If the fdf symbol SCFMustConverge is set to 'true', the program will abort
      if convergence is not achieved after the specified number of iterations
      (set with MaxSCFIterations, or currently 50 by default).
      
      * Added explicit support for flush and abort for gfortran in pxf.F
    ------------------------------------------------------------
    revno: 192.1.61
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 17:35:45 +0000
    message:
      Patch by Andrew Walker for maximum wall-clock time
      If MaximumWallClockTime is set (to a time specification of
      the form 
      
           15 s
           7  mins
           2  hours
           3  days 
           ...      )
      
      the program will abort if the specific wall-time is exceeded.
      The checks are done with the granularity of the calls to 'timer' (i.e.,
      there might be some slack). If the maximum time is 0 (the default), or is
      negative, the time is unlimited.
      
      
      * Added -DFC_HAVE_FLUSH -DFC_HAVE_ABORT to the gfortran*.make files
    ------------------------------------------------------------
    revno: 192.1.60
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 16:36:16 +0000
    message:
      Integration of new STM-images code. Better makefiles.
      Util/STM/ol-stm contains the code by Pablo Ordejon and Nicolas Lorente
      that implements the Tersoff-Hamann approximation to STM images, with a
      previous step of extrapolation of wave functions from a reference
      plane. It is thus more accurate than the simple code to be found now
      in Util/STM/simple-stm.
      
      Note that for now the fftw3 library needs to be available for this
      code to work.
      
      Bug fixes found upon integration:
      
      - Bug fix in Util/STM/ol-stm/Src/extrapol.f: the interpretation of the
      layout of the lattice vectors in the "cell" array was wrong.
      
      - fftw3 "estimation" call moved outside a loop in extrapol.f (there is
      more scope for optimization here).
      
      * The makefiles for several utilities have been streamlined,
      and the compilation of the ol-stm program uses a VPATH
      functionality to avoid duplicating code in the top-level
      Src directory. The old neighb/ranger routines are retained for now.
      
      Some changes were needed to implement this correctly:
      
      iodm.F: 
      
      - Removed support for old-style control files.
      - Wrapping of LocalToGlobalOrbital call in iodm.F in a MPI preprocessor block.
      
      spher_harm.f: Used dot_product instead of ddot.
      
      * Other changes:
      
      Src/Sys/cscs-ibm-blanc.make: netcdf compilation.
      Util/Grid/makefile: more targets, FC_SERIAL support.
      Util/Macroave/Src/Makefile: FC_SERIAL support.
      
      Fix for Finisterrae .make file and .sge script in Tests/Scripts.
    ------------------------------------------------------------
    revno: 192.1.59
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 15:52:48 +0000
    message:
      A faster diagk with eigenvector storage
      The  new k-point-mode diagonalization routine diagk_file stores
      the eigenvectors on file to avoid re-computation after fermi-level
      determination. The file is in netCDF form, allowing a more
      flexible dispatching of eigenvectors to and from the master node.
      (At the time of building the new density matrix, the eigenvectors
      are read by and transferred from the root node in blocks.)
      
      This routine should be very useful for relatively large systems, but
      the speedup is noticeable for all but the very small.
      
      In order to use the new routine, netCDF support should be compiled in,
      and the symbol UseNewDiagk must be set to "true" in the fdf
      file. Specifying a number of eigenvectors to store is possible through
      the symbol NumberOfEigenstates. Note that for now, for safety, all
      eigenvectors for a given k-point and spin are computed by the
      diagonalization routine, but only that number specified by the user
      are stored. If they are insufficient, the program stops.  A rule of
      thumb to select the number of eigenvectors to store is to count the
      number of electrons and divide by two, and then apply a "safety
      factor" of around 1.1-1.2 to take into account fractional occupations
      and band overlaps.
      
      A new file "OCCS" is produced with information about the number of
      states occupied.
      
      Note that this routine is NOT yet set up to be used for band-structure
      computations, or to "write out" wavefunctions. It should only be used
      in the SCF loop, i.e., from routine "diagon". 
      
      The old diagk routine is kept, for use in smaller systems and to be
      called from driver routines which provide other functionality.
      
      The size of the transfer block is set to n_eigenvectors/Nodes (note
      that the user is responsible for setting n_eigenvectors). The loops in
      the density-matrix building section have been rearranged. Now each DM
      scan loop (with potential inefficiencies for indirection) has more
      work to do, and it is no longer cost-effective to fill the dense
      matrices Dk and Ek first.
      
      The size of the block could in principle be increased for free to
      Min(no_l), and psi_block made into a pointer to Haux. Preliminary
      tests seem to indicate a lower performance, however (?).
      
      To Do:
      
      Clarify the use of work arrays. Haux and Saux should probably be allocated
      inside the diagonalization routines, and not in diagon.
      
      
      * The timing sections have been split into "build HS", "eigenvalues/eigenvectors"
      and "buildD" components.
    ------------------------------------------------------------
    revno: 192.1.58
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 13:51:22 +0000
    message:
      NetCDF I/O of Grid magnitudes. Charge-density re-starts
      The new module iogrid_netcdf implements a general-purpose dumper of
      grid magnitudes in netCDF format. If netCDF support is enabled, files
      with extension .grid.nc are produced for whatever grid magnitude is
      requested to be saved by the user (charge density (Rho), deformation
      density (DeltaRho), potential, etc).
      
      The use of grid descriptors for each node and the addressable netCDF
      file format greatly simplify the communication needs for the output of
      grid variables. Module iogrid_netcdf implements a "grid descriptor
      calculator" for the standard uniform distribution, but the routine
      which outputs grid functions is in principle able to work with any
      distribution.
      
      Util/Grid contains new utilities for conversion and analysis
      of the .grid.nc files.
      
      If the keywords SCF.Read.Charge.NetCDF or
      SCF.Read.Deformation.Charge.NetCDF are true, the charge density
      (respectively the deformation charge density) is read from file
      Rho.IN.grid.nc (respectively DeltaRho.IN.grid.nc).
      
      This feature allows the easier re-use of electronic-structure
      information from a previous run. It is not necessary that the basis
      sets are "similar" (a requirement if density-matrices are to be read
      in). The deformation charge is particularly useful to give a good
      starting point for slightly different geometries.
      
      To Do:
      
      - Improve the handling of possibly conflicting features, such as the
      use of the Harris functional or the mixing of the DM after the first
      iteration.
      
      - Extend the flexibility of the reading options (to use them, for
      example, in molecular dynamics or phonon calculations). Currently the
      density is only read once, at the beginning of the run.
      
      - Support reading of charge densities in FFT boxes of different sizes
        (via resampling). Auxiliary code for this is in Util/Grid/cdf_fft.f90.
      
      
      
      IMPLEMENTATION NOTES:
      
      The grid magnitudes are stored in single precision in the .grid.nc files.
      
      
      *  Added .make and script file for Finisterrae at CESGA
      
      *  References to the NetCDF directory under Src and to NETCDF_INTERFACE
         in the Makefile have been removed. The interface provided by NetCDF itself
         is now used.
    ------------------------------------------------------------
    revno: 192.1.57
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 13:02:23 +0000
    message:
      Bug fix in grid2val. Added permute program to Macroave suite.
      
      * Fix bug in grid2val (utility to compute values of grid functions
        at arbitrary points).
      
      The cell vectors were declared as single precision, while in fact they
      are stored as double precision by Siesta.
      
      Added also tips on compilation.
      
      * Added permute.F program to Macroave suite
      
      Sometimes it is useful to have "x" as the direction perpendicular to 
      the slab. Macroave is hard-wired to work with "z", so the program 
      "permute.F" has been written to carry out a preliminary rotation of
      the axes in the grid file. 
      
      Streamlined the compilation steps in Util/Macroave/Src.
    ------------------------------------------------------------
    revno: 192.1.56
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sun 2008-06-29 12:50:34 +0000
    message:
      NetCDF I/O for DM, H, and S
      Experimental support for DM output in netCDF form, optionally with
      complete history of a SCF cycle.
      
      The netCDF format allows for flexible and portable I/O, and supports
      the extension of arrays into a "time-record" dimension. 
      
      A DM-only netCDF file (DM.nc) with the same information as the
      traditional DM file is created if Write.DM.NetCDF is 'true' (default
      with netCDF support). In this case, the DM values are written in
      routine mixer (as is common practice in Siesta, despite the fact that
      the resulting DM does not correspond to the last electronic structure
      computed).
      
      If WriteDMHS.NetCDF is true (default with netCDF support), a DMHS.nc
      file containing the overlap matrix S, DM_in, H, and DM_out is written
      to in compute_dm, right after the computation of DM_out.
      
      The default in both cases is not to use the optional time dimension
      and overwrite the previous SCF step's information.
      To keep the whole history of (the last) SCF cycle, use
      WriteDM.History.NetCDF  or WriteDMHS.History.NetCDF, respectively.
      The DMHS history might be useful to diagnose SCF convergence issues.
      (See new test Test/h2o_netcdf)
      
      With the new DM to netCDF (dm2cdf) and netCDF to DM (cdf2dm) converters in
      the Util/DensityMatrix directory, the information in the .nc files can be easily converted
      to and from the legacy DM format, allowing the re-use of DM information
      in computers with incompatible floating point formats.
      
      Util/SCF/dm.py is a simple example of processing of netCDF with a Python script.
      
      To use the netCDF functionality, Siesta must have been compiled with
      the appropriate netCDF libraries.  Example .make files can be found in
      the Src/Sys directory (notably gfortran-netcdf.make and
      marenostrum-mpi-netcdf-XX.make files).
      
      The .nc files can also be displayed with the shell utility "ncdump",
      installed by default when the netCDF library is compiled.
      
      
      IMPLEMENTATION NOTES:
      
      - The DM, H, and S information is stored in the .nc files in *single precision*.
      To change this in the future, an fdf symbol might be used to trigger the replacement
      of "float" by "double" in the definition of the variables in the netCDF files. Care
      should be taken to adapt all the other utilities. Single precision seems to be
      perfectly adequate, however.
      
      - No attempt has been made to optimize the memory use or allocation/deallocation
       overhead, giving priority to clarity. The netCDF format allows a huge simplification
      of the MPI communications involved in the I/O, so this is a minor issue.
      
      - The functionality is included in the iodm_netcdf.F90 and iodmhs_netcdf.F90 files.
        The new flags are stored and processed in the siesta_options.F90 module.
    ------------------------------------------------------------
    revno: 192.1.55
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Tue 2008-05-06 10:46:24 +0000
    message:
      Update of atom to 3.2.8: xml, optimization hooks, tutorial update.
      * Integrated Javier Junquera's XML-generating routines
        Added pseudoXML.f and supporting files.
        (Note that the XML support in Siesta itself is not yet implemented, 
        pending retroffiting of the VCA and other enhancements. The relevant
        files have been put in a new directory 'Src/pseudo-xml'.
      
      * Write pseudo wavefunctions in PSWFFMT
      
      * Updated version.h to include the variable "atom_id", now used
        in various places to set the creator string.
      
      * A simpler makefile has been written when XML support is not needed
      so that no symbols from the main Siesta directory need to be
      included. The full makefile is called makefile-xml. To use it it is
      only necessary to have built libwxml.a in the Src hierarchy of Siesta
      (after creating the necessary arch.make)
      
      * ATOM now recognizes the FREE_FORMAT_RC_INPUT directive, useful
      for optimization runs.
      
      * A new estimation of ps hardness (qmax) is written to FOURIER_QMAX file.
      
      * The fourier area calculation has been moved to the "down" section,
      since the "up" potentials are not always generated.
      
      * Avoid very small numbers that might need a three-character
      exponent field in formatted output.
      
      * The Tutorial has been brought up to date, using the version employed
      in the latest Siesta schools. Note that the location of the
      scripts used to run the examples has changed. They are now in the
      Pseudo/atom/Tutorial/Utils directory.
      
      * Extended the periodic-table structures in input.f and nucl_z.f
    ------------------------------------------------------------
    revno: 192.1.54
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Tue 2008-05-06 10:25:52 +0000
    message:
      Make the production of small ionic files optional -- fdf.log
      * Files with prefix ORB, KB, CHCORE, SPLIT_SCAN, etc, and
      pseudopotential dump files, which are useful for plotting basis
      orbitals and other ion-related information, are now optional. To
      create them, the user should set
      
       WriteIonPlotFiles T
      
      in the fdf file.
      
      Note that the same functionality is available in gen-basis.
      
      The corresponding option variable "write_ion_plot_files" is now kept
      in an "atom-specific" options module, to avoid a dependency cascade.
      
      * Fixed the makefile sections for some auxiliary programs.
      
      * The file "out.fdf" has been renamed to "fdf.log"
    ------------------------------------------------------------
    revno: 192.1.53
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Wed 2008-04-09 08:06:02 +0000
    message:
      Implemented a Grimme-type  molecular-mechanics potential for dispersion effects
      A dispersion potential of the Grimme type (similar to the C6 type but
      with a different damping function) has been implemented. See
      S. Grimme, J. Comput. Chem. Vol 27, 1787-1799 (2006)).
      
      The parameters are specified in the MM.Potentials block, using the
      "Grimme" keyword.
      
      Hooks for changing the "d" and "s6" parameters are provided
      (MM.Grimme.D and MM.Grimme.S6).
      
      A minor cosmetic addition: the kind of molecular mechanics potential
      between species is now printed upon encoutering the relevant line in
      the block.
    ------------------------------------------------------------
    revno: 192.1.52
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Tue 2008-04-08 14:53:26 +0000
    message:
      Changes for portability and cosmetics 
      Patches applied:
      
      Portability:
      
        *  Use character(*) in MPI character modules.
      
             Previously character(1) was used, leading to complaints by some compilers.
      
      Usability:
      
        *  Extra fdf symbol for struct_file input specification
      
             The manual mentions "Use.Struct.File" as the relevant alias, but
             the code used "MD.Use.Struct.File". Both are now accepted.
      
      Makefile and makefile templates:
      
        *  Fix mixps section in Makefile
        *  Add .make file for snake at ICMAB
        *  Fix tabs in eth-hreidar-mpi.make
    ------------------------------------------------------------
    revno: 192.1.51
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sat 2008-03-08 23:45:12 +0000
    message:
      Remove 'multiple images' warning in gamma-point-only calculations
      
      The calculation of the xij array (vector distances to interacting
      neighbors) was enabled in 2.5.1 also for the case of gamma-point-only
      calculations. This is needed for the post-processing of COOP curves.
      In a gamma-point-only calculation several atoms might still
      see images of themselves as interacting if the cell is not that
      big. The xijorb code warned about that, even though the calculation of
      the matrix elements is of course correct, as k=0 and there are no
      phase factors to worry about. The warning has been now turned off.
    ------------------------------------------------------------
    revno: 192.1.50
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Sat 2008-03-08 23:43:29 +0000
    message:
      Fix the constraint of static C.M. in initial velocities
      Routine vmb sets the initial velocities according to an approximate
      Maxwell-Boltzmann distribution, with the extra constraint of static
      center of mass. Due to an oversight, the routine only enforced this
      constraint for the case of a single species. It has been fixed.
    ------------------------------------------------------------
    revno: 192.1.49
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Fri 2008-01-11 16:22:45 +0000
    message:
      Proper fix of cell management for zmatrix case. Enthalpy cosmetics
      A recent previous patch broke the unit cell handling in the zmatrix case.
      It has been fixed.
      
      The assorted "enthalpy" output has been rationalized,
      reserving the use of the word "enthalpy" for the original case
      of "target enthalpy".
      
      (Fixed syntax error in std-test.mk)
    ------------------------------------------------------------
    revno: 192.1.48
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Fri 2008-01-11 13:57:57 +0000
    message:
      Make diagonalization the default solution method regardless of size
      Make diagonalization the default solution method regardless of system size.
    ------------------------------------------------------------
    revno: 192.1.47
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Fri 2008-01-11 13:52:05 +0000
    message:
      Fix test.mk scripts
      The std-test.mk script did not copy the output file to the main test directory.
      The bsc-test.mk did not remove all the scratch files.
      
      Fixed a typo in the input to the si2x1h test.
    ------------------------------------------------------------
    revno: 192.1.46
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Fri 2008-01-11 13:41:37 +0000
    message:
      Fix for structural supercell construction
      Due to the accidental mis-use of a module variable, the routine coor
      did not generate the supercell correctly when a %supercell block was used.
      
      Added and additional warning if such a block is used when the structure is
      input in Zmatrix form.
    ------------------------------------------------------------
    revno: 192.1.45
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Mon 2007-12-17 14:26:08 +0000
    message:
      Fix memory leak in dhscf
      The array dvxcdn was allocated but never deallocated in dhscf. Actually,
      it was never used in cellxc, so it has now been dimensioned trivially
      to (1,1,1). The bug was introduced in the bsc-master-2.1 branch, at 
      patch 27.
    ------------------------------------------------------------
    revno: 192.1.44
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 22:50:35 +0000
    message:
      New 'fdf' target in Makefile for tests.
      (E. Anglada)
      
      New target for the test option: fdf calls. 
      Requested by BSC so they can test the new fdf.
      
      New files (new tests and missing xml output files for reference)
      A/ Tests/var_cell_stress
      A  Tests/Reference-xml/fire_benzene.xml
      A  Tests/Reference-xml/si_coop.xml
      A  Tests/var_cell_stress/.arch-ids/=id
      A  Tests/var_cell_stress/.arch-ids/makefile.id
      A  Tests/var_cell_stress/.arch-ids/var_cell_stress.fdf.id
      A  Tests/var_cell_stress/.arch-ids/var_cell_stress.pseudos.id
      A  Tests/var_cell_stress/makefile
      A  Tests/var_cell_stress/var_cell_stress.fdf
      A  Tests/var_cell_stress/var_cell_stress.pseudos
      
      
      Modified files
      M  Src/siesta_move.F : remove debug info
      M  Src/remove_intramol_pressure.f90 : remove debug info
      M  Tests/std-Makefile Xmlcheck enabled by default. New targets: fdf, all
      M  Tests/std-test.mk 
      M  Tests/si2x1h/si2x1h.fdf New option
      M  Src/atom.f  Remove debug info.
      
      (replayed patch 6 from outlier branch ref-2.4)
    ------------------------------------------------------------
    revno: 192.1.43
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 22:40:45 +0000
    message:
      xml tester update (Eduardo Anglada)
      New files:
      A  Src/xmlparser/corresponding_node.f90
      A  Src/xmlparser/string_utilities.f90
      
      Changes in the xml output:
      M  Src/state_analysis.F
      M  Src/siesta_move.F
      M  Src/setup_hamiltonian.F
      M  Src/siesta_forces.F
      M  Src/scfconvergence_test.F
      M  Src/post_scf_work.F
      
      Changes in the xml tester:
      M  Src/wxml/m_wxml_core.f90
      M  Src/wxml/flib_wstml.f90
      M  Src/xmlparser/makefile               
      M  Src/xmlparser/m_dom_element.f90
      M  Src/xmlparser/m_strings.f90
      M  Src/xmlparser/compare_m.f90
      M  Src/xmlparser/test.f90
      
      Changes in the tests makefiles
      M  Tests/std-Makefile
      M  Tests/std-test.mk
      
      Upgraded xml reference outputs:
      ...
      
      (replayed patch-5 from outlier branch ref-2.4)
    ------------------------------------------------------------
    revno: 192.1.42
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 21:46:40 +0000
    message:
      Fixes for denchar compilation and wavefunction output
      * The makefile section for denchar had several errors.
      
      * siesta_analysis used maxwk as a local variable, instead of importing
        it from writewave, thus preventing the call to wwave from working.
      
      * (NOTE: the need for a lattice constant or cell vectors in the fdf file
         if the wavefunctions need to be output should be removed)
      
      (replayed patch-4 of outlier branch ref-2.4)
    ------------------------------------------------------------
    revno: 192.1.41
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 21:36:31 +0000
    message:
      Fixed computation of chemical potential in O(N) (P.Ordejon)
      * Chempot, rather than updated, has been substituted by the version
      in the "cecam" branch of the 2.0 fixes branch. However, some constructions
      have been updated to the post-BSC-cleaning structure:
      
      - Use of the smarter mneighb routine.
      - Some arrays are now pointers instead of allocatables.
      
      * A new test (Tests/h2o_4) has been added.
      
      * NOTE that the new code does not yet work in Parallel.
      
      (replayed patch-3 of outlier branch ref-2.4)
    ------------------------------------------------------------
    revno: 192.1.40
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 21:34:42 +0000
    message:
      Optimization enhancements (fire algorithm, step control).
      
      * Step-size control has been add to the Broyden optimizers (Standard, ZM,
        and Cell-only). There is no theoretical justification for this procedure,
        so the Hessian is not likely to improve very much... it is probably best
        to combine a size-limited CG series with another small-Jinv Broyden series.
      
      * New FORCE_STRESS for direct output of the energy, forces, and stress
        (in internal Siesta units).
      
      * Re-implemented the FIRE optimization algorithm, both for geometry
        and (experimentally) for SCF.
      
        The advantages for the SCF mixing are:
      
        * Trivial algorithm (also in parallel)
        * Initial dt can be just set to alpha. 
        * Adaptive changes to alpha.
        * There should be no need for kicks.
      
        (Set DM.FIRE.Mixing to T to enable)
        Could also set DM.Fire.Nmin  to 2, 3, 4  instead of the default 5
        (Actually, this number could be akin to the DM.Number{Pulay,Broyden}...)
      
      * Added .make files for opterons and matgas cluster at ICMAB in parallel.
      
      * Compilation fixes(uncovered by a new version of g95)
      
        * External statements referring to obsolete names
        * Continuation lines.
        * Statement order.
      
      (replayed patch-2 of outlier branch ref-2.4)

    ------------------------------------------------------------
    revno: 192.1.38
    tags: siesta-2.5.0
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 21:28:08 +0000
    message:
      tag of siesta@uam.es--2006/siesta-devel--reference--2.3--patch-2
    ------------------------------------------------------------
    revno: 192.1.37
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Thu 2007-11-22 17:19:37 +0000
    message:
      Add a proper account of the BSC changes that went into the merge
      In the Docs/CHANGES file, a new section detailing the changes made
      along the BSC branches has been prepared, and the history of the
      reference--2.1 branch after the branching has been reinstated.
      The BSC section is in chronological order, to ease the understading.
    ------------------------------------------------------------
    revno: 192.1.36
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Wed 2007-11-21 11:45:49 +0000
    message:
      Direct merge into master branch of initial BSC changes
      The changes along the BSC branches, up to the end of the restructuring
      of siesta.F and associated changes, have been merged into a direct
      descendant of the main development line. The BSC work originally
      started as a branch of siesta-devel--reference--2.1--patch-29. Development
      along 2.1 continued, and a new continuation branch 2.3 has been created
      specifically for this merge.
      
      Main patches applied:
      
       * ref@bsc--2007/siesta-bsc--master--2.1--base-0
         tag of siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-7
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-1
         Use of xalast in analysis routines. Exit of geometry loop
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-2
         Creation of a module to hold the siesta options
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-3
         New geometry module
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-4
         New stub module for sparse matrices
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-5
         More options for running tests
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-6
         Encapsulation of k-point handling
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-7
         Initialize iza in struct_init
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-8
         Siesta_todo slimming by M. Quero
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-9
         Fix import of no_l in born_charge
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-10
         Some conversions to Fortran90 by M. Quero
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-11
         Fourth session at the BSC
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-12
         Clarification of the scope of the stress variables
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-13
         Creation of siesta_forces
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-14
         Replacement of some allocatables by pointers and automatics
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-15
         New m_energies and m_steps modules. Back to old k-point behavior
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-16
         Merge of removal of integer and real variables from siesta_todo
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-17
         Fixes for troublesome bugs in reference code
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-18
         Final cleanup of siesta_todo
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-19
         Add character(len=*) routines to alloc.F90
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-20
         Pointers in fixed and setspatial. si2x1h test added to bsc-Makefile
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-21
         Re-organization of pulay module
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-22
         Reorganization of hsparse/xijorb calls with new neighbor module
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-23
         VPATH-aware compilation for multiple executable versions
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-24
         Allocatables to pointers  I
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-25
         Allocatables to pointers  II
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-26
         Allocatables to pointers III
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-27
         Allocatables to pointers IV -- new neighbor code + nspecies fix
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-28
         Explicit array-ness in calls in initatom and cellxc
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-29
         Fix wrong allocations in cellxc.F
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-30
         Explicit array extents in initatom.f
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-31
         Avoid shrinking of density-matrix arrays for extrapol.
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-32
         Fix typo in state_init.F
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-33
         Execute SCF loop when nscf=1
      
       * ref@bsc--2007/siesta-bsc--master--2.1--patch-34
         Clarify bounds of SCF loop in siesta_forces.
      
       * ref@bsc--2007/siesta-bsc--master--2.2--base-0
         tag of ref@bsc--2007/siesta-bsc--master--2.1--patch-31
      
       * ref@bsc--2007/siesta-bsc--master--2.3--base-0
         tag of ref@bsc--2007/siesta-bsc--master--2.2--base-0
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-1
         Prepare CHANGES file
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-2
         Merge patch-log for patch-30 from 2.1
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-3
         New treatment of fractional atoms in VCA. Bug fix in lmxo
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-4
         Re-enabling of kgrid update in variable-cell calculations
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-5
         Fix typo in state_init.F
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-6
         Merge filtering package by Eduardo Anglada
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-7
         Add graphite_c6_full test for more realistic vdW test
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-8
         Add patchlog for k-point fix
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-9
         Fix of zmatrix code to deal with degenerate case
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-10
         Units conversion in Util/Optical/optical.f. Scripts. Cosmetics
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-11
         Implementation of basis_enthalpy calculation. Zmatrix dependency
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-12
         Option to use fractional rc's for multiple zeta
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-13
         Sync vpath changes. Update siesta.tex
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-14
         Fix tag in MPI send/receive in mulliken
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-15
         Option to use fractional rc's for multiple zeta
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-16
         Merge of XML tester by Eduardo Anglada. Portability fixes
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-17
         Fix marenostrum-mpi.make. Syntax in compare_m.f90
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-18
         MareNostrum fixes. zdrot to blas. obj_setup. compare_m syntax
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-19
         Sync to bsc--2.1. Change banner in CHANGES to bsc--2.3
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-20
         Execute SCF loop when nscf=1
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-21
         Refinements of XML tester. New ioncat program
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-22
         Undef var in kgridinit, iohs MPI write, pdosg array bound, Origin shift
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-23
         Zmatrix optimization enhancements. Sign change in MM stress.
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-24
         Clarify bounds of SCF loop in siesta_forces.
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-25
         Avoid MP-grid permutations in trivial gamma case
      
       * ref@bsc--2007/siesta-bsc--master--2.3--patch-26
         Sync to reference--2.1
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--base-0
         tag of siesta@uam.es--2006/siesta-devel--reference--2.1--patch-29
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-1
         First stage of siesta.F splitting at BSC
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-2
         Created struct_init for initial geometry setup. New test force_2
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-3
         Consolidate geometry updates at the end of loop
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-4
         Initialize vol2 correctly in m_check_supercell.f
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-5
         Kgrid setup streamlined. Bands. Proximity check. Hsparse allocation 
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-6
         Work by Manuel Quero before the meeting on Feb 7th
      
       * siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-7
         Moved the Born-effective-charge code
    ------------------------------------------------------------
    revno: 192.1.35
    committer: Alberto Garcia <albertog@icmab.es>
    timestamp: Tue 2007-06-12 08:04:53 +0000
    message:
      tag of siesta@uam.es--2006/siesta-devel--reference--2.1--patch-63

____________________________________________________________________
** CHANGES ALONG ref@bsc--2007/siesta-bsc--master--2.3
--------------------------------------------------------------------
(ARCH usage ended here)

2007-07-25 14:10:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-40

Summary: Proper behavior of fdf_string

fdf_string should return all the characters in the input line,
apart from the label, and it should not complain if the
return string is empty.

To fix this, a new function "characters" has been implemented
in fdf/parse.F90.

2007-07-20 22:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-39

Summary: Clarification of INCFLAGS for fdf compilation. Basis_io fix

* Removal of ionode test in basis_io.F.

* INCFLAGS now adds only "-I../" to the global INCFLAGS.

* Update of finisterrae.make

2007-07-20 21:30:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-38

Summary: Updated test.mk files. New finisterrae.make

Fixed test.mk files for use with standard input for fdf.

New finisterrae.make file.

2007-07-20 18:45:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-37

Summary: FDF can now process standard input

To recover the old fdf behavior, reinit now dumps
stdin to a temporary file. 

fdf_readcluster assumes that the root node is in charge of the input
file.

If MPI is enabled, the symbol CLUSTER is automatically
defined in fdf.F90.

2007-07-18 14:15:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-36

Summary: Change in internal representation of fdf lines

To avoid excessive dynamic memory use, the "parsed line" derived type
now uses a single MAX_LENGTH (currently 132) string to hold a line,
and two integer arrays of length MAX_NTOKENS (currently 50) to index
the positions of the tokens.

2007-07-18 12:15:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-35

Summary: Fixes in spher_harm interface and in matel

Routine ylmexp in spher_harm had an old-style assumed-size
specification for its last array argument. This was "needeed"
in order to be able to abuse the meaning of the argument:
the actual argument could be two-dimensional or one-dimensional
in the calls from matel.

Now, matel always calls the routine with a two-dimensional
array, which is moreover specified as

       F(:,column:)

in order to avoid the creation of array temporaries by the
compiler. 

The pointer FFY in matel has thus been redeclared with a dummy
first dimension  (typically allocated as FFY(1:1,1:ubound)).

In ylmexp, the interface has been changed, from

       real(dp), dimension(ir1:nr,*), intent(out)  :: flm

to
       real(dp), dimension(ir1:,:), intent(out)  :: flm

The lower bound ir1 is another of the arguments of the call,
so the proper lbound is used.

2007-07-17 22:45:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-34

Summary: Merged new fdf library and appropriate calls

The new fdf library by Raul de la Cruz has been merged. 
It has been necessary to change lots of fdf calls, notably
those dealing with old-style block reading.

Some issues remain:

* The name of the file to read from is HARDWIRED to "INPUT.fdf" for
now. Both bsc-test.mk and std-test.mk have been changed to reflect
this. The INPUT_DEBUG trick also works.

* Compilation in parallel must use the -DCLUSTER preprocessor
directive.

* There is still a bug in the reading of a Zmatrix.

* There are probably more bugs in sections of the code not
  exercised yet. Marenostrum compilation of this merged
  version has not been fully tested yet.

* The compiler makes temporary copies of arrays in some
  calls.

* The tla ids of the fdf files are new. Care should be taken
  when merging to the main trunk if the history is to be
  kept without breaks (even though the changes are so substantial
  that a clear break might be advisable...).

* The merge was done using a direct "tla apply-delta" with 
  (siesta-bsc) jacobi-davidson and fdf-work as FROM and TO,
  respectively, after having synched the fdf-work branch
  with previous work on master-2.3 and with jacobi-davidson.  
  A direct star-merge was precluded by this cherry-picking.

Patches applied:

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--base-0
   tag of ref@bsc--2007/siesta-bsc--master--2.3--patch-29

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-1
   Merge of fdf changes by Raul

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-2
   Second patch by Raul

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-3
   Re-used MPI pre-processor macro in fdf

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-4
   Fixes for is_integer, fdf_physical, INPUT.fdf

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-5
   Synch to master-2.3-31

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-6
   Synch to jacobi-davidson-patch-2

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-7
   Synch to jacobi-davidson-patch-3 (allocs)

 * ref@bsc--2007/siesta-bsc--fdf-work--2.3--patch-8
   Synch to jacobi-davidson-11. Compilation and test fixes

2007-07-17 18:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-33

Summary: Fix spher_harm interface. Tests and .make for Jacobi-Davidson

* spher_harm has gone back to the version before allocation optimization.
  Some very strange interaction with matel resulted in crashes and
  bad results. The issue is still under investigation.

* New test h2o_jacobi.

* Src/Sys/marenostrum-mpi-metis-64.make

2007-07-17 17:30:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-32

Summary: Fixes to grid-work. Jacobi-Davidson. Alloc changes

Omnibus patch:

--- Some fine-tunning of the grid-load-balancing work.

--- Implementation of the Jacobi-Davidson algorithm
    More work is needed to improve the convergence
    and to generalize it to non-gamma-point calculations
    and to mixed-spin calculations.

--- More conversions of allocatables to pointers.


NOTE: Some issues (matel, spher_harm intefaces) remain. 
      They will hopefully be fixed in the following patches.

Patches applied:

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-1
   Removed obsolete grid-work routines

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-2
   Added Jacobi-Davidson-related routines

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-3
   Mostly memory allocation changes, except atomic routines

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-4
   Update of gmres in jacobi-davidson

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-5
   Avoid excessive number of allocs/deallocs in spher_harm

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-6
   Change in array calling format for ylmexp in matel

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-7
   Temporary scaffolding for continuation after Jacobi-Davidson diag.
   (Not really used. Rogeli Grima implemented it in his own way)

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-8
   Fixes for serial compilation. Continue in diagg

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-9
   Matel: ylmexp calling sequence changed again

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-10
   Avoid allocating zero-size array in matel.

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-11
   Add lapack routines to Libs/ . Cosmetic fixes

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-12
   Fixes for serial compilation

 * ref@bsc--2007/siesta-bsc--jacobi-davidson--2.3--patch-13
   Implementation of density-matrix construction in jacobi-davidson

2007-07-12 13:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-31

Summary: Integration of grid-work by Rogeli Grima up to May 20, 2008

Commit log for ref@bsc--2007/siesta-bsc--grid-work--2.3--patch-4
Integration of work by Rogeli Grima up to April 10, 2008


* More "reset" routines to liberate arrays from several
  modules in a new routine "siesta_end":

      use m_pulay,         only : resetPulayArrays
      use moreMeshSubs,    only : resetMeshDistr
      use densematrix,     only : resetDenseMatrix
      use sparse_matrices, only : resetSparseMatrices
      use m_matel,         only : resetMatelArrays
      use meshdscf,        only : resetDscfPointers
      use m_diagon,        only : resetDiagonPointers
      use m_fixed,         only : resetFixedPointers

* Use explicit upper bounds in arrays when they are arguments of a routine,
  instead of the a(lb:) syntax (atom.f, initatom.f...)

* Turn matel into a module and make {x,y,z}phiatom private routines.

* Use pointers instead of allocatable arrays in more places (this task is not yet completed).

* Cosmetic changes (whitespace) in several places.

Assorted Bug fixes:

* It is now possible to compile the code in serial form.

* Bug fix in dipole and efield: The new option to partition the mesh
along X was not taken into account.

* Bug fix in dhscf: Upon entry to cellxc, the data should be in "non-clustered" form.

* Extra auxiliary array in the call to integrator in arwf.

* parallelsubs and rhooda now have extension .F since they contain (temporarily?) preprocessor 
  directives.

* distriphionmesh.F : some re-ordering of preprocessor ifdefs to avoid undeclared (or not set intent(out))
  variables in serial compilation.

   [ Some problems remain:
                                Array BOX is wrongly dimensioned when using 1 processor.
                                Efield code does not work well yet
   ]

Commit log for ref@bsc--2007/siesta-bsc--grid-work--2.3--patch-5
Some changes by Rogeli, up to May 20, 2008

arw:    Conversion to dp
distriphionmesh:  mpi defs
efield:  Cosmetics 
normalize_dm: cosmetics 
overlap:  Initialize Si (not really needed) + cosmetics
scfconvergence_test: timing cosmetics
siesta_forces: remove timing of scf_convergence_test


Commit log for ref@bsc--2007/siesta-bsc--grid-work--2.3--patch-6
Added MPI interfaces for eight-byte integers

recomputelmesh.F and moremeshsubs.F need to use eight-byte integers. Added
the proper MPI interfaces. 

Precision.F now defines the parameter "i8b" to represent eight-byte integers.

NOTE: For maximum portability, we need to replace "integer*8" by the
appropriate kind in "MPI/generate.sh".

(+ updated CHANGES file with documentation of latest commits)

2008-02-14 10:44:41 GMT	Alberto Garcia <albertog@icmab.es>	patch-30

Summary: Merge of grid-load-balancing work by R. Grima

The grid is now split across all three dimensions.
New distribution "yes/or/no" optimal for cellxc, plus stencil
capabilities.

* Initmesh:
C     Reset previous mesh distributions
      call resetMeshDistr( )
C     Create the first mesh distribution
      call initMeshDistr( nm=nm, oDistr=oDistr )
C     Find and sets local number of Mesh points of each kind
      call setMeshDistr( oDistr, nsm, nsp, nml, nmpl, ntml, ntpl )


* distriPhiOnMesh:
   We compute numphi: "number of orbitals with weight on each grid point"

   Routine initMeshDistr creates two new partitions:

     -> distribution 2: For rhoofd and vmat. load=numphi^2
     -> distribution 3: For cellxc. load : if (numphi>0) load=1 else load=0

   If we need a stencil in cellxc, we will also set up a communications list 
   with initMeshExtencil.

* dhscf_init
    call setMeshDistr( 2,...) => We fix the 2nd distribution to generate  "Phi"

    call setMeshDistr( 1,...) => We select the 1st (uniform) distribution to call 
                                 Poison
    call distMeshData( 2, rhoatm, 1, rhoatm_seq, +1 ) => We switch rhoatm,
    which is in "clustered mode" and with the 2nd distribution, to sequential
    mode and the 1st distribution.

    Finally we move back to the 2nd distribution

* dhscf:
    call rhoofd

    call setMeshDistr( 1 )
    call distMeshData( 2, DRho, 1, DRho_seq, +1 )

    call poison

    call distMeshData( 1,Vscf_seq,2, Vaux, -1 )
    call setMeshDistr( 3 )
    call distMeshData( 2, DRho,3, DRho_gga, 0 )

    call cellxc

    call setMeshDistr( 2 )
    call distMeshData( 3, Vscf_gga, 2, Vscf, 0 )

    call vmat

* cellxc
    Now it is possible to acquire the stencils of neighboring domains
    using different partitions

    call distExtMeshData -> move data from "Dens" to "bdens"
    call gathExtMeshData -> move data from "Bvxc" to "VXC"

ALSO

* Experimental fix to cgwf.F by P. Ordejon, to increase stability
  of the O(N) algorithm.

2007-11-07 16:08:40 GMT	Alberto Garcia <albertog@icmab.es>	patch-29

Summary:  Merge changes in Rogeli's archive

Patches applied:

 * ag@bsc--2007/setupH--agarcia--2.3--base-0
   tag of rgrima@bsc--2007/siesta-bsc--rgrima--2.3--patch-3

 * ag@bsc--2007/setupH--agarcia--2.3--patch-1
   Create xalast unconditionally in siesta_move

 * ag@bsc--2007/setupH--agarcia--2.3--patch-2
   Split of dhscf

 * ag@bsc--2007/setupH--agarcia--2.3--patch-3
   Fix bug in harrisfun ifor flag

 * ag@bsc--2007/setupH--agarcia--2.3--patch-4
   Cosmetic changes to dhscf.F

 * rgrima@bsc--2007/siesta-bsc--rgrima--2.3--base-0
   tag of ref@bsc--2007/siesta-bsc--master--2.3--patch-26

 * rgrima@bsc--2007/siesta-bsc--rgrima--2.3--patch-1
   Split of setup_hamiltonian

 * rgrima@bsc--2007/siesta-bsc--rgrima--2.3--patch-2
   Fix bug in setup_hamiltonian

 * rgrima@bsc--2007/siesta-bsc--rgrima--2.3--patch-3
   Go back on marenostrum.make changes

 * rgrima@bsc--2007/siesta-bsc--rgrima--2.3--patch-4
   Merge of changes to dhscf.F during ICMAB session 26 July

2007-08-21 08:26:17 GMT	Alberto Garcia <albertog@icmab.es>	patch-28

Summary: Fix array bound error in old_atmfuncs.f

Patches applied:

 * agarcia@siesta.arch--2006/siesta--optim-md--2.4--patch-14
   Fix array bound error in old_atmfuncs.f


2007-06-12 12:50:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-27

Summary: Added some load-balancing tests

Added load_1, load_on, and load_particle in Tests.

2007-06-12 07:50:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-26

Summary: Sync to reference--2.1

Sync to pick up the patchlogs for patch-62 and -63.

2007-06-05 08:35:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-25

Summary: Avoid MP-grid permutations in trivial gamma case

For completeness, the effective Monkhorst-Pack grid is
printed even if only the gamma point is used. The algorithm
to generate it might sometimes permute the lattice vectors.
This is now corrected.

2007-06-05 08:30:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-24

Summary: Clarify bounds of SCF loop in siesta_forces.

The exit criterion of the scf loop in siesta_forces
has been clarified: It now exits before completing
the last scheduled iteration (i.e., iteration number
nscf) as it is assumed (notably for Harris-functional
calculations) that it corresponds to the final pass
for force and stress calculation.

The check on the sign of wmix has been deleted.

2007-06-05 13:5:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-23

Summary: Zmatrix optimization enhancements. Sign change in MM stress.

* Added constant-volume optimization option to the Zmatrix code.

* Broyden option for Zmatrix optimization.

* The zmatrix optimization code for the "variable cell" case has been
partially fixed. It now fails to work only if some of the coordinates
of an atom specifed in "cartesian" form are variables (i.e., allowed
to relax) and others are not.

For example:

cartesian  
...
     1  0.3 0.4 0.5    1 0 1
...

will fail as the second coordinate is not allowed to relax.

     1 0.4 0.2 -0.7    0 0 0         OK
     1 0.4 0.2 -0.7    1 1 1         OK


* New file cell_broyden_optim.F implements "cell-only" optimizations.

This feature is enabled by setting the symbol

MD.RelaxCellOnly 

to .true..

Only the cell parameters are relaxed (by the Broyden method).  The
atomic coordinates are re-scaled to the new cell, keeping the
fractional coordinates constant. For Zmatrix calculations, the
fractional position of the first atom in each molecule is kept fixed,
and no attempt is made to rescale the bond distances or angles.

* Removal of intra-molecular pressure

If the symbol

MD.RemoveIntramolecularPressure

is set to .true., the contribution to the stress coming from the
internal degrees of freedom of the molecules will be subtracted.  This
is done in an approximate manner, using the virial form of the stress,
and assumming that the "mean force" over the coordinates of the
molecule represents the "inter-molecular" stress. The correction term
was already computed in earlier versions ("Pmol"). The correction is
now computed molecule-by-molecule if the Zmatrix format is used.

NOTE: The reported "Molecular Pressure" might change slightly from
previous versions as the "current" and not the "next iteration" coordinates
are used for the computation of the virial term.


If the intra-molecular stress is removed, the corrected static and
total stresses are printed in addition to the uncorrected items.

The corrected Voigt form is also printed.

(New test ch4 to exemplify this feature)


* Correction of the sign of the stress in molecularmechanics.F90

For MM potentials, attractive interactions are represented by
*positive* C coefficients in the MM.Potentials block. Then the
MM energy is negative, as it should be. However, the sign of
the stress was wrong in the original implementation. Now (also
printed as MM-Stress) it should come out as a positive contribution
(negative pressure), forcing the cell to contract.

(Updated graphite_full test)


* New Utils/MM_Examples directory.

An example of the use of MM potentials to introduce van der Waals
interactions in an approximate manner (for the artificial example
of fcc He).

* Additional enthalpy-analog output.

The enthalpy is computed in two ways: as the "target enthalpy" using
the target pressure, and as the "real" enthalpy using the trace of the
current stress tensor as an estimation of the pressure. Ideally, both
values should be identical at convergence, but the "target enthalpy"
might have significant errors coming from the tolerances.


* NEW STRUCTURE OUTPUT FILES:

OUT.UCELL.ZMATRIX

It contains the structural information in fdf form, with
blocks for unit-cell vectors and for Zmatrix coordinates. The
Zmatrix block is in a ``canonical'' form with the following
characteristics:

1. No symbolic variables or constants are used.
2. The position coordinates of the first atom in each molecule
   are absolute cartesian coordinates.
3. Any coordinates in ``cartesian'' blocks are also absolute cartesians.
4. There is no provision for output of constraints.
5. The units used are those initially specified by the user, and are
   noted also in fdf form.

Note that the geometry reported is the last one for which forces and
stresses were computed.

NEXT_ITER.UCELL.ZMATRIX

In the same format but with a possibly updated geometry.

Label.STRUCT_NEXT_ITER.

Structure in crystallographic format (same as Label.STRUCT_OUT) for a
possibly updated geometry.

(Call performed in siesta_write_positions, which is called after the
structure has moved after the application of forces/stress.)


* New .make file for Hreidar at ETH Zurich.

2007-06-04 16:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-22

Summary: Undef var in kgridinit, iohs MPI write, pdosg array bound, Origin shift

* Initialize "genlogic" to .false. before it is used in kgridinit.

* Fix index in write statement in iohs in parallel affecting list array.

* Fix dimension of dpr in pdosg. Clarify names of variables in pdos.
  In pdosg, dpr was wrongly dimensioned to no_l (modern notation) instead of no_u.

* In routine coor, the origin shift was applied after the section in
which the coordinates are re-scaled (from Ang to Bohr, or from fractional
to cartesian, etc). However, it is clear in the manual that the shift
vector is in the same units and format as the input coordinates.

The shift is now applied right after reading the coordinate block.

NOTE: This does not apply to the Zmatrix routine, which has *its own*
conventions for origin shift, neither to coordinates read from an XV
file or a Struct file.

2007-06-04 16:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-21

Summary: Refinements of XML tester. New ioncat program
Keywords: 

Eduardo Anglada's bugfixes to the XML tester package:

* Apply bugfixes to compare_m.f90.
* Initialize variable 'len' in m_reader.f90 to suit buggy compilers.
* Use the 'normalize' DOM function to consolidate adjacent text nodes.
  (rather than changing the pcdata processing in the SAX parser).
* Add removal of tolerances.dat and diff output to the 'clean' target
  in test.mk

New features:

* Use the command-line options processor. Valid options:

 -d       : enable debugging output.
 -t FILE  : specify tolerances file.
 -g LOGTOL: specify (minus log10 of) global tolerance
 -s       : stop after first error
 -e NUM   : stop after NUM errors

* By default, the tester does not stop after errors.

* Enhance xmlparser/Tests/compare.sh to accept options.

* Modified f2kcli.F90 to fit gfortran (this compiler
already implements all the functionality, so a 
preprocessor symbol is used to disable the module).

* Added Src/Sys/gfortran.make

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

* New program "ioncat" in Src to analyze the content of .ion files.

 Usage: ioncat [options] Species_Label
 Options:
  
  -s          : Show header information
  -i          : Print indexes of unique orbitals
  -j          : Print indexes of unique KB projectors
  -o ORBINDEX : Generate table for orbital ORBINDEX
  -k KBINDEX  : Generate table for KB proj KBINDEX
  -v          : Generate table for Vna potential
  -Z          : Zoom in near rc for table generation
  -h          : Print this help message

The accompanying script ionplot.sh shows how to drive 
ioncat to plot the results.

2007-05-30 13:45:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-20

Summary: Execute SCF loop when nscf=1

When nscf=1, the scf loop was not entered, and
the program went directly to the "post-scf" section.

Now, unless nscf<=0, the scf loop is executed at least once.

(Merged from siesta-bsc--master--2.1)

2007-05-30 13:40:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-19

Summary: Sync to bsc--2.1. Change banner in CHANGES to bsc--2.3

The patches from ag@bsc--2007/merge-devel--ag--2.3 (up to patch-18) were
copied verbatim into this branch. 

To prepare it for further development:

* The version.info file has been updated
* The banner in CHANGES has been updated
* Patch-32 of bsc--2.1 (a typo) has been registered by 'tla sync-tree' (its contents
  had been already incorporated). Any further bug-fix patches on bsc--2.1
  should be merged into this branch.

------------------------------------------------------------------------------
(The following patches were merged from siesta-devel--reference--2.1, 
originally to branch ag@bsc--2007/merge-devel--ag--2.3
The patches were then copied verbatim to bsc--2.3; only the dates, and
the mention of extra patch-logs, are different)

2007-05-13 20:14:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-18

Summary: MareNostrum fixes. zdrot to blas. obj_setup. compare_m syntax

* Add "." to MPI_INCLUDE in MN's .make file.
* Remove old MN .make file.
* Do not link Reference-xml in obj_setup.sh
* Move zdrot routine from dc_lapack.f to blas.f
* Remove explicit LatticeVectors from h2oZ.fdf
* Change SystemLabel in ag test.

2007-05-13 15:44:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-17

Summary: Fix marenostrum-mpi.make. Syntax in compare_m.f90

* Add INCFLAGS to marenostrum-mpi.make
* Fix bad syntax in compare_m.f90

2007-05-12 17:20:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-16

Summary: Merge of XML tester by Eduardo Anglada. Portability fixes

* Merged XML tester (with simpler command-line interface)
* Merged new functionality into old test.mk 
* Split the compilation of libxmlparser.a and the xml-test program, as 
  some compilers cannot deal with the DOM part.
* Some of the new tests are not yet properly integrated.
  (reference output files and xml files have to be
   re-generated).

* More denchar and gen-basis objs

* Wider field in BASIS_ENTHALPY

* Fix matterhorn Sys files for VPATH compilation. New mpich .make files
  (the oci.q queue does not support myrinet). New script in Tests/Scripts.

* A warning is now printed if the user tries to invoke 'make'
from the xmlparser or MPI directories to compile test-xml or
the MPI tests, so that the proper VPATH is used.

* Add INCFLAGS to default suffix rule to Intel mkl .make file.

2007-05-12 18:50:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-15

Summary: Option to use fractional rc's for multiple zeta

If the rc's for multiple-zeta orbitals are given as negative numbers
in the PAO.Basis block, they are interpreted as the corresponding
fractions of the rc for the first-zeta orbital.

This is useful in basis optimization, to avoid having to include
explicitly the constraint that rc(izeta>1) < rc(izeta=1).

Note however that, if the rc's are significantly larger than the
natural size of the atomic orbital, multiple-zeta orbitals will tend
to be very similar to the first (this is now flagged by the program as
a warning). The best procedure to avoid this is to use an explicit
split-norm value.

2007-05-12 18:45:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-14

Summary: Fix tag in MPI send/receive in mulliken

* The undefined variable 'io' was used as tag... changed to itot, the
orbital index.

* Trimmed mpibuff before writing.

2007-05-12 18:40:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-13

Summary: Sync vpath changes. Update siesta.tex

Only siesta.tex needed updating.

2007-05-11 14:40:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-12

Summary: Option to use fractional rc's for multiple zeta

If the rc's for multiple-zeta orbitals are given as negative numbers
in the PAO.Basis block, they are interpreted as the corresponding
fractions of the rc for the first-zeta orbital.

This is useful in basis optimization, to avoid having to include
explicitly the constraint that rc(izeta>1) < rc(izeta=1).

Note however that, if the rc's are significantly larger than the
natural size of the atomic orbital, multiple-zeta orbitals will tend
to be very similar to the first (this is now flagged by the program as
a warning). The best procedure to avoid this is to use an explicit
split-norm value.

2007-05-11 14:30:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-11

Summary: Implementation of basis_enthalpy calculation. Zmatrix dependency

New file BASIS_ENTHALPY contains the "effective basis enthalpy"
of Anglada et al. The pressure is determined from the fdf symbol
"BasisPressure", with a 0.2 GPa default.

Further work: different weights to different species.

* siesta_geom was needed in zmatrix.F

2007-05-11 14:10:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-10

Summary: Units conversion in Util/Optical/optical.f. Scripts. Cosmetics

* Optical.f is a program to analyze the file .EPSIMG and obtain the
optical properties. A unit conversion was done from eV to Ry instead
of to Ha. (Daniel Sanchez)

* Updated script to run parallel jobs under SGE on matterhorn.

* Declare etime in bsd.f

* New file Src/Sys/arina-mlib.make for the new library setup
at the itanium machine at the UPV. Src/Confs/arina-mpi.conf
is now obsolete.

* Update of Tests/Scripts/arina.pbs.

* Wrap writes for MPI in siesta_init.F and m_broyden_optim.F


2007-05-11 15:40:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-9

Summary: Fix of zmatrix code to deal with degenerate case

* Note: BSC cosmetic change to zmatrix.F90 taken back.
        In detail: synched patch-38, and copied zmatrix.F from reference-2.1
        after doing a 'tla mv zmatrix.F0 zmatrix.F.
        Copied also the benzene test and Reference output, and updated
        std-Makefile.

(Colin Glass, Alberto Garcia)

The first three atoms in a zmatrix molecule are special.  The torsion
angle of the third is specified with respect to a plane formed by the
first two atoms and a notional atom located along the z axis from the
second. If the second atom is located also along the z axis from the
first, the plane is undefined. 

The routine to compute the cartesian coordinates from the Zmatrix
coordinates deals now with the third atom in a more controlled way,
and uses the phi angle of the second atom (which should be specified
even if theta=0) to determine correctly the reference plane for the
torsion.

Notation: the atoms used as reference for the calculation of the
position of the current atom are:

i: determines the bond length
j: together with i, determines the angle theta
k: together with i and j, determines the reference plane for the torsion.

In case of alignment of i,j, and k, we use the azimuth (phi) of i with
respect to j to fix the reference plane.

If "i" is the first atom in the Zmatrix, its Zmatrix coordinates are X
Y Z, and we cannot use its "phi angle" as reference, but in fact this
angle can be easily computed as phi_ref = phi_ji - pi, where phi_ji is
the azimuth of the j atom with respect to i.

Routine z2cgen is passed phi_ref after checking the above conditions.

This fix only applies only to the calculation of the coordinates of the third
atom, but it could presumably be generalized to intercept singular cases
at any link of the zmatrix, at which i, j, and k could lie along a line.

* New checks to detect attempts to use "fractional coordinates" when
the unit cell is not yet defined at the time of reading the Zmatrix.

* New test "benzene"


2007-05-11 15:35:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-8

Summary: Add patchlog for k-point fix

The content of patch-37 was already in the BSC version. Synched and added
patchlog only.

2007-05-11 15:30:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-7

Summary: Add graphite_c6_full test for more realistic vdW test

The original graphite test prepared by J. Gale to show an
example of adding two-body potentials to simulate van der Waals 
interactions has been added as graphite_c6_full. It is not
executed by default as it requires significant CPU time.
 
Minor cosmetic changes in filter_subs.f and kgridinit.F

Add molecular-mechanics documentation. 

2007-05-11 15:20:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-6

Summary: Merge filtering package by Eduardo Anglada

Code that implements the ideas in 

Anglada E, Soler JM
Filtering a distribution simultaneously in real and Fourier space 
PHYSICAL REVIEW B 73 (11): Art. No. 115122 MAR 2006 

has been merged.

The filtering is selected by fdf directives of the form:

PAO.Filter .true.
VNA.filter .true.
PCC.filter .true.

and the default parameters are determined by heuristics based
on the value of the MeshCutoff.

(A manual entry is being written)

New tests:

Tests/pb_bulk
Tests/pb_bulk_1000
Tests/pb_filter_all
Tests/pb_filter_basis
Tests/pb_filter_nopcc
Tests/pb_filter_pcc
Tests/pb_filter_vna
Tests/var_cell_filter

2007-05-11 14:58:39 GMT	Alberto Garcia <albertog@icmab.es>	patch-5

    Summary:
      Fix typo in state_init.F
    Revision:
      merge-devel--ag--2.3--patch-5

    modified files:
     Src/state_init.F


2007-05-11 09:31:46 GMT	Alberto Garcia <albertog@icmab.es>	patch-4

    Summary:
      Re-enabling of kgrid update in variable-cell calculations
    Revision:
      merge-devel--ag--2.3--patch-4

    * Re-enabled the computation of kscell in kpoint_grid after a cell change.
    
    (Synched the corresponding patches in 2.1 that lead to the same code state)
    

    modified files:
     Docs/CHANGES Docs/siesta.tex Src/kpoint_grid.F90
     Src/siesta_options.F90 Src/state_init.F version.info

    new patches:
     siesta@uam.es--2006/siesta-devel--reference--2.1--patch-33
     siesta@uam.es--2006/siesta-devel--reference--2.1--patch-34


2007-05-10 21:14:36 GMT	Alberto Garcia <albertog@icmab.es>	patch-3

    Summary:
      New treatment of fractional atoms in VCA. Bug fix in lmxo
    Revision:
      merge-devel--ag--2.3--patch-3

    Instead of mixing with a "zero" pseudopotential, pseudopotentials
    for a "fractionally occupied" site can be generated by simply
    multiplying the potential and charges by the appropriate factor,
    using the 'fractional' program, which resides in the top source
    directory.
    
    There is no longer any need for the "zero" pseudopotential files.
    
    Bug fix: lmxo was not being set correctly for synthetic atoms.
    
    Test update: 'oxyn' and 'partial' reference outputs have been
    regenerated. 'partial' now uses the 'fractional' program.
    
    NOTE: there are some instabilities in the outputs on the intel
    compiler+library platform.

    new files:
     Src/.arch-ids/fractional.f.id Src/fractional.f
     Tests/partial/.arch-ids/README.id Tests/partial/README

    removed files:
     Tests/Pseudos/.arch-ids/Zero.nrl.psf.id
     Tests/Pseudos/.arch-ids/Zero.rel.psf.id
     Tests/Pseudos/Zero.nrl.psf Tests/Pseudos/Zero.rel.psf
     Util/VCA/.arch-ids/zerops.f.id
     Util/VCA/.arch-ids/zerops_rel.f.id Util/VCA/zerops.f
     Util/VCA/zerops_rel.f

    modified files:
     Docs/CHANGES Docs/siesta.tex README Src/Makefile
     Src/basis_specs.f Tests/Reference/oxyn.out
     Tests/Reference/partial.out Tests/partial/script.sh
     Util/VCA/README version.info

    new patches:
     siesta@uam.es--2006/siesta-devel--reference--2.1--patch-32


2007-05-10 21:08:45 GMT	Alberto Garcia <albertog@icmab.es>	patch-2

    Summary:
      Merge patch-log for patch-30 from 2.1
    Revision:
      merge-devel--ag--2.3--patch-2

    Patches applied:
    
     * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-30
       Update of CHANGES and siesta.tex for rmax.radial.grid feature
    

    new patches:
     siesta@uam.es--2006/siesta-devel--reference--2.1--patch-30


2007-05-10 21:02:23 GMT	Alberto Garcia <albertog@icmab.es>	patch-1

    Summary:
      Prepare CHANGES file
    Revision:
      merge-devel--ag--2.3--patch-1

    
    Add a forgotten patch-log from bsc--2.1 branch, and prepare the banner.
    

    modified files:
     Docs/CHANGES version.info


2007-05-10 20:44:42 GMT	Alberto Garcia <albertog@icmab.es>	base-0

    Summary:
      tag of ref@bsc--2007/siesta-bsc--master--2.3--base-0
    Revision:
      merge-devel--ag--2.3--base-0

____________________________________________________________________
** CHANGES ALONG ref@bsc--2007/siesta-bsc--master--2.1
--------------------------------------------------------------------

2007-05-10 11:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-31

Summary: Avoid shrinking of density-matrix arrays for extrapol.

Routine extrapol has to deal with density-matrices with possibly different
sparsity patterns. It is essential that their "value" and "list" arrays be
large enough to allow proper processing.

After the cleanup, the allocation section after the call to hsparse in
state_init called re_alloc inconditionally, regardless of whether the
total size of Dscf (nh) had increased or not. Sometimes this led to a
*shrinkingg* ofthe arrays, and bounds errors in extrapol. The option
'shrink=.false.' has now been used. (Also, for good measure, shrinking
is avoided in the allocation of listh, now done inside hsparse.)

Extrapol has been turned into a module, and the assumed-shape idiom used
to declare the relevant arrays (otherwise bounds errors would result from
the comparison with the nominal nmax).

* Other: cosmetic change in the 'dep' target to deal properly with
degenerate vpaths.

2007-05-08 21:00:00 GMT	Alberto Garcia <albertog@icmab.es>	patch-30

Summary: Explicit array extents in initatom.f

More fixes for compiler handling of array arguments:

The actual argument (in call to atom in initatom.f):

	nzeta(0:,1,is)

is wrong. It should be:   nzeta(0:,1:,is)

The 0: form was put in a previous patch to avoid an mismatched interface
error with the Marenostrum compiler. But once this is done, apparently
one has to go all the way with explicit array extents. Otherwise bad
code is produced by other compilers (at least by Intel's).

This is mildly confusing, as the dummy arguments are declared
in f77 style in atom.f:

      integer, intent(in) :: nzeta(0:lmaxd,nsemx)

(or are they?).

There might be other instances of this usage.

2007-05-07 11:00:10 GMT	Alberto Garcia <albertog@icmab.es>	patch-29

Summary: Fix wrong allocations in cellxc.F

A few typos in the conversion of allocatables to pointers in cellxc caused
crashes. Fixed allocation of dbuffer and bvxc.

2007-05-07 15:30:10 GMT	Alberto Garcia <albertog@icmab.es>	patch-28

Summary: Explicit array-ness in calls in initatom and cellxc

The Marenostrum compiler complains if actual arguments with
array indexes beginning at 0 are written in the old f77 style:

Thus one has to write in initatom:

                call ....
                 nkbl(0:,is), erefkb(1,0:,is),lmxo(is),

instead of:
                call ....
                 nkbl(0,is), erefkb(1,0,is),lmxo(is),

* In cellxc, a similar specification is necessary:

          call HowManyMeshPerNode(MeshNsm,Pleft3,Nodes,NMeshPN,
     .      PMesh(1:,3))

2007-04-11 12:10 GMT	Alberto Garcia <albertog@icmab.es>	patch-27

Summary: Allocatables to pointers IV -- new neighbor code + nspecies fix
Keywords: 

Further changes for allocatables->pointers conversion.  

Neighb and ranger removed in favor of 'mneighb' approach, as it is
more robust and less confusing.

There has been a slight change in mneighb: maxnna is now a module
variable, and not an argument of mneighb. Maxnna is given an initial
value, and the module arrays initialized to that size in the first
invocation.

Patches applied:

 * ag@bsc--2007/vars--mqag--1.0--patch-43
   First stages of changeover to mneighb paradigm

 * ag@bsc--2007/vars--mqag--1.0--patch-44
   New functionality in mneighb. Convert chempot

 * ag@bsc--2007/vars--mqag--1.0--patch-45
   Converted phirphi*, ksv, and optical

 * ag@bsc--2007/vars--mqag--1.0--patch-46
   Final changeover to new neighb paradigm

 * ag@bsc--2007/vars--mqag--1.0--patch-47
   dhscf. Minor change in meshsubs. Cosmetic cleanup of mneighb.

Also: Fix setting of number of species for user basis option

The number of species was not set correctly if the options User.Basis
or User.Basis.Netcdf were used.


2007-04-10 08:05 GMT	Alberto Garcia <albertog@icmab.es>	patch-26

Summary: Allocatables to pointers III
Keywords:

Third installment in the merging of the allocatables->pointers work at BSC.

Patches applied:

 * ag@bsc--2007/vars--mqag--1.0--patch-22
   cisa in siesta_geom

 * ag@bsc--2007/vars--mqag--1.0--patch-23
   MolecularMechanics

 * ag@bsc--2007/vars--mqag--1.0--patch-24
   Forhar

 * ag@bsc--2007/vars--mqag--1.0--patch-25
   Deallocate basis spec arrays

 * ag@bsc--2007/vars--mqag--1.0--patch-26
   Fix names in re_alloc/de_alloc statements

 * ag@bsc--2007/vars--mqag--1.0--patch-27
   kinefsm

 * ag@bsc--2007/vars--mqag--1.0--patch-28
   ksv

 * ag@bsc--2007/vars--mqag--1.0--patch-29
   listsc

 * ag@bsc--2007/vars--mqag--1.0--patch-30
   m_broyden_mixing

 * ag@bsc--2007/vars--mqag--1.0--patch-31
   Rationalization of chempot

 * ag@bsc--2007/vars--mqag--1.0--patch-32
   Setatomnodes. Stop if bad load balancing

 * ag@bsc--2007/vars--mqag--1.0--patch-33
   obc rationalization

 * ag@bsc--2007/vars--mqag--1.0--patch-34
   ofc rationalization

 * ag@bsc--2007/vars--mqag--1.0--patch-35
   outcoor

 * ag@bsc--2007/vars--mqag--1.0--patch-36
   pseudopotential

 * ag@bsc--2007/vars--mqag--1.0--patch-37
   elem in atomlist and struct_init

 * ag@bsc--2007/vars--mqag--1.0--patch-38
   atomlwf

 * ag@bsc--2007/vars--mqag--1.0--patch-39
   bands

 * ag@bsc--2007/vars--mqag--1.0--patch-40
   broyden_optim

 * ag@bsc--2007/vars--mqag--1.0--patch-41
   cellxc

 * ag@bsc--2007/vars--mqag--1.0--patch-42
   denmat and denmatlomem

2007-03-20 22:50 GMT	Alberto Garcia <albertog@icmab.es>	patch-25

Summary: Allocatables to pointers  II
Keywords: 

Second merge of the changes Based on work by Manuel Quero from Feb 28 to Mar 16. 
Allocatable arrays have been turned into pointers in several routines.

+ Clarification of the use of the new m_neighbors module.
+ vpath-aware "make dep" target

Patches applied:

 * ag@bsc--2007/vars--mqag--1.0--patch-14
   radfft

 * ag@bsc--2007/vars--mqag--1.0--patch-15
   poison

 * ag@bsc--2007/vars--mqag--1.0--patch-16
   reord

 * ag@bsc--2007/vars--mqag--1.0--patch-17
   phirphi

 * ag@bsc--2007/vars--mqag--1.0--patch-18
   PDOS routines

 * ag@bsc--2007/vars--mqag--1.0--patch-19
   Clarification of m_neighbors use. Nlefsm converted

 * ag@bsc--2007/vars--mqag--1.0--patch-20
   bonds. Vpath-aware makedepend

 * ag@bsc--2007/vars--mqag--1.0--patch-21
   shaper

2007-03-19 8:40 GMT	Alberto Garcia <albertog@icmab.es>	patch-24

Summary: Allocatables to pointers  I

First merge of the changes Based on work by Manuel Quero from Feb 28 to Mar 16. 
Allocatable arrays have been turned into pointers in several routines.

Patches applied:

 * ag@bsc--2007/vars--mqag--1.0--base-0
   tag of ref@bsc--2007/siesta-bsc--master--2.1--patch-23

 * ag@bsc--2007/vars--mqag--1.0--patch-1
   Siesta_analysis, sphere_harm

 * ag@bsc--2007/vars--mqag--1.0--patch-2
   Transition_rate

 * ag@bsc--2007/vars--mqag--1.0--patch-3
   Vmat and vmatsp

 * ag@bsc--2007/vars--mqag--1.0--patch-4
   Added _z1, _z2, and _r4 support to alloc.F90

 * ag@bsc--2007/vars--mqag--1.0--patch-5
   Detover, allocating complex arrays

 * ag@bsc--2007/vars--mqag--1.0--patch-6
   Fft3d 

 * ag@bsc--2007/vars--mqag--1.0--patch-7
   Old_atmfuncs 

 * ag@bsc--2007/vars--mqag--1.0--patch-8
   Savepsi

 * ag@bsc--2007/vars--mqag--1.0--patch-9
   Explicit array-ness in calls to spline

 * ag@bsc--2007/vars--mqag--1.0--patch-10
   Meshmatrix and routines which use DscfL

 * ag@bsc--2007/vars--mqag--1.0--patch-11
   xc.f

 * ag@bsc--2007/vars--mqag--1.0--patch-12
   Overfsm

 * ag@bsc--2007/vars--mqag--1.0--patch-13
   Optical

2007-03-15 16:40 GMT	Alberto Garcia <albertog@icmab.es>	patch-23

Summary: VPATH-aware compilation for multiple executable versions

Added Src/obj_setup.sh script, to be called from any directory on
which the build is going to take place, and modified slightly some
makefiles to make them VPATH-proof.  The Tests directory is replicated
in the "build" directory (and a fake symbolic link called "Src" added
so that all the test-running scripts work without change).

(The pristine Src should be "clean", without any object files)

Example. From the top Siesta directory:

mkdir Objs
cd Objs
sh ../Src/obj_setup.sh
../Src/configure --enable-fast
make
cd Tests
make clean; make
cd    # Now a parallel version
mkdir ParaObjs
cd ParaObjs
sh ../Src/obj_setup.sh
cp ../Src/Sys/parallel.make ./arch.make
make
cd Tests
make clean; make

2007-03-15 16:30 GMT	Alberto Garcia <albertog@icmab.es>	patch-22

Summary: Reorganization of hsparse/xijorb calls with new neighbor module

* Deactivated 's' routines in alloc.F90, as they are seen as extremely
dangerous.

* New module m_neighbors houses maxna, jna, r2ij, and xij, and the new
routine init_neighbor_arrays, which simplifies the logic of the block
formerly in state_init.  The initialization routine is invoked with a
larger rmax, appropriate for the workings of hsparse, so that there is
no need to check again for the appropriate sizes. Actually, this rmax
is the largest ever needed by the calculation of neighbors, so maxna
is set once and for all.

This new module (which supersedes m_numb_neighb) could be used
by other second-level routines (nlefsm, phirphi, etc).

* Hsparse is now called just once from state_init. It allocates listh
(and xijo, if applicable), and returns the size "nh" of the sparse
matrices.

* maxnh is always set to nh (and not to some larger value if nh > (the
old maxnh)).

* The sparse arrays are always re_alloc'ated, as these calls are very
cheap if they have the right size.

* The code for xijorb and hsparse is almost identical.  It has been
merged, adding two new arguments to hsparse: gamma and xijo, so that
hsparse fills xijo also if gamma is false. Multiple-image detection is
still active.

* Routine xijorb has been deleted.

* Allocatables have been turned into pointers inside hsparse.

2007-03-15 16:19:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-21

Summary: Re-organization of pulay module

Pulayx is now part of a module "m_pulay", which contains the
nauxpul and auxpul variables. Module m_auxpul has been removed.

The calling sequence for pulayx has been simplified, as some of
the arguments are now module variables. Argument maxo was innecesary.
Internal work arrays are now pointers.

The changes affect mixer and state_init (which calls a new routine
init_pulay_arrays)

2007-03-15 16:12:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-20

Summary: Pointers in fixed and setspatial. si2x1h test added to bsc-Makefile

2007-03-01 12:00:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-19

Summary: Add character(len=*) routines to alloc.F90

New module procedures realloc_s1 and dealloc_s1


2007-02-27 15:46:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-18

Summary: Final cleanup of siesta_todo
Keywords: 

(During and after meeting at BSC on Feb 26, 2007)

* New module m_gamma.
* 'shape' put in siesta_geom.
* 'sname' put in siesta_options.
* Signaling role of 'foundxv' taken over by 'xv_file_read' in ioxv.F

* All the other variables have been made local to the appropriate routines.

+ Cosmetic changes in state_init and hsparse: conversion of implicit
  loops with goto to explicit 'do while' loops.

+ Conversion of scfconvergence_test and proximity_check into modules.


2007-02-25 22:25:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-17

Summary: Fixes for troublesome bugs in reference code

Patches applied:

 * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-31
   Parallel bug fix and cleanup in writewave.F

 * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-42
   zval wrongly treated as MPI_integer in broadcast_basis

 * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-43
   Wrap io_close for MPI in iohs.F

 * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-45
   Clean up handling of ntote in ksv and optical

 * siesta@uam.es--2006/siesta-devel--reference--2.1--patch-46
   Fix allocation of temporary array in savepsi in parallel



2007-02-25 20:02:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-16

Summary: Merge of removal of integer and real variables from siesta_todo
Keywords: 

Inital work done at BSC by M. Quero from Feb 19 to 23, 2007. A. Garcia
then consolidated some of the modules and removed others, turning some
variables into locals or arguments (See ag@bsc--2007/ag--vars--1.0)

Some fine tuning still needs to be done, and note that the
'high-level' handling of major variables, for example as

	call siesta_forces(geom,force_stress)

has not started yet.

New modules:

m_auxpul.F90        : Pulay variables. Will go into a "pulay" module.
m_dipol.F90         : Dipole
m_spin.F90          : nspin, qs, efs, plus routine init_spin (replaces
                      spin_init). Readsp not included, as it needs work.
m_eo.F90            : eo, qo arrays
m_forces.F90        : fa, cfa, and ntcon. At the same level as stress.F90,
                      which has been renamed to m_stress.F90
m_kinetic.F90       : Kinetic energies of Parrinello/Rahman variables
m_ntm.F90           : Mesh multipliers. Should probably go in meshsubs.
m_numbs_neighb.F90  : Variables related to the neighbor calculations.
m_rmaxh.F90         : Hamiltonian maximum range. Should be clarified.

* Module atomlist now includes no_l
* Module siesta_geom now includes va (atomic velocities), plus
  a new variable volume_of_some_cell to pass volume information (to
  mimic a very likely bug in the old code)
* Array xijo is now in sparse_matrices


2007-02-24 14:04:53 GMT	Alberto Garcia <albertog@icmab.es>	patch-15

    Summary:
      New m_energies and m_steps modules. Back to old k-point behavior
    Revision:
      siesta-bsc--master--2.1--patch-15

    More steps in the slimming of siesta_todo:
    
    * Module m_energies contains the energy components
    * Module m_steps contains inicoor, fincoor, istp, final
    * Variable dDmax has been turned into an argument of
      mixer and scfconvergence_test
    
    *The old code had a bug in the update of k-points with cell changes:
    the kscell matrix was kept constant, instead of re-calculating it.
    This was fixed in the re-structured version, but of course the fix
    leads to differences in the outputs of some tests, notably var_cell.
    
    The bug has been re-activated in kpoint_grid.F90 by commenting out
    the update of kscell.
    
    The resetting of kscell to the unit matrix in case of gamma
    calculations has been deferred for the same reason.
    
    
    
    

    new files:
     Src/.arch-ids/m_energies.F90.id Src/.arch-ids/m_steps.F90.id
     Src/m_energies.F90 Src/m_steps.F90

    removed files:
     Src/.arch-ids/m_siesta.jose.F.id Src/m_siesta.jose.F

    modified files:
     Src/Makefile Src/compute_dm.F Src/kpoint_grid.F90
     Src/local_DOS.F Src/mixer.F Src/new_dm.F Src/post_scf_work.F
     Src/scfconvergence_test.F Src/setup_hamiltonian.F Src/siesta.F
     Src/siesta_analysis.F Src/siesta_forces.F Src/siesta_init.F
     Src/siesta_move.F Src/siesta_todo.F Src/state_analysis.F
     Src/state_init.F Src/write_md_record.F Src/write_subs.F

    new patches:
     ag@bsc--2007/ag--vars--1.0--base-0
     ag@bsc--2007/ag--vars--1.0--patch-1
     ag@bsc--2007/ag--vars--1.0--patch-2
     ag@bsc--2007/ag--vars--1.0--patch-3
     ag@bsc--2007/ag--vars--1.0--patch-4


2007-02-18 23:13:17 GMT	Alberto Garcia <albertog@icmab.es>	patch-14

    Summary:
      Replacement of some allocatables by pointers and automatics
    Revision:
      siesta-bsc--master--2.1--patch-14

    eo, qo        : pointers
    fa, cfa, fal  : pointers
    
    polxyz, polR  : automatic arrays, as they are small
    
    (+ really add siesta_forces.F from previous patch)

    new files:
     Src/.arch-ids/siesta_forces.F.id Src/siesta_forces.F

    modified files:
     Src/Makefile Src/born_charge.F Src/siesta_analysis.F
     Src/siesta_init.F Src/siesta_todo.F Src/state_init.F

    new patches:
     ag@bsc--2007/vars-mem--ag--0.1--patch-4
     ag@bsc--2007/vars-mem--ag--0.1--patch-5


2007-02-18 23:09:35 GMT	Alberto Garcia <albertog@icmab.es>	patch-13

    Summary:
      Creation of siesta_forces
    Revision:
      siesta-bsc--master--2.1--patch-13

    Finally, siesta_forces has been created, clarifying in the process the
    parameters of siesta_write_energies.
    

    modified files:
     Src/Makefile Src/siesta.F Src/siesta_analysis.F

    new patches:
     ag@bsc--2007/vars-mem--ag--0.1--patch-3


2007-02-18 23:08:23 GMT	Alberto Garcia <albertog@icmab.es>	patch-12

    Summary:
      Clarification of the scope of the stress variables
    Revision:
      siesta-bsc--master--2.1--patch-12

    A number of changes to rationalize the use of 'stress':
    
    * New routine 'overlap': a simplified version of overfsm adequate
    for calling from state_init, where only the overlap matrix is needed,
    and the stress was zero.
    
    * Routine setup_hamiltonian now globalizes the stress, and calls
    the 'twobody' routine. Variable 'stressl' made into a local.
    
    * local_DOS, and the writing of charge and potentials, do no need
    to use the 'stress' variable at all.
    
    (Regeneration of reference outputs)

    modified files:
     Docs/CHANGES Docs/siesta.ind Docs/siesta.tex Src/kgrid.F
     Src/kgridinit.F Src/siesta.F Tests/Reference/batio3.out
     Tests/Reference/bessel.out Tests/Reference/constant_volume.out
     Tests/Reference/fe.out Tests/Reference/fe_broyden.out
     Tests/Reference/floating.out Tests/Reference/graphite_c6.out
     Tests/Reference/h2o.out Tests/Reference/h2oZ.out
     Tests/Reference/h2o_basis.out Tests/Reference/h2o_dos.out
     Tests/Reference/h2o_findp_bug.out
     Tests/Reference/h2o_op_broyden.out
     Tests/Reference/h2o_orderN.out
     Tests/Reference/h2o_radialgrid.out
     Tests/Reference/h2o_reparam.out Tests/Reference/md_anneal.out
     Tests/Reference/md_nose.out Tests/Reference/md_npr.out
     Tests/Reference/md_pr.out Tests/Reference/md_verlet.out
     Tests/Reference/mgco3.out Tests/Reference/oxyn.out
     Tests/Reference/partial.out Tests/Reference/si2x1h.out
     Tests/Reference/si64.out Tests/Reference/si_bandpoints.out
     Tests/Reference/sih.out Tests/Reference/sih_fire.out
     Tests/Reference/sih_op_broyden.out
     Tests/Reference/var_cell.out Tests/Reference/zmatrix.out
     version.info

    new files:
     Src/.arch-ids/overlap.f.id Src/overlap.f

    modified files:
     Src/Makefile Src/local_DOS.F Src/post_scf_work.F
     Src/setup_hamiltonian.F Src/siesta.F Src/siesta_analysis.F
     Src/siesta_init.F Src/siesta_todo.F Src/state_analysis.F
     Src/state_init.F Src/stress.F90 Src/write_subs.F

    new patches:
     ag@bsc--2007/vars-mem--ag--0.1--base-0
     ag@bsc--2007/vars-mem--ag--0.1--patch-1
     ag@bsc--2007/vars-mem--ag--0.1--patch-2


2007-02-17 19:34:42 GMT	Alberto Garcia <albertog@icmab.es>	patch-11

    Summary:
      Fourth session at the BSC
    Revision:
      siesta-bsc--master--2.1--patch-11

    * New routine state_analysis.F split from siesta_move.F
    
    * Some variables taken out of siesta_todo and moved to
    various places:
    
     - New module m_stress in stress.F90 holds stress et al
      (Some variables could actually be turned into locals
       in several routines, except perhaps 'stress'.)
     - mscell et al moved to siesta_geom
     - nh and nhmax moved to sparse_matrices
    
    * write_subs now holds the siesta_write_XX routines
      formerly in siesta_todo
    
    * Some allocatables changed to pointers in fixed.F and pulayx.F
      (First step: just use re_alloc instead of allocate/memory
       In a second step work arrays will live outside)
    
    * Cosmetic changes in m_mpi_utils.F90 (in the context of the
    analysis of the MPI interface)
    
    * Changes in coor.F:
      - mscell, nsc changed to coor_mscell and coord_nsc
      - routine superx_coor taken out of the coor scope, to
        avoid clashes with the imported variables in coor.
        (this supercell does not have anything to do with the
         auxiliary supercell for matrix elements)
    
    AG upon merging:
    
    * Fix typo in zmatrix declarations
    * Declare etime in bsd.f
    * New trick in Makefile to remove the dependency
      of siesta_cmlsubs.o on version.o after doing "make dep".
    * Put an explicit unit cell in h2oZ.fdf to avoid a bug.

    new files:
     Docs/.arch-ids/BSC-Issues.id Docs/BSC-Issues
     Src/.arch-ids/state_analysis.F.id Src/.arch-ids/stress.F90.id
     Src/.arch-ids/write_subs.F.id
     Src/Sys/.arch-ids/intel-checks.make.id
     Src/Sys/intel-checks.make Src/state_analysis.F Src/stress.F90
     Src/write_subs.F

    removed files:
     Tests/.arch-ids/compara.id Tests/compara

    modified files:
     Docs/CHANGES Src/Makefile Src/alloc.F90 Src/bsd.f Src/coor.F
     Src/fixed.F Src/kpoint_grid.F90 Src/ksvinit.F Src/local_DOS.F
     Src/m_mpi_utils.F Src/parallel.f Src/post_scf_work.F
     Src/pulayx.F Src/scfconvergence_test.F Src/setup_hamiltonian.F
     Src/siesta.F Src/siesta_analysis.F Src/siesta_geom.F90
     Src/siesta_init.F Src/siesta_move.F Src/siesta_todo.F
     Src/sparse_matrices.F90 Src/state_init.F Src/struct_init.F
     Src/zheevds.F90 Tests/bsc-Makefile Tests/bsc-compare.sh
     Tests/bsc-test.mk Tests/h2oZ/h2oZ.fdf version.info
    new patches:
     mq@bsc--2007/mq--feb16--1.0--patch-1


2007-02-17 20:00:10 GMT	Alberto Garcia <albertog@icmab.es>	patch-11

Summary: Fourth session at the BSC
Keywords: 

* New routine state_analysis.F split from siesta_move.F

* Some variables taken out of siesta_todo and moved to
various places:

 - New module m_stress in stress.F90 holds stress et al
  (Some variables could actually be turned into locals
   in several routines, except perhaps 'stress'.)
 - mscell et al moved to siesta_geom
 - nh and nhmax moved to sparse_matrices

* write_subs now holds the siesta_write_XX routines
  formerly in siesta_todo

* Some allocatables changed to pointers in fixed.F and pulayx.F
  (First step: just use re_alloc instead of allocate/memory
   In a second step work arrays will live outside)

* Cosmetic changes in m_mpi_utils.F90 (in the context of the
analysis of the MPI interface)

* Changes in coor.F:
  - mscell, nsc changed to coor_mscell and coord_nsc
  - routine superx_coor taken out of the coor scope, to
    avoid clashes with the imported variables in coor.
    (this supercell does not have anything to do with the
     auxiliary supercell for matrix elements)


2007-02-15 22:13:10 GMT	Alberto Garcia <albertog@icmab.es>	patch-10

    Summary:
      Some conversions to Fortran90 by M. Quero
    Revision:
      siesta-bsc--master--2.1--patch-10

    zmatrix.F90, zheevs.F90, siesta_options.F90
    
    

    modified files:
     Src/siesta_options.F90 Src/zheevds.F90 Src/zmatrix.F90

    renamed files:
     Src/.arch-ids/siesta_options.F.id
       ==> Src/.arch-ids/siesta_options.F90.id
     Src/.arch-ids/zheevds.f.id
       ==> Src/.arch-ids/zheevds.F90.id
     Src/.arch-ids/zmatrix.F.id
       ==> Src/.arch-ids/zmatrix.F90.id
     Src/siesta_options.F
       ==> Src/siesta_options.F90
     Src/zheevds.f
       ==> Src/zheevds.F90
     Src/zmatrix.F
       ==> Src/zmatrix.F90

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-16
     mqag@bsc--2007/siesta-bsc--mqag--2.1--patch-5


2007-02-15 21:39:24 GMT	Alberto Garcia <albertog@icmab.es>	patch-9

    Summary:
      Fix import of no_l in born_charge
    Revision:
      siesta-bsc--master--2.1--patch-9


    modified files:
     Src/born_charge.F


2007-02-16 02:10:07 GMT	Alberto Garcia <albertog@icmab.es>	patch-8

    Summary:
      Siesta_todo slimming by M. Quero
    Revision:
      siesta-bsc--master--2.1--patch-8

    Module imports in siesta_todo have been almost eliminated.
    
    Only the variables declared explicitly as local in the old siesta.F
    remain in siesta_todo. (Work done by Manuel Quero after the third meeting)
    
    (Note: the cosmetic changes in neighb.f, ranger.f, and struct_init.F90,
    have not been applied)
    
    A bug in born_charge.F has been fixed by AG.
    
    Patches applied:
    
     * mqag@bsc--2007/siesta-bsc--mqag--2.1--patch-3
       Progressive emptying of siesta_todo
    
     * mqag@bsc--2007/siesta-bsc--mqag--2.1--patch-4
       Add siesta_geom imports to born_charge.F
    

    modified files:
     Src/Makefile Src/born_charge.F Src/compute_dm.F Src/coor.F
     Src/hsparse.f Src/local_DOS.F Src/m_broyden_mixing.f
     Src/mixer.F Src/new_dm.F Src/normalize_dm.F
     Src/post_scf_work.F Src/projected_DOS.F Src/proximity_check.F
     Src/scfconvergence_test.F Src/setup_hamiltonian.F Src/siesta.F
     Src/siesta_analysis.F Src/siesta_end.F Src/siesta_geom.F90
     Src/siesta_init.F Src/siesta_move.F Src/siesta_options.F
     Src/siesta_todo.F Src/sparse_matrices.F90 Src/state_init.F
     Src/struct_init.F Src/write_md_record.F Src/xcmod.F

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-14
     mqag@bsc--2007/siesta-bsc--mqag--2.1--patch-3
     mqag@bsc--2007/siesta-bsc--mqag--2.1--patch-4


2007-02-16 02:08:19 GMT	Alberto Garcia <albertog@icmab.es>	patch-7

    Summary:
      Initialize iza in struct_init
    Revision:
      siesta-bsc--master--2.1--patch-7

    The array iza might be needed by ioxv in struct_init, but it was initialized
    only later in atomlist.
    
    

    modified files:
     Src/atomlist.f Src/struct_init.F

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-10


2007-02-16 02:07:23 GMT	Alberto Garcia <albertog@icmab.es>	patch-6

    Summary:
      Encapsulation of k-point handling
    Revision:
      siesta-bsc--master--2.1--patch-6

    The different k-point grids now live in different modules,
    and are set up (or their size estimated) early in siesta_init.
    
    The scf kgrid has its own module, kpoint_grid, and a more
    sophisticated (but equivalent) logic inside.  (Except for a cosmetic
    change when the auxiliary k-point supercell is the trivial one but
    with permuted rows).
    
    The others, notably the polarization grid, are just
    encapsulated, without much change.
    
    Patches applied:
    
     * ag@bsc--2007/siesta-bsc--ag--2.1--patch-7
       New utilities for scf kgrid construction
    
     * ag@bsc--2007/siesta-bsc--ag--2.1--patch-8
       Fix use of uninitialized maxk
    
     * ag@bsc--2007/siesta-bsc--ag--2.1--patch-11
       Move band initialization back to siesta_init
    
     * ag@bsc--2007/siesta-bsc--ag--2.1--patch-12
       Encapsulate k-point processing for wavefunction printout
    
     * ag@bsc--2007/siesta-bsc--ag--2.1--patch-13
       Encapsulation of polarization k-point setup

    new files:
     Src/.arch-ids/find_kgrid.F.id Src/.arch-ids/setup_kscell.F.id
     Src/find_kgrid.F Src/setup_kscell.F

    removed files:
     Src/.arch-ids/repol.F.id Src/repol.F

    modified files:
     Src/Makefile Src/bands.F Src/born_charge.F Src/dhscf.F
     Src/diagg.F Src/diagk.F Src/fermid.F Src/kpoint_grid.F90
     Src/ksv.f Src/ksvinit.F Src/siesta_analysis.F
     Src/siesta_init.F Src/siesta_todo.F Src/state_init.F
     Src/writewave.F Tests/born/born.fdf

    renamed files:
     Src/.arch-ids/ksvinit.f.id
       ==> Src/.arch-ids/ksvinit.F.id
     Src/ksvinit.f
       ==> Src/ksvinit.F

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-7
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-8
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-11
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-12
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-13


2007-02-09 10:48:32 GMT	Alberto Garcia <albertog@icmab.es>	patch-5

    Summary:
      More options for running tests
    Revision:
      siesta-bsc--master--2.1--patch-5

    Several versions of Makefile and test.mk are provided in Tests:
    
    bsc-Makefile, bsc-test.mk  : For BSC work
    std-Makefile, std-test.mk  : Standard, complete versions
    
    The user should link the chosen versions to Makefile and test.mk
    
    

    new files:
     Tests/.arch-ids/bsc-compare.sh.id Tests/bsc-compare.sh

    modified files:
     Tests/README Tests/bsc-Makefile Tests/bsc-test.mk
     Tests/std-compare.sh

    renamed files:
     Tests/.arch-ids/Makefile.id
       ==> Tests/.arch-ids/std-Makefile.id
     Tests/.arch-ids/compare.sh.id
       ==> Tests/.arch-ids/std-compare.sh.id
     Tests/.arch-ids/test.mk.id
       ==> Tests/.arch-ids/std-test.mk.id
     Tests/Makefile
       ==> Tests/std-Makefile
     Tests/compare.sh
       ==> Tests/std-compare.sh
     Tests/test.mk
       ==> Tests/std-test.mk


2007-02-08 11:15:51 GMT	Alberto Garcia <albertog@icmab.es>	patch-4

    Summary:
      New stub module for sparse matrices
    Revision:
      siesta-bsc--master--2.1--patch-4

    A stub module to hold the sparse matrices ('sparse_matrices') has been
    created.  It just holds the relevant variables, without any attempt to
    create derived types yet.
    
    (Work done at BSC in the afternoon of Feb 7)
    

    new files:
     Src/.arch-ids/sparse_matrices.F90.id Src/sparse_matrices.F90

    modified files:
     Docs/CHANGES Src/Makefile Src/born_charge.F Src/compute_dm.F
     Src/local_DOS.F Src/mixer.F Src/new_dm.F Src/normalize_dm.F
     Src/post_scf_work.F Src/projected_DOS.F
     Src/setup_hamiltonian.F Src/siesta_analysis.F
     Src/siesta_init.F Src/siesta_move.F Src/siesta_todo.F
     Src/state_init.F version.info

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-5


2007-02-08 10:58:38 GMT	Alberto Garcia <albertog@icmab.es>	patch-3

    Summary:
      New geometry module
    Revision:
      siesta-bsc--master--2.1--patch-3

    A new module siesta_geom has been created to hold basic geometry
    information.
    
    Thus the atomic coordinates no longer live in 'atomlists', and the unit
    cell no longer lives in 'm_cell'. Supercell variables have also be put
    in the new module.
    
    + Some more slimming down of 'siesta_todo'.
    

    new files:
     Src/.arch-ids/siesta_geom.F90.id Src/siesta_geom.F90

    modified files:
     Docs/CHANGES Src/Makefile Src/atomlist.f Src/coor.F
     Src/diagsprl.F Src/iozm.F Src/local_DOS.F Src/m_cell.f
     Src/m_iostruct.f Src/outcoor.f Src/pdos.F
     Src/siesta_analysis.F Src/siesta_init.F Src/siesta_move.F
     Src/siesta_options.F Src/siesta_todo.F Src/struct_init.F
     Src/writewave.F Src/zmatrix.F version.info

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-4


2007-02-08 10:35:15 GMT	Alberto Garcia <albertog@icmab.es>	patch-2

    Summary:
      Creation of a module to hold the siesta options
    Revision:
      siesta-bsc--master--2.1--patch-2

    A new module 'siesta_options' has been created to hold the program
    options (typically those variables that can be specified in the fdf file).
    The catch-all module 'siesta_todo' has been slimmed down accordingly.
    
    Routine redata has been put in the module, renamed as 'read_options'.
    
    A few other option-setting statements in the old siesta.F have been put
    into read_options. 
    
    Some others remain scattered:
    
    1. Those in the Broyden routines.
    2. Those needed to process the initial geometry, read in struct_init.
    
    (Work done at the BSC on Feb 7)
    
    

    new files:
     Src/.arch-ids/siesta_options.F.id Src/siesta_options.F

    removed files:
     Src/.arch-ids/m_smearing.f.id Src/.arch-ids/redata.F.id
     Src/m_smearing.f Src/redata.F

    modified files:
     Docs/CHANGES Src/Makefile Src/compute_dm.F Src/local_DOS.F
     Src/mixer.F Src/new_dm.F Src/post_scf_work.F
     Src/projected_DOS.F Src/proximity_check.F
     Src/scfconvergence_test.F Src/setup_hamiltonian.F Src/siesta.F
     Src/siesta_analysis.F Src/siesta_init.F Src/siesta_move.F
     Src/siesta_todo.F Src/state_init.F Src/struct_init.F
     Src/write_md_record.F version.info

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-3


2007-02-08 09:52:48 GMT	Alberto Garcia <albertog@icmab.es>	patch-1

    Summary:
      Use of xalast in analysis routines. Exit of geometry loop
    Revision:
      siesta-bsc--master--2.1--patch-1

    The conditions for the setting and use of xalast have been clarified.
    
    The analysis routines (KSVpol, optical, dhscf (in plotting mode),
    local_DOS) now use the xalast array, which always refers to the atomic
    positions for which the density matrix was computed at the last
    geometry iteration performed (i.e., it is set before moving the atoms).
    
    For consistency, new arrays ucell_last and scell_last are similarly handled.
    
    Apart from those routines, the new setting conditions for xalast affect the
    computation of the virial correction to the "molecular pressure".
    
    In the geometry loop, the ending condition for istep has been
    corrected: it is not increased if the structure is relaxed.
    
    (Work done at BSC in the morning of Feb 7)
    
    

    new files:
     Src/.arch-ids/m_siesta.jose.F.id Src/m_siesta.jose.F

    modified files:
     Docs/CHANGES Src/local_DOS.F Src/m_cell.f Src/siesta.F
     Src/siesta_analysis.F Src/siesta_move.F Src/siesta_todo.F
     version.info

    new patches:
     ag@bsc--2007/siesta-bsc--ag--2.1--patch-2


2007-02-08 08:53:10 GMT	Alberto Garcia <albertog@icmab.es>	base-0

    Summary:
      tag of siesta@uam.es--2006/siesta-bsc--reference--2.1--patch-7
    Revision:
      siesta-bsc--master--2.1--base-0

    (automatically generated log message)

____________________________________________________________________
** CHANGES ALONG siesta@uam.es--2006/siesta-bsc--reference--2.1
--------------------------------------------------------------------

2007-02-07 7:30 GMT	Alberto Garcia <albertog@icmab.es>	patch-7

Summary: Moved the Born-effective-charge code
Keywords: 

Created a new module in born_charge.F.

The code is now executed by a call to born_charge() right after the
end of the force calculation at the end of the geometry loop. There is
no need to save xalast for this, as the coordinates have not yet been
moved. (Note that KSV_pol is called with xa instead of xalast).

Created new test 'born' and updated compare.sh

2007-02-07 7:21 GMT	Alberto Garcia <albertog@icmab.es>	patch-6

Summary: Work by Manuel Quero before the meeting on Feb 7th

New routines:

* new_dm          (code formerly in state_init)
* normalize_dm    (code formerly in setup_hamiltonian)
* local_DOS
* projected_DOS   (code formerly in siesta_analysis)

All the new routines split off from siesta.F have been placed in modules.

(kgrid and kgridinit are still not in the kgrid module, as they are used
in the KSV and optical sections -- more analysis is needed)

(Jose Soler's new version of the siesta_todo module is still not used)

(Code edited by Alberto Garcia from a package sent by Manuel Quero)

2007-01-31 10:21:37 GMT	Alberto Garcia <albertog@icmab.es>	patch-5

Summary: Kgrid setup streamlined. Bands. Proximity check. Hsparse allocation 
Keywords: 

* The kgrid handling is now done through a new module kpoint_grid, which exports
the new routine setup_Kpoint_grid, and holds kpoint and other arrays.

The kgrid is initialized for the first geometry in siesta_init, and then 
updated in the geometry loop (the conditions of the update are those of the
original reference version: varcel or server calculation)

Kgridinit (still outside the new module) has had its nkpnt argument
made "intent(out)".

* The setup of the band k-points has been moved to a new routine
'setup_bands' in module 'band' in file 'bands.F', which also holds
now nbk, maxbk, and bk. The setup routine is called right before the
band calculation *after* the geometry loop, instead of at the beginning
of the run (with the initial geometry).
The influence of nbk on 'gamma' has been removed, as it could conflict with
the self-consistent calculation.

(* The similar Writewave and KSV initializations have not been
refactored yet)

* The 'proximity check' code has been put into a new subroutine with
that name. Some of the local loop variables have been renamed.

* After the call to hsparse, the code for allocation of some arrays
has been simplified.

(This was the end of the second iteration of work at BSC by JMC, MQ, and AG
on 30 January).

2007-01-31 10:19:37 GMT	Alberto Garcia <albertog@icmab.es>	patch-4

Summary: Initialize vol2 correctly in m_check_supercell.f
Keywords: 

(This patch is needed so that tests run in a predictable manner:
the uninitialized vol2 had an influence on code path and led to
erratic differences in outputs).
The base version (in siesta-devel--bsc--base--2.1, a branch of
siesta-devel--reference--2.1--patch-29) has also been corrected.

Modified-files: Src/m_check_supercell.f

2007-01-31 10:15:37 GMT	Alberto Garcia <albertog@icmab.es>	patch-3

Summary: Consolidate geometry updates at the end of loop
Keywords: 

* Move comment about start of geometry loop to the right place in
 siesta.F 

* For idyn cases 6 (force constant), 7 (phonon interface), and 8
(server calculation), move the coordinate updates from the beginning
to the end of the geometry loop. The logic of geometry output to file XV
has been maintained. For cases 6 and 7, any output to a MD history file
is now done with the current (distorted) coordinates, instead of with
the restored (undisplaced) coordinates (bug of original version).

Note that the logic of XV output for the true MD cases has been maintained.
(next step's geometry, current step's velocities).

The MD output (together with any pixmol output) has been encapsulated
in a new file write_md_record.F

New-files: Src/.arch-ids/write_md_record.F.id
    Src/write_md_record.F
Modified-files: Src/Makefile Src/siesta.F Src/siesta_init.F
    Src/siesta_move.F Src/state_init.F


2007-01-31 10:06:37 GMT	Alberto Garcia <albertog@icmab.es>	patch-2

    Summary:
      Created struct_init for initial geometry setup. New test force_2
    Revision:
      siesta-bsc--reference--2.1--patch-2

    Struct_init has been detached from siesta_init to perform a self-contained
    geometry setup.
    
    Notes:
    
    * Ns is now set in initatom, and it is "intent(in)" in redata.
    
    * Those variables which have to do with structural input 
    are read twice: once in struct_init, and then in redata, pending a
    re-structuring of the latter. In some cases local variables are
    used.
    
    * iza is still set up in initatomlists. This means that some of the
    structural output has to be kept in siesta_init for now. The fix is to
    compute iza in coor or in read_struct.
    
    * va and vcell are zeroed out if an XV file is not used. But the
    zmatrix i/o routine is in principle able to read vcell (?).
    
    * Put the calls to struct_init and initatomlists closer.
    Do the array initialization inside of initatomlists.
    
    New test "force_2" for force-constant calculation with a smaller
    runtime than "force_constants"
    
    (Note: the initial coordinate output and other details are now output
    in a different order from that in the base version)
    

    new files:
     Src/.arch-ids/struct_init.F.id Src/struct_init.F
     Tests/Reference/.arch-ids/force_2.out.id
     Tests/Reference/force_2.out Tests/force_2/.arch-ids/=id
     Tests/force_2/.arch-ids/FC.fdf.id
     Tests/force_2/.arch-ids/force_2.fdf.id
     Tests/force_2/.arch-ids/force_2.pseudos.id
     Tests/force_2/.arch-ids/makefile.id Tests/force_2/FC.fdf
     Tests/force_2/force_2.fdf Tests/force_2/force_2.pseudos
     Tests/force_2/makefile

    modified files:
     Src/Makefile Src/atomlist.f Src/initatom.f Src/redata.F
     Src/siesta_init.F Src/siesta_todo.F

    new directories:
     Tests/force_2 Tests/force_2/.arch-ids

    new patches:
     agarcia@siesta.arch--2006/siesta-bsc--agarcia--2.1--patch-1
     agarcia@siesta.arch--2006/siesta-bsc--agarcia--2.1--patch-2


2007-01-25 13:17:04 GMT	Alberto Garcia <albertog@icmab.es>	patch-1

    Summary:
      First stage of siesta.F splitting at BSC
    Revision:
      siesta-bsc--reference--2.1--patch-1

    The first coding session at BSC on January 19, 2007 resulted in a first
    splitting of siesta.F into blocks.
    
    A new module "siesta_todo.F" was created holding most of the variables
    declared in siesta.F, as well as all the 'use' statements. External
    subroutines are kept for now in siesta.F. "siesta_todo.F" also
    contains the output routines which were formerly internal routines of
    the main program.
    
    Several new files were created:
    
    siesta_init
     state_init
      setup_hamiltonian
      compute_dm
      mixer
      scfconvergence_test
      post_scf_work
     siesta_move
    siesta_analysis
    siesta_end
    
    siesta.F is now much smaller, and has calls to those routines plus
    the minimum logic to control the geometry and scf loops. No attempt
    has been made to tidy up any of the blocks yet.
    
    The scf loop has been re-structured to separate the "last" pass which
    was performed after scf convergence. Some more work is needed to
    clarify the behavior in borderline and non-standard cases.
    
    The Makefile was updated.
    
    Added new file Src/Sys/marenostrum-mpi.make.
    
    Added new file Tests/compare.sh to automate comparisons with reference
    output (works best if the reference output is from the same platform,
    to avoid rounding differences).
    
    Added new test Tests/force_constants to exercise the idyn=6 code.
    

    new files:
     Src/.arch-ids/compute_dm.F.id Src/.arch-ids/mixer.F.id
     Src/.arch-ids/post_scf_work.F.id
     Src/.arch-ids/scfconvergence_test.F.id
     Src/.arch-ids/setup_hamiltonian.F.id
     Src/.arch-ids/siesta_analysis.F.id
     Src/.arch-ids/siesta_end.F.id Src/.arch-ids/siesta_init.F.id
     Src/.arch-ids/siesta_move.F.id Src/.arch-ids/siesta_todo.F.id
     Src/.arch-ids/state_init.F.id
     Src/Sys/.arch-ids/marenostrum-mpi.make.id
     Src/Sys/marenostrum-mpi.make Src/compute_dm.F Src/mixer.F
     Src/post_scf_work.F Src/scfconvergence_test.F
     Src/setup_hamiltonian.F Src/siesta_analysis.F Src/siesta_end.F
     Src/siesta_init.F Src/siesta_move.F Src/siesta_todo.F
     Src/state_init.F Tests/.arch-ids/bsc-Makefile.id
     Tests/.arch-ids/bsc-test.mk.id Tests/.arch-ids/compara.id
     Tests/.arch-ids/compare.sh.id
     Tests/Reference/.arch-ids/force_constants.out.id
     Tests/Reference/force_constants.out Tests/bsc-Makefile
     Tests/bsc-test.mk Tests/compara Tests/compare.sh
     Tests/force_constants/.arch-ids/=id
     Tests/force_constants/.arch-ids/FC.fdf.id
     Tests/force_constants/.arch-ids/force_constants.fdf.id
     Tests/force_constants/.arch-ids/force_constants.pseudos.id
     Tests/force_constants/.arch-ids/makefile.id
     Tests/force_constants/FC.fdf
     Tests/force_constants/force_constants.fdf
     Tests/force_constants/force_constants.pseudos
     Tests/force_constants/makefile

    modified files:
     Src/Makefile Src/siesta.F Src/version.F90 version.info

    new directories:
     Tests/force_constants Tests/force_constants/.arch-ids


2007-01-25 10:02:43 GMT	Alberto Garcia <albertog@icmab.es>	base-0

    Summary:
      tag of siesta@uam.es--2006/siesta-devel--reference--2.1--patch-29
    Revision:
      siesta-bsc--reference--2.1--base-0

    (automatically generated log message)

